/* ISKCON Theme CSS */
:root {
    --primary-color: #F49F1C; /* Saffron */
    --primary-dark: #D48010;
    --secondary-color: #8B0000; /* Deep Red */
    --accent-color: #FFD700; /* Gold */
    --bg-color: #FAF9F6; /* Off-White */
    --text-color: #333333;
    --text-light: #555555;
    --font-heading: 'Trajan Pro', 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    --font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    
    /* Spacing System */
    --sp-xs: 0.5rem;   /* 8px */
    --sp-sm: 1rem;     /* 16px */
    --sp-md: 2rem;     /* 32px */
    --sp-lg: 4rem;     /* 64px */
    --sp-xl: 8rem;     /* 128px */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
    font-size: 1.1rem;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: var(--sp-sm);
    font-weight: 700;
    line-height: 1.2;
}

.title-display { font-size: clamp(3rem, 6vw, 5rem); text-transform: uppercase; letter-spacing: 2px;}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); text-align: left; }
.text-center { text-align: center; }
h3 { font-size: 1.8rem; color: var(--primary-dark); }
h4 { font-size: 1.4rem; color: var(--secondary-color); text-transform: uppercase; letter-spacing: 1px;}
p { margin-bottom: var(--sp-md); font-size: 1.15rem; color: var(--text-light); }
.lead-text { font-size: 1.4rem; font-weight: 400; color: var(--text-color); line-height: 1.8;}
.caption { font-size: 0.9rem; font-style: italic; color: #777;}

/* Images - Global rule: Uncropped */
img {
    max-width: 100%;
    height: auto;
    object-fit: contain; /* CRITICAL: Never crop images */
    display: block;
    margin: 0 auto;
}

/* Base UI Elements */
.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 5px; /* Boxier for elegance */
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.btn-outline:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

/* Navigation */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--accent-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 2rem;
    color: var(--secondary-color);
}

/* Varied Layout Structures for Unique Compositions */

/* 1. Immersive Hero Structure */
.hero-immersive {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--sp-xl) 5%;
    position: relative;
    color: #fff;
    text-align: center;
}
.hero-immersive::before {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.85) 0%, rgba(244, 159, 28, 0.6) 100%);
    z-index: 1;
}
.hero-immersive > * { z-index: 2; position: relative;}
.hero-immersive .hero-bg-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; /* Only bg can be cover */
    z-index: 0;
}

/* 2. Overlapping Asymmetric Block Structure */
.layout-overlap {
    padding: var(--sp-xl) 5%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-md);
    align-items: center;
    position: relative;
}
.layout-overlap .overlap-content {
    background: #fff;
    padding: var(--sp-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    position: relative;
    z-index: 2;
    transform: translateX(10%);
    border-left: 5px solid var(--primary-color);
}
.layout-overlap .overlap-image {
    z-index: 1;
    background: var(--bg-color);
    padding: var(--sp-md);
}

/* 3. Split Screen Narrative (50/50 without overlap) */
.layout-split {
    display: flex;
    flex-wrap: wrap;
    background: #fff;
}
.split-text {
    flex: 1;
    min-width: 300px;
    padding: var(--sp-xl) 8%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.split-image {
    flex: 1;
    min-width: 300px;
    background-color: #ECE8E1; /* Subtle contrast */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--sp-lg);
}
.layout-split.reverse { flex-direction: row-reverse; }

/* 4. Elegant Text-heavy article structure */
.layout-article {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--sp-xl) 5%;
}
.layout-article .drop-cap::first-letter {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    color: var(--primary-color);
    float: left;
    line-height: 0.8;
    margin-right: 15px;
    margin-top: 5px;
}
.layout-article blockquote {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--secondary-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 2rem;
    margin: var(--sp-lg) 0;
    font-style: italic;
    line-height: 1.4;
}

/* 5. Masonry Grid (for highlights/gallery items) */
.layout-masonry {
    column-count: 3;
    column-gap: var(--sp-lg);
    padding: var(--sp-xl) 5%;
    max-width: 1400px;
    margin: 0 auto;
}
.masonry-item {
    break-inside: avoid;
    margin-bottom: var(--sp-lg);
    background: #fff;
    padding: var(--sp-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* 6. Feature Grid (3-column uniform) */
.layout-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--sp-lg);
    padding: var(--sp-xl) 5%;
    max-width: 1400px;
    margin: 0 auto;
}
.feature-card {
    background: #fff;
    padding: var(--sp-md);
    border-top: 4px solid var(--primary-dark);
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.feature-card img {
    margin-bottom: var(--sp-md);
    background: var(--bg-color);
    padding: var(--sp-xs);
    border: 1px solid #eee;
}

/* Utility Containers */
.bg-dark { background-color: var(--secondary-color); color: #fff; }
.bg-dark h2, .bg-dark h3, .bg-dark p { color: #fff; }
.bg-light { background-color: #fff; }
.bg-saffron { background-color: var(--primary-color); color: #fff; }

/* Gate Page Specific */
.gate-wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-color);
    position: relative;
    overflow: hidden;
}
.gate-wrapper::after {
    content:'';
    position: absolute;
    top:0;left:0;right:0;bottom:0;
    background: url('../images/gate/image.jpg') center/cover;
    opacity: 0.3;
    z-index: 0;
}
.gate-box {
    background: rgba(255,255,255,0.95);
    padding: 4rem;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    max-width: 600px;
    width: 90%;
    z-index: 2;
    border-top: 6px solid var(--primary-color);
}
.gate-box input {
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 2rem;
    border: 1px solid #ccc;
    font-family: var(--font-body);
    font-size: 1.2rem;
}

/* Error Message */
.error-msg {
    color: var(--secondary-color);
    margin-top: 1rem;
    display: none;
    font-weight: bold;
}

/* Global Footer */
.global-footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: var(--sp-xl) 5% var(--sp-md);
    font-family: var(--font-body);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--sp-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.footer-col h3 {
    color: var(--accent-color);
    margin-bottom: var(--sp-md);
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.footer-col p {
    color: #bbb;
    font-size: 1.05rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    margin-top: var(--sp-xl);
    padding-top: var(--sp-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #888;
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .layout-overlap { grid-template-columns: 1fr; }
    .layout-overlap .overlap-content { transform: none; margin-top: -3rem; }
    .layout-masonry { column-count: 2; }
}

@media (max-width: 768px) {
    :root {
        --sp-xl: 4rem;
        --sp-lg: 3rem;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 2rem 5%;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        gap: 1.5rem;
    }
    .nav-links.active { display: flex; }
    .menu-toggle { display: block; }
    .layout-masonry { column-count: 1; }
    .layout-article .drop-cap::first-letter { font-size: 3.5rem; }
}
