/**
 * FlashGL — Sitemap Page Styles
 *
 * Dedicated stylesheet for page-sitemap.php.
 * Loaded only on the sitemap page template to avoid conflicts.
 *
 * @package FlashGL
 */

/* ==========================================================================
   Sitemap Hero — matches archive-hero theme (dark navy #0D1B4A base)
   ========================================================================== */
#primary .sitemap-hero {
    background-color: var(--wp--preset--color--dark, #0D1B4A);
    color: #fff;
    padding: 5rem 0 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Gradient overlay */
#primary .sitemap-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 43, 140, 0.95) 0%, rgba(13, 22, 80, 0.98) 100%);
    z-index: 0;
}

/* Subtle radial glow */
#primary .sitemap-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

#primary .sitemap-hero .container {
    position: relative;
    z-index: 1;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 800px;
    margin: 0 auto;
}

#primary .sitemap-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

#primary .sitemap-hero__icon svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

#primary .sitemap-hero__title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.625rem;
    line-height: 1.2;
}

#primary .sitemap-hero__desc {
    font-size: clamp(0.875rem, 2vw, 1.05rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── Search Box ── */
#primary .sitemap-hero__search {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 480px;
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

#primary .sitemap-hero__search:focus-within {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
}

#primary .sitemap-hero__search-icon {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    stroke: rgba(255, 255, 255, 0.5);
}

#primary .sitemap-hero__search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    color: #fff !important;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    outline: none !important;
    font-family: inherit;
}

#primary .sitemap-hero__search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

#primary .sitemap-hero__search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

#primary .sitemap-hero__search-clear:hover {
    color: #fff;
}

/* ==========================================================================
   Sitemap Body
   ========================================================================== */
#primary .sitemap-body {
    padding: 3rem 0 5rem;
    background: #F5F7FA;
    min-height: 60vh;
}

#primary .sitemap-body .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ==========================================================================
   Section Groups — visual grouping with headers
   ========================================================================== */
#primary .sitemap-group {
    margin-bottom: 2.5rem;
}

#primary .sitemap-group:last-child {
    margin-bottom: 0;
}

#primary .sitemap-group__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #E0E5ED;
}

#primary .sitemap-group__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #1A2B8C;
    color: #fff;
    flex-shrink: 0;
    font-size: 0;
    line-height: 0;
}

#primary .sitemap-group__icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
    stroke: #fff;
    fill: none;
}

#primary .sitemap-group__title {
    font-size: 1.125rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

#primary .sitemap-group__desc {
    font-size: 0.8125rem;
    color: #6B7280;
    margin: 0 0 0 0.5rem;
    line-height: 1.4;
}

/* ── Group Grid ── */
#primary .sitemap-group__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1024px) {
    #primary .sitemap-group__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    #primary .sitemap-group__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ==========================================================================
   Sitemap Card — clean white card
   ========================================================================== */
#primary .sitemap-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #E8ECF1;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    overflow: hidden;
    min-width: 0;
}

#primary .sitemap-card:hover {
    box-shadow: 0 8px 30px rgba(26, 43, 140, 0.1);
    border-color: rgba(26, 43, 140, 0.2);
    transform: translateY(-2px);
}

/* ==========================================================================
   Sitemap Card Header
   ========================================================================== */
#primary .sitemap-card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #E8ECF1;
    background: transparent;
    flex-shrink: 0;
}

#primary .sitemap-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #EEF2FF;
    color: #1A2B8C;
    flex-shrink: 0;
    font-size: 0;
    line-height: 0;
}

#primary .sitemap-card__icon svg {
    width: 18px;
    height: 18px;
    display: block;
    color: #1A2B8C;
    stroke: #1A2B8C;
    fill: none;
}

#primary .sitemap-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    flex: 1;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

#primary a.sitemap-card__title {
    text-decoration: none;
    transition: color 0.15s ease;
}

#primary a.sitemap-card__title:hover {
    color: #1A2B8C;
}

#primary .sitemap-card__count {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #1A2B8C;
    background: #EEF2FF;
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================================================
   Sitemap Card List
   ========================================================================== */
#primary .sitemap-card__list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0.375rem 0 !important;
    flex: 1;
}

#primary .sitemap-card__list li {
    margin: 0 !important;
    padding: 0 !important;
}

#primary .sitemap-card__list li:last-child {
    border-bottom: none;
}

#primary .sitemap-card__list a {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: #4B5563;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1.45;
    overflow: hidden;
}

#primary .sitemap-card__link-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

#primary .sitemap-card__list a::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #D1D5DB;
    flex-shrink: 0;
    transition: background 0.15s ease;
    margin-top: 2px;
}

#primary .sitemap-card__list a:hover {
    background: #F5F7FA;
    color: #1A2B8C;
}

#primary .sitemap-card__list a:hover::before {
    background: #1A2B8C;
}

/* ── Meta Info (date + status badges) ── */
#primary .sitemap-card__meta-date {
    font-size: 0.6875rem;
    color: #9CA3AF;
    white-space: nowrap;
    flex-shrink: 0;
}

#primary .sitemap-card__meta-badge {
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#primary .sitemap-card__meta-badge--upcoming {
    background: #EEF2FF;
    color: #1A2B8C;
}

#primary .sitemap-card__meta-badge--live {
    background: #DCFCE7;
    color: #166534;
}

#primary .sitemap-card__meta-badge--past {
    background: #F3F4F6;
    color: #6B7280;
}

/* ==========================================================================
   Collapse Mechanism
   ========================================================================== */
#primary .sitemap-card__list--collapsed .sitemap-card__hidden-item {
    display: none !important;
}

#primary .sitemap-card__hidden-item {
    display: list-item;
}

/* ==========================================================================
   Toggle Button
   ========================================================================== */
#primary .sitemap-card__toggle {
    padding: 0.75rem 1rem 0.625rem;
    flex-shrink: 0;
}

#primary .sitemap-card__toggle-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    background: #fff;
    border: 1px solid #E8ECF1;
    border-radius: 8px;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1A2B8C;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    font-family: inherit;
}

#primary .sitemap-card__toggle-btn:hover {
    border-color: #1A2B8C;
}

#primary .sitemap-card__toggle-btn:focus-visible {
    outline: 2px solid #1A2B8C;
    outline-offset: 2px;
}

#primary .sitemap-card__toggle-text {
    pointer-events: none;
}

#primary .sitemap-card__toggle-arrow {
    display: inline-block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    pointer-events: none;
}

/* ==========================================================================
   Archive Link
   ========================================================================== */
#primary .sitemap-card__archive {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0.875rem 0.75rem 0.625rem;
    border-top: 1px solid #F1F3F6;
    font-size: 0.6875rem !important;
    font-weight: 600;
    color: #1A2B8C !important;
    text-decoration: none;
    white-space: nowrap !important;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
    line-height: 1;
}

#primary .sitemap-card__archive:hover {
    color: #D00020 !important;
}

#primary .sitemap-card__archive svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

#primary .sitemap-card__archive:hover svg {
    transform: translateX(3px);
}

/* ==========================================================================
   No Results
   ========================================================================== */
#primary .sitemap-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #9CA3AF;
}

#primary .sitemap-no-results svg {
    display: block;
    margin: 0 auto 1rem;
    color: #D1D5DB;
    stroke: #D1D5DB;
}

#primary .sitemap-no-results h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #4B5563;
    margin: 0 0 0.5rem;
}

#primary .sitemap-no-results p {
    font-size: 0.875rem;
    color: #9CA3AF;
    margin: 0;
}

/* ==========================================================================
   Responsive Tweaks
   ========================================================================== */
@media (max-width: 1024px) {
    #primary .sitemap-hero {
        padding: 3.5rem 0 2.5rem;
    }

    #primary .sitemap-body {
        padding: 2rem 0 3rem;
    }

    #primary .sitemap-group__header {
        flex-wrap: wrap;
    }

    #primary .sitemap-group__desc {
        margin-left: 0;
        width: 100%;
        margin-top: 0.25rem;
    }
}

@media (max-width: 640px) {
    #primary .sitemap-hero {
        padding: 3.5rem 0 2.5rem;
    }

    #primary .sitemap-hero__icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    #primary .sitemap-hero__icon svg {
        width: 26px;
        height: 26px;
    }

    #primary .sitemap-hero__search {
        max-width: 100%;
        margin-top: 1rem;
    }

    #primary .sitemap-group__icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    #primary .sitemap-group__icon svg {
        width: 18px;
        height: 18px;
    }

    #primary .sitemap-group__title {
        font-size: 0.9375rem;
    }

    #primary .sitemap-card__header {
        padding: 0.625rem 0.75rem;
        gap: 0.625rem;
    }

    #primary .sitemap-card__list a {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    #primary .sitemap-card__toggle {
        padding: 0.5rem 0.75rem;
    }

    #primary .sitemap-card__archive {
        padding: 0.75rem 0.75rem 0.5rem;
    }
}
