/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --brand-red: #C8102E; /* Primary Brand Red */
    --brand-dark-red: #900020;
    --brand-cream: #FFF8E7; /* Light beige bg */
    --brand-text: #222;
    --font-main: 'Montserrat', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

body {
    font-family: var(--font-main);
    color: var(--brand-text);
    background-color: #fff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 700;
}

/* =========================================
   2. NAVBAR
   ========================================= */
.navbar {
    transition: all 0.4s ease;
    padding: 1.2rem 0;
    z-index: 1000;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.8rem 0;
}

/* Brand Logo Styles */
.brand-box {
    background: var(--brand-red); 
    width: 45px; height: 45px; 
    display: flex; align-items: center; justify-content: center; 
    color: white; font-weight: bold; font-size: 1.2rem;
    margin-right: 10px;
}

.navbar-brand span { display: block; }
.brand-title { font-size: 1.1rem; font-weight: 600; letter-spacing: 0.5px; }
.brand-subtitle { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1px; }
.brand-text { font-size: 1.75em; letter-spacing:3px }
.brand-text-sub { font-size: .72em; }

/* Nav Links */
.nav-link {
    color: #fff !important;
    font-weight: 500; text-transform: uppercase;
    font-size: 0.8rem; letter-spacing: 1.5px;
    margin-left: 1.5rem; position: relative;
    transition: color 0.3s;
}

.navbar.scrolled .nav-link { color: #333 !important; }

/* Nav Hover Underline */
.nav-link::after {
    content: ''; position: absolute;
    width: 0; height: 2px; bottom: -5px; left: 0;
    background-color: var(--brand-red); transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }

/* --- Active Nav State (Red Box) --- */
.navbar .nav-link.active {
    background-color: var(--brand-red);
    color: #fff !important;
    border-radius: 4px;
    padding: 0.5rem 1rem; /* Add padding to create the box shape */
    margin-left: 1rem;    /* Adjust margin since padding makes it wider */
}

/* Remove the underline effect for the active button */
.navbar .nav-link.active::after {
    display: none; 
}

/* Ensure it stays readable when navbar is scrolled (white background) */
.navbar.scrolled .nav-link.active {
    color: #fff !important; /* Keep text white even on white navbar */
    background-color: var(--brand-red);
}

/* --- Dropdown Styling --- */
.dropdown-menu {
    border-radius: 4px;
    padding: 0;
    margin-top: 10px; /* Slight gap from nav for aesthetics */
    overflow: hidden; /* Keeps borders sharp */
}

.dropdown-item {
    padding: 12px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--brand-text);
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* Hover Effect: Red Background with White Text */
.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--brand-red);
    color: #fff;
}

/* --- Default Brand Text Color (White by default for Homepage) --- */
.brand-text-container {
    color: #fff;
    transition: color 0.3s ease;
}

/* --- Scrolled State (Already exists, but ensuring it overrides) --- */
.navbar.scrolled .brand-text-container {
    color: #222 !important;
}

/* =========================================
   INNER PAGES (Articles) - FORCE DARK TEXT
   ========================================= */
.navbar.text-dark-nav .brand-text-container {
    color: #222 !important;
}

.navbar.text-dark-nav .nav-link {
    color: #222 !important;
}

/* Add a bottom border so the white nav stands out against the white page */
.navbar.text-dark-nav {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Ensure the Mobile Menu Hamburger is dark too */
.navbar.text-dark-nav .navbar-toggler-icon {
    filter: invert(0) !important; /* Makes the icon black */
}

/* Mobile Dropdown Adjustments */
@media (max-width: 991px) {
    .dropdown-menu {
        background-color: #f9f9f9;
        box-shadow: none;
        margin-top: 0;
        padding-left: 20px; /* Indent sub-items on mobile */
        border-left: 2px solid var(--brand-red); /* Visual indicator */
    }
    .dropdown-item {
        border-bottom: none;
        padding: 10px 0;
        color: #555;
    }
    .dropdown-item:hover {
        background-color: transparent;
        color: var(--brand-red);
        font-weight: 700;
    }
}

/* Mobile Nav Adjustments */
@media (max-width: 768px) {
    .navbar-collapse {
        background: #fff;
        padding: 1rem; margin-top: 1rem;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        border-radius: 8px;
    }
    .nav-link {
        color: #333 !important;
        margin-left: 0; padding: 0.8rem 0;
        border-bottom: 1px solid #eee;
    }
}

/* =========================================
   3. COMPONENTS (Buttons, Cards, Inputs)
   ========================================= */
.btn-brand {
    background-color: var(--brand-red);
    color: #fff; border: none;
    padding: 0.8rem 2rem;
    text-transform: uppercase; font-weight: 600; font-size: 0.85rem;
    border-radius: 0 4px 4px 0; transition: background 0.3s;
}

.btn-brand:hover {
    background-color: var(--brand-dark-red);
    color: #fff;
}

.newsletter-box {
    display: flex; gap: 0; margin-top: 2.5rem; flex-wrap: wrap;
}
.newsletter-box input {
    border-radius: 4px 0 0 4px; border: 1px solid #ccc; padding: 0.8rem;
}

/* Mobile Component Adjustments */
@media (max-width: 768px) {
    .btn-brand { width: 100%; border-radius: 4px; margin-top: 10px; }
    .newsletter-box input { width: 100%; border-radius: 4px; }
}

/* =========================================
   4. REUSABLE SECTIONS (Gallery & News)
   ========================================= */
/* Gallery Grid */
.gallery-item { position: relative; overflow: hidden; height: 450px; }
.gallery-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.gallery-item:hover .gallery-img { transform: scale(1.15); }

.gallery-text {
    background-color: #f8f9fa;
    display: flex; flex-direction: column; justify-content: center;
    padding: 4rem; height: 450px;
}
.gallery-text.red-bg { background-color: var(--brand-red); color: #fff; }
.gallery-text h3 { text-transform: uppercase; font-size: 1.8rem; margin-bottom: 1.5rem; }
.gallery-text p { font-size: 1rem; line-height: 1.6; }

.learn-more-link {
    margin-top: 2rem; text-transform: uppercase; font-weight: 700;
    text-decoration: none; color: inherit; display: inline-block;
    border-bottom: 2px solid currentColor;
    width: fit-content; padding-bottom: 2px; transition: opacity 0.3s;
}
.learn-more-link:hover { opacity: 0.7; }

/* News Section */
.news-section { background-color: var(--brand-cream); padding: 5rem 0 7rem 0; }
.news-card { background: transparent; border: none; margin-bottom: 2rem; cursor: pointer; }
.news-img {
    background-color: #fff; height: 220px; width: 100%; margin-bottom: 1.2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: transform 0.3s;
    background-image: url('https://placehold.co/400x300/white/eee?text=News+Thumb');
    background-size: cover;
}
.news-card:hover .news-img { transform: translateY(-5px); box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
.news-title { font-weight: 700; text-transform: uppercase; font-size: 0.95rem; margin-bottom: 0.5rem; }
.read-more { font-style: italic; color: #555; font-size: 0.9rem; text-decoration: none; font-family: var(--font-serif); }

/* Mobile Gallery Adjustments */
@media (max-width: 768px) {
    .gallery-item, .gallery-text { height: auto; min-height: 350px; padding: 2.5rem; }
}

/* =========================================
   5. FOOTER
   ========================================= */
.social-strip { background-color: var(--brand-red); color: #fff; padding: 1.5rem 0; }
.social-icon {
    font-size: 1.2rem; width: 35px; height: 35px; background: #fff; color: var(--brand-red);
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; margin: 0 5px; transition: 0.3s;
}
.social-icon:hover { background: #222; color: #fff; }

.footer-main { background-color: #f4f4f4; padding: 5rem 0; }
.map-container img { width: 100%; height: auto; border: 1px solid #ccc; }
.contact-row { margin-bottom: 1rem; display: flex; align-items: flex-start; }
.contact-row i { width: 30px; margin-top: 5px; color: var(--brand-red); }
 
.copyright-strip { background-color: #fff; padding: 2rem 0; font-size: 0.75rem; color: #666; border-top: 1px solid #e9e9e9; }

/* =========================================
   6. ANIMATIONS
   ========================================= */
.fade-up {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }