/**
 * LegalInsight Additional Styles
 * Supplements the main style.css with component overrides and extras
 * @version 1.0.0
 */

/* ============================================================
   BOOTSTRAP OVERRIDES
============================================================ */
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(201,162,39,.35); }

.form-control:focus {
    border-color: var(--li-secondary) !important;
    box-shadow: 0 0 0 3px rgba(201,162,39,.15) !important;
}

.dropdown-menu { border-top: 3px solid var(--li-secondary) !important; }

/* ============================================================
   MOBILE MENU LINK STYLES (inside li-mobile-menu)
============================================================ */
.li-mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.li-mobile-menu ul li {
    border-bottom: 1px solid var(--li-light-gray);
}

.li-mobile-menu ul li a {
    display: block;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--li-primary);
    transition: var(--li-transition);
}

.li-mobile-menu ul li a:hover { color: var(--li-secondary); padding-left: 6px; }

.li-mobile-menu ul ul {
    padding-left: 1rem;
    border-top: 1px solid var(--li-light-gray);
}

.li-mobile-menu ul ul li a { font-size: 0.875rem; font-weight: 400; }

/* ============================================================
   COMMENT FORM OVERRIDES
============================================================ */
.li-comment-form label { font-weight: 600; font-size: .875rem; color: var(--li-primary); margin-bottom: .35rem; }
.comment-reply-title { font-family: var(--li-font-heading); }
.comment-reply-title small { margin-left: 1rem; }
.comment-reply-title small a { font-size: .875rem; color: var(--li-secondary); font-family: var(--li-font-body); }
.logged-in-as { font-size: .875rem; color: var(--li-medium-gray); margin-bottom: 1rem; }
.logged-in-as a { color: var(--li-secondary); }

/* ============================================================
   WORDPRESS GALLERY
============================================================ */
.gallery { display: grid; gap: .75rem; margin-bottom: 1.5rem; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--li-radius); }

@media (max-width: 576px) {
    .gallery-columns-3, .gallery-columns-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   BLOCKQUOTE (wp-block-quote)
============================================================ */
.wp-block-quote {
    background: var(--li-light);
    border-left: 5px solid var(--li-secondary) !important;
    border-radius: 0 var(--li-radius) var(--li-radius) 0;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
}

.wp-block-quote p { font-family: var(--li-font-heading); font-size: 1.15rem; color: var(--li-primary); }
.wp-block-quote cite { font-style: normal; font-size: .875rem; color: var(--li-medium-gray); }

/* ============================================================
   WP BLOCK STYLES
============================================================ */
.wp-block-separator { border-color: var(--li-light-gray); border-width: 2px; margin: 2rem 0; }
.wp-block-separator.has-alpha-channel-opacity { opacity: 1; }

.wp-block-pullquote { border-color: var(--li-secondary); }
.wp-block-pullquote blockquote p { color: var(--li-primary); }

.wp-block-code { background: var(--li-primary); color: #e2e8f0; border-radius: var(--li-radius); padding: 1.5rem; }
.wp-block-code code { font-family: var(--li-font-mono); font-size: .875rem; }

.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td, .wp-block-table th { padding: .75rem 1rem; border: 1px solid var(--li-border); }
.wp-block-table th { background: var(--li-primary); color: var(--li-white); font-weight: 600; }
.wp-block-table tr:nth-child(even) td { background: var(--li-light); }

/* ============================================================
   READING PROGRESS BAR (added via JS)
============================================================ */
#li-reading-progress { pointer-events: none; }

/* ============================================================
   SEARCH FORM
============================================================ */
.li-search-form .input-group { border-radius: var(--li-radius); overflow: hidden; box-shadow: var(--li-shadow-sm); }
.li-search-form .form-control { border-right: none; padding: .75rem 1rem; }
.li-search-form .btn-li-primary { border-radius: 0 var(--li-radius) var(--li-radius) 0 !important; padding: .75rem 1.25rem; white-space: nowrap; }

/* ============================================================
   CATEGORY PAGE: Filter Tabs
============================================================ */
.li-filter-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }

.li-filter-tab {
    padding: .45rem 1.1rem;
    background: var(--li-white);
    border: 1.5px solid var(--li-border);
    border-radius: 30px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--li-text);
    cursor: pointer;
    transition: var(--li-transition);
}

.li-filter-tab:hover, .li-filter-tab.active {
    background: var(--li-primary);
    border-color: var(--li-primary);
    color: var(--li-white);
}

/* ============================================================
   CARD HOVER EFFECTS
============================================================ */
.li-card .li-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11,31,58,.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.li-card:hover .li-card-image::after { opacity: 1; }

/* ============================================================
   AUTHOR PAGE
============================================================ */
.li-author-posts-count {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--li-secondary);
    color: var(--li-primary);
    font-weight: 700;
    font-size: .75rem;
    padding: .2rem .65rem;
    border-radius: 20px;
}

/* ============================================================
   PRINT
============================================================ */
@media print {
    .no-print, #li-reading-progress { display: none !important; }
    body { font-size: 11pt; line-height: 1.5; color: #000; }
    a { color: #000; text-decoration: underline; }
    h1, h2, h3 { color: #000; }
}

/* ============================================================
   DARK MODE SUPPORT (prefers-color-scheme)
============================================================ */
@media ( prefers-color-scheme: dark ) {
    /* Intentionally minimal — law sites benefit from consistent
       professional appearance regardless of user preference.
       Uncomment and extend to add full dark mode support. */
}

/* ============================================================
   REDUCED MOTION SUPPORT
============================================================ */
@media ( prefers-reduced-motion: reduce ) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .li-ticker-items { animation: none; }

    html { scroll-behavior: auto; }
}

/* ============================================================
   HIGH CONTRAST SUPPORT
============================================================ */
@media ( forced-colors: active ) {
    .li-badge, .btn-li-primary, .btn-li-secondary { forced-color-adjust: none; }
}

/* ============================================================
   CUSTOM SCROLLBAR (WebKit)
============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--li-light); }
::-webkit-scrollbar-thumb { background: var(--li-primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--li-secondary); }

/* ============================================================
   UTILITY ADDITIONS
============================================================ */
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }

.text-gold { color: var(--li-secondary) !important; }
.bg-dark-navy { background-color: var(--li-primary) !important; }

.border-gold { border-color: var(--li-secondary) !important; }
.border-navy { border-color: var(--li-primary) !important; }

.rounded-li { border-radius: var(--li-radius) !important; }
.rounded-li-lg { border-radius: var(--li-radius-lg) !important; }
.rounded-li-xl { border-radius: var(--li-radius-xl) !important; }

/* ============================================================
   CURRENT MENU ITEM STYLING
============================================================ */
.li-nav-menu > li.current-menu-item > a,
.li-nav-menu > li.current-menu-ancestor > a,
.li-nav-menu > li.current_page_item > a {
    color: var(--li-secondary) !important;
    border-bottom-color: var(--li-secondary) !important;
}

/* ============================================================
   LEGAL DISCLAIMER BOX (reusable class)
============================================================ */
.li-disclaimer {
    background: rgba(11,31,58,.05);
    border-left: 4px solid var(--li-secondary);
    border-radius: var(--li-radius);
    padding: 1rem 1.25rem;
    font-size: .875rem;
    color: var(--li-medium-gray);
    margin: 1.5rem 0;
}

.li-disclaimer strong { color: var(--li-primary); }

/* ============================================================
   PAGINATION
============================================================ */
.pagination { gap: .25rem; }
.page-link { border-radius: var(--li-radius) !important; margin: 0 !important; }

/* ============================================================
   TESTIMONIAL CAROUSEL INDICATOR FIX
============================================================ */
.li-testimonials .carousel-indicators { position: relative; margin: 2rem 0 0; }
.li-testimonials .carousel-indicators button { opacity: .4; }
.li-testimonials .carousel-indicators button.active { opacity: 1; }

/* ============================================================
   RESPONSIVE HERO CONTENT ADJUSTMENTS
============================================================ */
@media (max-width: 575px) {
    .li-hero-content .btn-li-secondary { width: 100%; justify-content: center; }
}

/* ============================================================
   FOOTER NEWSLETTER INPUT PLACEHOLDER
============================================================ */
.li-footer input::placeholder { color: rgba(255,255,255,.5) !important; }

/* ============================================================
   SINGLE POST ANCHOR OFFSET (for sticky navbar)
============================================================ */
[id] { scroll-margin-top: 90px; }
