/* --- CSS Reset & Variables --- */
:root {
    --primary-color: #2563eb;
    --text-color: #333;
    --bg-light: #f4f6f8;
    --bg-article: rgba(255, 255, 255, 0.77);
    --white: #ffffff;
    --transition: all 0.3s ease;
    --brand: #4f46e5;          /* Indigo-600 */
    --brand-600: #4338ca;      /* Indigo-700 */
    --text: #0f172a;           /* Slate-900 */
    --muted: #475569;          /* Slate-600 */
    --bg: #ffffff;
    --bg-elev: #ffffff;
    --border: #e2e8f0;         /* Slate-200 */
    --shadow: 0 10px 30px rgba(2, 6, 23, .12);
    --radius: 12px;
    --container: min(1200px, 92vw);
    --gutter: 1rem;
    --z-header: 50;
    --z-mega: 40;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

article {
    padding: 5px 10px 0 10px;
    background-color: var(--bg-article);
    border-radius: 10px;
}
.has-bg {
    background: linear-gradient(
            to bottom,
            transparent 0%,
            transparent 70%,
            rgba(0,0,0,0.6) 85%,
            rgba(0,0,0,0.9) 100%
    ), /* Image set via inline style */
    var(--body-bg) center/cover no-repeat fixed;
}

hr {
    margin: 40px auto 0;
    width: 20%;
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.75), rgba(255, 255, 255, 0));
}

ul {
    list-style: none;
}

.nav-list a {
    text-decoration: none;
    color: inherit;
}

/* --- Layout Utilities --- */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 15px;
}
.content-with-header-offset {
    margin-top: 70px;   /* header height */
}

/* --- Header Styling --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background-color: var(--bg-article);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.row {
    display: flex;
    flex-wrap: wrap;
}

.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }

.logo img {
    max-height: 70px;
}

/* --- Desktop Nav --- */
.nav-list {
    display: flex;
    margin-right: -15px;
}

.nav-list > li {
    padding: 0 15px;
}

.nav-list > li > a {
    font-size: 16px;
    font-weight: 500;
    display: block;
    color: var(--text-color);
    padding: 20px 0;
    transition: var(--transition);
}

.nav-list > li:hover > a {
    color: var(--primary-color);
}

/* --- Mega Menu Logic (Desktop) --- */
.nav-item-has-children {
    position: static; /* Important for full width */
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px);
    transition: var(--transition);
    border-top: 2px solid var(--primary-color);
}

/* Show Mega Menu on Hover */
.nav-item-has-children:hover .mega-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.mega-menu .row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 30px 0;
}

.mega-col h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.mega-col ul li {
    margin-bottom: 10px;
}

.mega-col ul li a {
    color: #666;
    font-size: 15px;
    transition: var(--transition);
}

.mega-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.mega-img img {
    width: 100%;
    border-radius: 5px;
    height: auto;
}

/* --- Mobile Nav Toggle (Hamburger) --- */
.nav-toggler {
    display: none;
    height: 34px;
    width: 44px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.nav-toggler span {
    display: block;
    height: 2px;
    width: 20px;
    background-color: var(--text-color);
    position: relative;
    margin: 0 auto;
    transition: var(--transition);
}

.nav-toggler span::before,
.nav-toggler span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--text-color);
    transition: var(--transition);
}

.nav-toggler span::before { top: -6px; }
.nav-toggler span::after { top: 6px; }

/* --- Hero Section --- */
.hero-section {
    height: 50rem;
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6));
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content {
    color: var(--white);
    max-width: 700px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: scale(1.05);
}

/* Features */
.features{
    padding-block: clamp(2rem, 6vw, 4rem);
}
.feature-grid{
    display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.feature{
    border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem;
    background: #fff;
}
.feature h3{ margin: .1rem 0 .25rem; font-size: 1.1rem; }
.feature p{ margin: 0; color: var(--muted); }

/* -------------------- Footer -------------------- */
.site-footer{
    border-top: 1px solid var(--border);
    padding-block: 2rem; color: var(--muted); font-size: .95rem;
}

/* -------------------- Accessibility & Motion -------------------- */
:focus-visible{ outline: 3px solid rgba(79,70,229,.55); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce){
    *, *::before, *::after{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* --- RESPONSIVE / ADAPTIVE --- */
@media (max-width: 991px) {
    .nav-toggler {
        display: block;
    }

    .nav {
        position: fixed;
        right: 0;
        top: 0;
        height: 100%;
        width: 280px;
        background-color: var(--white);
        z-index: 1000;
        padding: 60px 0;
        overflow-y: auto;
        transform: translateX(100%); /* Hide by default */
        transition: transform 0.5s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .nav.open {
        transform: translateX(0%); /* Slide in */
    }

    .nav-list {
        flex-direction: column;
        margin: 0;
    }

    .nav-list > li {
        padding: 0;
        border-bottom: 1px solid #eee;
    }

    .nav-list > li > a {
        padding: 15px 20px;
    }

    /* Convert Mega Menu to Accordion for Mobile */
    .mega-menu {
        position: relative;
        top: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        display: none; /* Hidden by default javascript handles slideToggle, or CSS hack */
        transform: none;
        padding: 0;
        background-color: #f9f9f9;
        border-top: none;
    }

    /* JavaScript will toggle this class */
    .mega-menu.active {
        display: block;
    }

    .mega-menu .row {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 0;
        padding: 0;
    }

    .mega-col {
        padding: 20px;
        border-bottom: 1px solid #eee;
    }

    .mega-img {
        display: none; /* Hide images on mobile to save space */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Article styling */
.page-content { margin-top:1rem; max-width: 1200px;}
.page-content h1 { margin-bottom:.75rem; font-size:2rem; color:#003344; }
.page-content p + p { margin-top:1rem; }
/* -------------------------------------------------
   Breadcrumb navigation – simple, responsive
   ------------------------------------------------- */
.breadcrumb-nav {
    margin: 1rem 0;
    font-size: 0.95rem;
}
.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    padding: 0;
    margin: 0;
}

li.breadcrumb-item {
    background-color: var(--bg-article);
    border-radius: 5px;
    padding: 4px;
}

.breadcrumb-item::after {
    content: "›";
    margin-left: .5rem;
    color: #777;
}
.breadcrumb-item:last-child::after {
    content: "";
}
.breadcrumb-item a {
    color: #004466;
    text-decoration: none;
}
.breadcrumb-item a:hover {
    text-decoration: underline;
}
.breadcrumb-item.active span {
    color: #555;
    font-weight: 600;
}

figure {
    display: grid;
    place-items: center;  /* Shorthand for align/justify-items: center */
    grid-template-rows: auto 1fr auto;  /* For img + optional caption */
}

/*Section block*/
.section-blocks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);  /* Exactly 4 columns */
    gap: 1.5rem;
    padding: 2rem 0;
    max-width: 1400px;  /* Optional: constrain width */
    margin: 0 auto;
}
@media (max-width: 1200px) {
    .section-blocks {
        grid-template-columns: repeat(3, 1fr);  /* 3 on tablet */
    }
}
@media (max-width: 768px) {
    .section-blocks {
        grid-template-columns: 1fr;  /* 1 column mobile */
        gap: 1rem;
    }
    .block-card {
        height: 200px;  /* Smaller on mobile */
    }
}
/* Rest of .block-card styles unchanged */
.block-card {
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: block;
    background-size: cover;
    background-position: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.block-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.block-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 2rem 1.5rem 1.5rem;
    backdrop-filter: blur(1px);
}
.block-overlay h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}
.block-overlay p {
    margin: 0 0 1rem 0;
    opacity: 0.9;
}
.read-more {
    font-size: 0.9rem;
    opacity: 0.9;
}