/* ==========================================================================
   Hefflin Theme - Custom Styles
   Non-Tailwind overrides and WordPress-specific styling
   ========================================================================== */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Screen reader text (WordPress standard) */
.sr-only,
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.screen-reader-text:focus {
    position: fixed;
    top: 5px;
    left: 5px;
    z-index: 100000;
    display: block;
    width: auto;
    height: auto;
    padding: 15px 23px 14px;
    clip: auto !important;
    font-size: 14px;
    font-weight: 600;
    line-height: normal;
    color: #2563eb;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    white-space: normal;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Custom logo */
.custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.custom-logo {
    max-height: 40px;
    width: auto;
}

/* ==========================================================================
   Widget Styling
   ========================================================================== */

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: #475569;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.widget ul li a:hover {
    color: #2563eb;
}

.widget select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #334155;
    background-color: #fff;
}

/* Search widget */
.widget_search form {
    display: flex;
    gap: 0.5rem;
}

.widget_search .search-field {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.widget_search .search-submit {
    padding: 0.5rem 1rem;
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.widget_search .search-submit:hover {
    background-color: #1d4ed8;
}

/* ==========================================================================
   Comment Styling
   ========================================================================== */

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list .comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.comment-list .children {
    list-style: none;
    padding-left: 2rem;
    margin: 0;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.comment-author .avatar {
    border-radius: 9999px;
}

.comment-author .fn {
    font-weight: 600;
    font-size: 0.875rem;
    color: #0f172a;
}

.comment-author .fn a {
    color: inherit;
    text-decoration: none;
}

.comment-metadata {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.comment-metadata a {
    color: inherit;
    text-decoration: none;
}

.comment-content {
    font-size: 0.875rem;
    line-height: 1.7;
    color: #475569;
}

.comment-content p {
    margin: 0.5rem 0;
}

.reply a {
    font-size: 0.75rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

.reply a:hover {
    color: #1d4ed8;
}

/* Comment form inputs */
.comment-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.25rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-form .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-form .comment-form-cookies-consent label {
    display: inline;
    font-size: 0.8125rem;
    color: #64748b;
}

/* Comment reply title */
.comment-reply-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

.comment-reply-title small {
    font-size: 0.8125rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

.comment-reply-title small a {
    color: #2563eb;
    text-decoration: none;
}

/* ==========================================================================
   WordPress Block Overrides
   ========================================================================== */

.wp-block-image figcaption {
    text-align: center;
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.wp-block-quote {
    border-left: 4px solid #2563eb;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #475569;
}

.wp-block-quote cite {
    display: block;
    font-size: 0.875rem;
    font-style: normal;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.wp-block-separator {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 2rem 0;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table th,
.wp-block-table td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    text-align: left;
    font-size: 0.875rem;
}

.wp-block-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #0f172a;
}

.wp-block-table tr:nth-child(even) td {
    background-color: #f8fafc;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    #site-header,
    #site-footer,
    #secondary,
    .post-navigation,
    .related-posts,
    .comment-respond,
    #mobile-menu-toggle {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .entry-content img {
        max-width: 100% !important;
    }
}
