/* ==========================================================================
   Archaeological Excavation Explorer Stylesheets - Incredible India Explorer
   ========================================================================== */

:root {
    --excav-accent: #d97706;
    --excav-earth: #b45309;
    --excav-gold: var(--gold);
    --excav-bg: var(--bg-dark);
    --excav-surface: rgba(255, 255, 255, 0.06);
    --excav-surface-hover: rgba(255, 255, 255, 0.12);
    --excav-border: rgba(255, 255, 255, 0.14);
    --excav-text: #f3f4f6;
    --excav-muted: #9ca3af;
    --excav-card-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    --excav-glow: rgba(217, 119, 6, 0.22);
}

.light-theme {
    --excav-bg: #fafaf9;
    --excav-surface: rgba(255, 255, 255, 0.9);
    --excav-surface-hover: #ffffff;
    --excav-border: rgba(0, 0, 0, 0.12);
    --excav-text: #1c1917;
    --excav-muted: #57534e;
    --excav-card-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.excavations-page {
    min-height: 100vh;
    background-color: var(--excav-bg);
    color: var(--excav-text);
}

/* --- Hero Section --- */
.excavations-hero {
    position: relative;
    isolation: isolate;
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 60px;
    background: 
        linear-gradient(135deg, rgba(13, 15, 20, 0.92), rgba(45, 25, 10, 0.84)),
        url("assets/travel_hidden.png") center/cover no-repeat;
    overflow: hidden;
}

.excavations-hero::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 650px;
    height: 420px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.22), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    max-width: 880px;
    margin: 0 auto;
}

.hero-kicker {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid rgba(217, 119, 6, 0.35);
    color: var(--excav-accent);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.excavations-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.excavations-hero h1 span {
    background: linear-gradient(120deg, var(--excav-accent), var(--excav-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.excavations-hero p {
    font-size: 1.15rem;
    color: var(--excav-muted);
    line-height: 1.65;
    margin-bottom: 36px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.stat-box {
    background: var(--excav-surface);
    border: 1px solid var(--excav-border);
    padding: 16px 22px;
    border-radius: 14px;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
}

.stat-box strong {
    font-size: 1.6rem;
    color: var(--excav-gold);
    font-weight: 800;
}

.stat-box span {
    font-size: 0.82rem;
    color: var(--excav-muted);
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-cta {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta.primary {
    background: linear-gradient(135deg, var(--excav-accent), var(--excav-earth));
    color: #fff;
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
}

.hero-cta.secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--excav-border);
    color: var(--excav-text);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.4);
}

/* --- Section Formatting --- */
.excavations-section {
    padding: 70px 20px;
    max-width: 1320px;
    margin: 0 auto;
}

.section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.section-badge {
    color: var(--excav-accent);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-heading h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin: 8px 0 12px;
}

.section-heading p {
    color: var(--excav-muted);
    font-size: 1.05rem;
}

/* --- Timeline Shell --- */
.timeline-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-button {
    width: 100%;
    padding: 14px 18px;
    text-align: left;
    border: 1px solid var(--excav-border);
    border-radius: 14px;
    background: var(--excav-surface);
    color: var(--excav-text);
    cursor: pointer;
    transition: all 0.25s ease;
}

.timeline-button:hover,
.timeline-button:focus-visible {
    transform: translateX(4px);
    border-color: var(--excav-accent);
}

.timeline-button.active {
    border-color: var(--excav-accent);
    background: var(--excav-glow);
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.2);
}

.timeline-button strong {
    display: block;
    color: var(--excav-gold);
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.timeline-button span {
    font-size: 0.88rem;
    color: var(--excav-muted);
}

.timeline-detail {
    min-height: 280px;
    padding: 36px;
    border: 1px solid var(--excav-border);
    border-radius: 22px;
    background: 
        radial-gradient(circle at 90% 10%, rgba(217, 119, 6, 0.16), transparent 36%),
        var(--excav-surface);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}

.timeline-era {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--excav-accent);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.timeline-detail h3 {
    margin: 0 0 14px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.timeline-detail p {
    margin: 0;
    color: var(--excav-muted);
    line-height: 1.75;
    font-size: 1.05rem;
}

@media (max-width: 900px) {
    .timeline-shell {
        grid-template-columns: 1fr;
    }
    .timeline-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* --- Controls Toolbar --- */
.explorer-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    background: var(--excav-surface);
    border: 1px solid var(--excav-border);
    padding: 24px;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    margin-bottom: 24px;
}

.control-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-field.search-field {
    grid-column: 1 / -1;
}

@media (min-width: 992px) {
    .control-field.search-field {
        grid-column: span 2;
    }
}

.control-field label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--excav-muted);
}

.control-field input,
.control-field select {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--excav-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--excav-text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.light-theme .control-field input,
.light-theme .control-field select {
    background: #ffffff;
}

.control-field input:focus,
.control-field select:focus {
    border-color: var(--excav-accent);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

/* Results Toolbar */
.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 4px;
}

#result-status {
    font-size: 0.95rem;
    color: var(--excav-muted);
    font-weight: 500;
}

.btn-clear, .btn-reset {
    background: transparent;
    border: 1px solid var(--excav-border);
    color: var(--excav-accent);
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.btn-clear:hover, .btn-reset:hover {
    background: rgba(217, 119, 6, 0.15);
    border-color: var(--excav-accent);
}

/* --- Cards Grid --- */
.excavations-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 28px;
}

/* Excavation Card */
.excavation-card {
    background: var(--excav-surface);
    border: 1px solid var(--excav-border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.excavation-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--excav-card-shadow);
    border-color: rgba(217, 119, 6, 0.5);
    background: var(--excav-surface-hover);
}

.card-image-wrap {
    position: relative;
    height: 190px;
    overflow: hidden;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.excavation-card:hover .card-image-wrap img {
    transform: scale(1.06);
}

.card-badge {
    position: absolute;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
}

.state-badge {
    top: 12px;
    left: 12px;
    background: rgba(13, 15, 20, 0.85);
    color: var(--excav-gold);
    border: 1px solid rgba(246, 196, 83, 0.4);
}

.period-badge {
    top: 12px;
    right: 12px;
    background: rgba(217, 119, 6, 0.9);
    color: #fff;
}

.card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-location {
    font-size: 0.82rem;
    color: var(--excav-accent);
    font-weight: 600;
    margin-bottom: 6px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--excav-text);
}

.card-agency {
    font-size: 0.85rem;
    color: var(--excav-gold);
    margin-bottom: 10px;
}

.card-artifacts {
    background: rgba(217, 119, 6, 0.08);
    border-left: 3px solid var(--excav-accent);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--excav-text);
    margin-bottom: 14px;
}

.card-description {
    font-size: 0.9rem;
    color: var(--excav-muted);
    line-height: 1.5;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-view-details {
    width: 100%;
    padding: 10px 16px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--excav-accent);
    color: var(--excav-accent);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin-top: auto;
}

.btn-view-details:hover {
    background: var(--excav-accent);
    color: #fff;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--excav-surface);
    border: 1px dashed var(--excav-border);
    border-radius: 18px;
    margin-top: 20px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--excav-muted);
    max-width: 460px;
    margin: 0 auto 20px;
}

/* --- Modal --- */
.excavation-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.excavation-modal-overlay[hidden] {
    display: none !important;
}

.excavation-modal-content {
    background: var(--excav-bg);
    border: 1px solid var(--excav-border);
    width: min(780px, 100%);
    max-height: 90vh;
    border-radius: 20px;
    padding: 32px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 22px;
    background: transparent;
    border: none;
    color: var(--excav-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--excav-accent);
}

.modal-header {
    margin-bottom: 20px;
    padding-right: 40px;
}

.modal-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.modal-tag {
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.state-tag { background: rgba(246, 196, 83, 0.15); color: var(--excav-gold); border: 1px solid rgba(246, 196, 83, 0.3); }
.period-tag { background: rgba(217, 119, 6, 0.15); color: var(--excav-accent); border: 1px solid rgba(217, 119, 6, 0.3); }

.modal-excav-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    line-height: 1.3;
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--excav-muted);
    margin-top: 4px;
}

.modal-hero-img-wrap {
    width: 100%;
    height: 250px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 24px;
}

.modal-hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.spec-card {
    background: var(--excav-surface);
    border: 1px solid var(--excav-border);
    padding: 14px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.78rem;
    color: var(--excav-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.spec-value {
    font-size: 1.05rem;
    color: var(--excav-gold);
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--excav-accent);
}

.modal-text {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--excav-text);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--excav-border);
}

.btn-modal-action {
    padding: 10px 20px;
    border-radius: 20px;
    background: var(--excav-surface);
    border: 1px solid var(--excav-border);
    color: var(--excav-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-action:hover {
    background: var(--excav-accent);
    color: #fff;
    border-color: var(--excav-accent);
}

.modal-nav-btns {
    display: flex;
    gap: 10px;
}

body.modal-open {
    overflow: hidden;
}
