/* --- VARIABLES & RESET --- */
:root {
    --primary-red: #8B0000;
    --primary-green: #006400;
    --accent-gold: #DAA520;
    --text-dark: #333333;
    --text-light: #f4f4f4;
    --bg-white: #ffffff;
    --bg-off-white: #f9f9f9;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --border-radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-off-white);
    line-height: 1.6;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--primary-green); }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- UTILITIES --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.btn-primary { background: var(--primary-red); color: white; }
.btn-primary:hover { background: #660000; }
.btn-secondary { background: var(--accent-gold); color: var(--text-dark); }
.btn-secondary:hover { background: #b8860b; }
.section-padding { padding: 60px 0; }
.text-center { text-align: center; }

/* Subtle Edo Pattern Background */
.edo-pattern {
    background-image: radial-gradient(var(--accent-gold) 1px, transparent 1px);
    background-size: 20px 20px;
    background-color: var(--bg-off-white);
}

/* --- HEADER & NAVIGATION --- */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary-red); display: flex; align-items: center; gap: 10px; }
.logo span { color: var(--primary-green); }
.logo img {
    height: 45px;      /* Controls logo size */
    width: auto;       /* Keeps proportions */
    max-width: 150px;  /* Safety limit */
    object-fit: contain;
}


.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links li { position: relative; }
.nav-links a { font-weight: 500; font-size: 1rem; }
.nav-links a:hover { color: var(--primary-red); }

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: var(--shadow);
    min-width: 200px;
    display: none;
    border-top: 3px solid var(--accent-gold);
}
.nav-links li:hover .dropdown-menu { display: block; }
.dropdown-menu li { border-bottom: 1px solid #eee; }
.dropdown-menu a { display: block; padding: 10px 15px; font-size: 0.9rem; }

/* Mobile Menu Toggle */
.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(rgba(0,100,0,0.7), rgba(139,0,0,0.7)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}
.hero h1 { font-size: 3rem; margin-bottom: 20px; color: var(--accent-gold); text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero p { font-size: 1.2rem; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* --- CARDS & GRID --- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s;
    border-bottom: 4px solid var(--primary-green);
}
.card:hover { transform: translateY(-5px); }
.card-body { padding: 20px; }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-date { color: var(--primary-red); font-weight: bold; font-size: 0.9rem; margin-bottom: 5px; }

/* --- FORMS --- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
}
.form-control:focus { border-color: var(--primary-green); outline: none; }

/* --- FOOTER --- */
footer {
    background: #1a1a1a;
    color: white;
    padding: 50px 0 20px;
    margin-top: auto;
}
footer h3 { color: var(--accent-gold); margin-bottom: 20px; }
footer ul li { margin-bottom: 10px; }
footer a:hover { color: var(--accent-gold); }
.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: var(--shadow);
    }
    .nav-links.active { display: flex; }
    .nav-links li { width: 100%; }
    .dropdown-menu { position: static; display: none; box-shadow: none; padding-left: 20px; border: none; }
    .nav-links li:hover .dropdown-menu { display: block; }
    .hero h1 { font-size: 2rem; }
}
@media (max-width: 768px) {
    .logo img {
        height: 38px;
    }
}


/* --- GALLERY LIGHTBOX --- */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; z-index: 2000;
}
.lightbox img { max-height: 90%; max-width: 90%; border: 3px solid var(--bg-white); }
.lightbox.active { display: flex; }


/* =========================================
   ===== RESPONSIVE ENHANCEMENTS (ADDED) =====
   ========================================= */

/* --- 1. Fluid Typography (Clamp) --- */
/* Ensures fonts scale smoothly on all devices */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
p  { font-size: clamp(1rem, 1.5vw, 1.1rem); }

/* --- 2. Mobile Phones (Max 480px) --- */
@media (max-width: 480px) {
    
    /* Fix Container Padding */
    .container {
        padding: 0 15px; 
    }

    /* Fix Grid Overflow */
    /* The original minmax(300px) is too wide for 320px phones. This forces 1 column. */
    .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Hero Section Adjustments */
    .hero {
        height: auto;
        min-height: 60vh; /* Allow text to grow if needed */
        padding: 80px 0;
        background-attachment: scroll; /* Fixes background jitter on mobile */
    }
    
    .hero h1 {
        line-height: 1.2;
    }

    /* Mobile Navigation Fixes */
    /* Ensures the dropdown logic (if any JS is used) stacks correctly */
    .nav-links {
        overflow-y: auto;
        max-height: 80vh; /* Prevents menu from being cut off on short screens */
    }

    /* Footer Stacking */
    footer .grid-3, 
    footer .grid-4 {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    footer {
        padding: 40px 0;
    }
}

/* --- 3. Tablet (481px - 900px) --- */
@media (min-width: 481px) and (max-width: 900px) {
    .container {
        padding: 0 30px;
    }
    
    /* Adjust grid for tablets to prevent squashed columns */
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- 4. Large Screens (1600px+) --- */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px; /* Expands content on wide screens */
    }
}

.gallery-item img, 
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    opacity: 0.9;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox video, .lightbox img {
    max-width: 90%;
    max-height: 85vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Ensure the grid is responsive */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr; /* Stack on mobile */
    gap: 30px;
    align-items: center;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr; /* Side-by-side on tablet/desktop */
        gap: 50px;
    }
}

/* Make sure images always fill their container width */
.about-image img {
    width: 100%;
    height: auto;
    display: block;
}