:root {
    --primary-maroon: #2b0a0a;
    --primary-gold: #c5a059;
    --text-light: #f5f5f5;
    --text-dim: #d0d0d0;
    --glass-bg: rgba(20, 20, 20, 0.9);
    --glass-border: rgba(197, 160, 89, 0.3);
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    --font-quote: 'Playfair Display', serif;
}

/* === Reset & Basics === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #080808;
    color: var(--text-light);
    font-family: var(--font-body);
}

/* Ensure Form acts as a proper container */
#form1 {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* === Admin Pages Override (Allow Scrolling) === */
body.admin-body {
    overflow: auto !important;
    height: auto !important;
    width: 100% !important;
}

body.admin-body #form1 {
    overflow: visible !important;
    height: auto !important;
    width: 100% !important;
    display: block !important; /* Avoid flex constraints on long forms */
}

#app-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 92vh;
    /* Content minus Header */
    overflow: hidden;
}

/* === 1. Header (8vh) === */
.site-header {
    width: 100%;
    height: 8vh;
    background: linear-gradient(90deg, #1a0505 0%, #000 100%);
    border-bottom: 2px solid var(--primary-gold);
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 50;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.header-logo-container {
    flex-shrink: 0;
}

.header-logo {
    height: 5vh;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(197, 160, 89, 0.5));
}

.header-title-container {
    flex-grow: 1;
    text-align: center;
    padding: 0 20px;
}

.main-title {
    font-family: var(--font-heading);
    color: var(--primary-gold);
    font-size: 1.8rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sub-title {
    color: var(--text-dim);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 2px;
    opacity: 0.8;
}

.header-time-container {
    text-align: right;
    min-width: 140px;
    flex-shrink: 0;
}

.clock-display {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.date-display {
    font-size: 0.7rem;
    color: var(--primary-gold);
    font-weight: 600;
}

/* === 2. Hero Section (42vh) === */
.hero-section {
    position: relative;
    width: 100%;
    height: 22vh;
    background: #000;
    overflow: hidden;
    border-bottom: 2px solid var(--primary-gold);
    flex-shrink: 0;
}

.slideshow {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    width: 100%;
    left: 0;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

/* Gradient on bottom of hero for text readability */
.gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, #080808 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

.hero-overlay-text {
    position: absolute;
    bottom: 2vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    font-family: var(--font-heading);
    font-size: 2vh;
    /* Use vh for font size on signage */
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
    text-align: center;
    width: 100%;
    letter-spacing: 5px;
    text-transform: uppercase;
}

/* === 3. Stats Section (20vh) === */
.stats-section-detailed {
    height: 20vh;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px 30px;
    background: #0d0d0d;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    overflow: hidden;
}

.detail-card {
    flex: 1 1 25%;
    /* Force 3 columns in portrait */
    max-width: 30%;
    background: #151515;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.detail-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(197, 160, 89, 0.15);
    border-color: var(--primary-gold);
}

/* Simple book photo styling */
.book-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-image-wrapper {
    height: 8vh;
    background: #1f1f1f;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #2a2a2a;
    overflow: hidden;
}

.card-icon {
    font-size: 4rem;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.card-content {
    padding: 10px;
    text-align: center;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--font-heading);
    color: var(--primary-gold);
    font-size: 1rem;
    margin-bottom: 5px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.card-body {
    color: #ddd;
    font-size: 0.9rem;
    min-height: 4vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

/* === 4. Info Content Grid (20vh) === */
.info-content-grid {
    height: 20vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 0 30px 15px 30px;
    background: #0d0d0d;
    flex-shrink: 0;
    overflow: hidden;
}

.info-block {
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.block-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #555;
    padding-bottom: 15px;
}

.block-icon {
    font-size: 1.5rem;
}

.block-header h2 {
    color: var(--primary-gold);
    font-family: var(--font-heading);
    font-size: 1.4rem;
}

/* Tickers */
.news-ticker-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 10vh;
    /* Scaled for 20vh container */
}

.news-list {
    list-style: none;
    animation: scrollVertical 20s linear infinite;
}

.news-list li {
    padding: 5px 0;
    border-bottom: 1px dashed #444;
}

.news-list li h4 {
    color: #f0f0f0;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.news-list li p {
    color: #aaa;
    font-size: 0.8rem;
    line-height: 1.2;
}

.typewriter-container {
    padding: 5px;
    font-size: 1.1rem;
    line-height: 1.3;
}

/* === 5. Footer (10vh) === */
.site-footer {
    height: 10vh;
    background: #050505;
    border-top: 3px solid var(--primary-gold);
    padding: 10px 40px;
    color: #888;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-divider {
    width: 1px;
    height: 100px;
    background: #333;
    display: none;
    /* Hidden on mobile */
}

@media (min-width: 768px) {
    .footer-divider {
        display: block;
    }
}

.quote-area,
.history-area {
    flex: 1;
    min-width: 300px;
}

.footer-label {
    display: block;
    color: var(--primary-gold);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.quote-text {
    font-family: var(--font-quote);
    font-style: italic;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 10px;
}

.quote-author {
    color: var(--primary-gold);
    font-size: 0.9rem;
}

.footer-branding {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #1a1a1a;
    text-align: center;
    font-size: 0.6rem;
    opacity: 0.5;
}

/* Admin Links - Floating bottom corners */
.admin-link,
.admin-link1 {
    position: fixed;
    bottom: 10px;
    z-index: 9999;
    font-size: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 5px;
    border-radius: 4px;
}

.admin-link {
    right: 10px;
}

.admin-link1 {
    left: 10px;
}


/* === Animations === */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes scrollVertical {
    0% {
        transform: translateY(100%);
    }

    100% {
        transform: translateY(-100%);
    }
}

/* Shimmer/Light Effect for Cards */
.detail-card {
    position: relative;
    /* Ensure relative context for pseudo-element */
    overflow: hidden;
    /* Clip the light effect */
}

.detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-25deg);
    animation: shimmer 6s infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    15% {
        left: 200%;
    }

    /* Fast pass */
    100% {
        left: 200%;
    }

    /* Long wait */
}

/* Footer Quote Animation */
.quote-text {
    animation: fadeQuote 20s infinite;
}

@keyframes fadeQuote {

    0%,
    100% {
        opacity: 0;
        transform: translateY(10px);
    }

    10%,
    90% {
        opacity: 1;
        transform: translateY(0);
    }
}


