/* ==========================================
   CSC RO VIII GAD CORNER - EXTERNAL STYLESHEET
   Bootstrap 5.3 | Government-Grade Design
   PCW MC 2025-05 Compliant — v2.1 (Refined)
   ========================================== */

/* CSS CUSTOM PROPERTIES - DESIGN SYSTEM */
:root {
    /* GAD Color Palette - Primary */
    --gad-purple:       #7030A0;
    --gad-purple-dark:  #5a2472;
    --gad-purple-light: #8e44ad;
    --gad-purple-pale:  #d4b5e8;
    --gad-purple-ghost: #f3ebf9;
    --gad-purple-dim:   rgba(112, 48, 160, 0.12);

    /* Government Blue - CSC Brand */
    --csc-blue:       #003d79;
    --csc-blue-dark:  #002a54;
    --csc-blue-light: #005ba8;

    /* Neutral Palette */
    --neutral-100: #ffffff;
    --neutral-200: #f8f9fa;
    --neutral-300: #e9ecef;
    --neutral-400: #dee2e6;
    --neutral-500: #adb5bd;
    --neutral-600: #6c757d;
    --neutral-700: #495057;
    --neutral-800: #343a40;
    --neutral-900: #212529;

    /* Semantic Colors */
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color:  #dc3545;
    --info-color:    #0dcaf0;

    /* Typography */
    --font-serif: 'Poppins', 'Segoe UI', Tahoma, sans-serif;
    --font-sans:  'Poppins', 'Segoe UI', Tahoma, sans-serif;

    /* Spacing System */
    --spacing-xs:  0.5rem;
    --spacing-sm:  1rem;
    --spacing-md:  1.5rem;
    --spacing-lg:  2rem;
    --spacing-xl:  3rem;
    --spacing-xxl: 4rem;

    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;

    /* Shadows */
    --shadow-sm:     0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md:     0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg:     0 8px 24px rgba(0, 0, 0, 0.16);
    --shadow-purple: 0 4px 16px rgba(112, 48, 160, 0.22);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* ==========================================
   BASE STYLES & TYPOGRAPHY
   ========================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--neutral-800);
    background-color: #ebebf0;
    overflow-x: hidden;
    padding-top: 56px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.3;
    color: var(--neutral-900);
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

p { margin-bottom: var(--spacing-sm); }

a {
    color: var(--gad-purple);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--gad-purple-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   ACCESSIBILITY — SKIP TO MAIN CONTENT
   ========================================== */

.skip-link {
    position: fixed !important;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    background-color: var(--gad-purple);
    color: var(--neutral-100) !important;
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-sans);
    text-decoration: none !important;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--gad-purple-pale);
    border-top: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: top 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.22s ease;
    outline: none;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0 !important;
    box-shadow: 0 4px 24px rgba(112, 48, 160, 0.45);
    outline: 3px solid var(--gad-purple-pale);
    outline-offset: 0;
    color: var(--neutral-100) !important;
}

/* ==========================================
   GLOBAL FOCUS RING
   ========================================== */

:focus-visible {
    outline: 3px solid var(--gad-purple);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================
   PRIMARY NAVIGATION
   ========================================== */

.primary-nav {
    background-color: var(--gad-purple);
    box-shadow: var(--shadow-md);
    /* padding: 0.5rem 0; */
    z-index: 1030;
}

.navbar-brand {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--neutral-100) !important;
    letter-spacing: 0.5px;
    transition: var(--transition-base);
}

.navbar-brand:hover {
    color: var(--gad-purple-pale) !important;
    transform: translateX(3px);
}

.primary-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.primary-nav .nav-link:hover,
.primary-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--neutral-100) !important;
}

.primary-nav .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.primary-nav .dropdown-item {
    padding: 0.6rem 1.2rem;
    transition: var(--transition-fast);
    font-weight: 500;
}

.primary-nav .dropdown-item:hover {
    background-color: var(--gad-purple-ghost);
    color: var(--gad-purple-dark);
}

/* ==========================================
   HEADER SECTION — Enhanced
   Uses only defined CSS custom properties.
   Replace the existing HEADER SECTION block
   in gad-corner.css with this entire block.
   ========================================== */

.gad-header {
    background-color: var(--gad-purple-dark);
    background-image:
        /* Diagonal shimmer highlight — top left */
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.04) 0%,
            transparent 40%
        ),
        /* Warm radial glow — bottom left */
        radial-gradient(
            ellipse 75% 55% at 0% 100%,
            rgba(142, 68, 173, 0.35) 0%,
            transparent 65%
        ),
        /* Cool deep radial — top right */
        radial-gradient(
            ellipse 55% 45% at 100% 0%,
            rgba(90, 36, 114, 0.55) 0%,
            transparent 60%
        ),
        /* Base: dark purple → gad-purple → purple-dark */
        linear-gradient(
            120deg,
            var(--gad-purple-dark) 0%,
            var(--gad-purple)      45%,
            var(--gad-purple-dark) 100%
        );

    padding: var(--spacing-sm) 0;
    position: relative;
    overflow: hidden;

    /* Bottom accent: gradient stripe using palette colors */
    border-bottom: 4px solid var(--gad-purple);
    border-image: linear-gradient(
        to right,
        var(--gad-purple-dark) 0%,
        var(--gad-purple)      30%,
        var(--gad-purple-pale) 55%,
        var(--gad-purple)      75%,
        var(--gad-purple-dark) 100%
    ) 1;
}

/* ── Dot-grid texture overlay ─────────────────────────── */
.gad-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.06) 1px,
        transparent 1px
    );
    background-size: 26px 26px;
    pointer-events: none;
    z-index: 0;
}

/* ── Large circle accent — top right ──────────────────── */
.gad-header::after {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1.5px solid rgba(212, 181, 232, 0.12);
    box-shadow:
        0 0 0  45px rgba(112, 48, 160, 0.05),
        0 0 0  90px rgba(112, 48, 160, 0.025);
    pointer-events: none;
    z-index: 0;
}

/* ── Diagonal ribbon stripes (only on --bg variant) ───── */
.gad-header--bg {
    background-image:
        linear-gradient(
            -58deg,
            transparent 0%,            transparent 58%,
            rgba(255,255,255,0.022) 58%, rgba(255,255,255,0.022) 60%,
            transparent 60%,            transparent 66%,
            rgba(255,255,255,0.015) 66%, rgba(255,255,255,0.015) 68%,
            transparent 68%
        ),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.04) 0%,
            transparent 40%
        ),
        radial-gradient(
            ellipse 75% 55% at 0% 100%,
            rgba(142, 68, 173, 0.35) 0%,
            transparent 65%
        ),
        radial-gradient(
            ellipse 55% 45% at 100% 0%,
            rgba(90, 36, 114, 0.55) 0%,
            transparent 60%
        ),
        linear-gradient(
            120deg,
            var(--gad-purple-dark) 0%,
            var(--gad-purple)      45%,
            var(--gad-purple-dark) 100%
        );
}

.gad-header .container-fluid {
    position: relative;
    z-index: 1;
}

/* ==========================================
   LOGOS
   ========================================== */

.header-logos-group {
    padding-right: var(--spacing-sm);
}

.header-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45)) brightness(1.05);
    transition: var(--transition-base);
}

.header-logo:hover {
    transform: scale(1.07);
    filter: drop-shadow(var(--shadow-purple)) brightness(1.1);
}

.logo-divider {
    width: 1px;
    height: 70px;
    flex-shrink: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(212, 181, 232, 0.35) 30%,
        rgba(212, 181, 232, 0.35) 70%,
        transparent 100%
    );
}

/* ==========================================
   HEADER TEXT
   ========================================== */

.header-content { text-align: left; }

.republic-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.2rem;
}

.agency-name {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--neutral-100);
    margin-bottom: 0.1rem;
    letter-spacing: 0.3px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.gad-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--gad-purple-pale);
    margin-bottom: 0.2rem;
    line-height: 1.3;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.regional-office {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 767px) {
    .gad-header .d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm) !important;
    }
    .header-logos-group {
        flex-direction: row !important;
        align-items: center;
        align-self: flex-start;
    }
    .header-content { text-align: left; width: 100%; }
    .logo-divider { height: 54px; }
    .header-logo  { width: 64px; height: 64px; }
    .agency-name  { font-size: 1.35rem; }
    .gad-title    { font-size: 1.05rem; }
}

@media (max-width: 400px) {
    .header-logo  { width: 52px; height: 52px; }
    .logo-divider { height: 44px; }
    .agency-name  { font-size: 1.15rem; }
    .gad-title    { font-size: 0.95rem; }
}

/* ==========================================
   SECONDARY NAVIGATION
   ========================================== */

.secondary-nav {
    background-color: var(--neutral-100);
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 0;
    border-bottom: 2px solid var(--gad-purple-pale);
}

.secondary-nav .nav-link {
    color: var(--neutral-700) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    margin: 0 0.3rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.secondary-nav .nav-link i { font-size: 1.1rem; }

.secondary-nav .nav-link:hover,
.secondary-nav .nav-link.active {
    background-color: var(--gad-purple-ghost);
    color: var(--gad-purple) !important;
}

.secondary-nav .dropdown-menu {
    border: 1px solid var(--neutral-300);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
}

.secondary-nav .dropdown-item {
    padding: 0.6rem 1.2rem;
    transition: var(--transition-fast);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-nav .dropdown-item i {
    font-size: 1rem;
    color: var(--gad-purple);
}

.secondary-nav .dropdown-item:hover {
    background-color: var(--gad-purple-ghost);
    color: var(--gad-purple-dark);
}

/* ==========================================
   MAIN CONTENT
   ========================================== */

.main-content {
    padding: 0;
    min-height: 60vh;
}

/* ==========================================
   CAROUSEL SECTION
   ========================================== */

.carousel-section {
    margin-bottom: 0;
    background-color: var(--neutral-900);
}

.carousel-inner {
    border-radius: 0;
}

.carousel-item {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Slight desaturation so the purple tint reads consistently
       regardless of the source photo's colour temperature          */
    filter: saturate(0.85) brightness(0.92);
    transition: filter 0.4s ease;
}

/*
 * CAROUSEL OVERLAY — Three-layer approach
 * ─────────────────────────────────────────────────────────────────
 * Layer 1  (.carousel-item::before)
 *   Flat purple colour-wash at low opacity.
 *   Tints the entire image with #7030A0 without hiding it,
 *   ties every photo to the GAD theme.
 *
 * Layer 2  (.carousel-item::after)
 *   Directional dark gradient — transparent at the top,
 *   deepening toward the bottom where the caption lives.
 *   Maximises contrast for the headline text without
 *   making the upper image area look muddy.
 *
 * Layer 3  (caption text-shadow)
 *   Tight drop-shadow on the heading itself as a final
 *   safety net for edge-case bright images.
 *
 * Net effect: photo is still clearly visible and vibrant;
 * the caption zone is dark enough for WCAG AA contrast;
 * every slide shares the same purple brand identity.
 * ─────────────────────────────────────────────────────────────────
 */

/* Layer 1 — purple colour wash */
.carousel-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: rgba(112, 48, 160, 0.28);   /* #7030A0 at 28% */
    pointer-events: none;
}

/* Layer 2 — bottom-to-top darkening gradient */
.carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(30,  10, 50, 0.00)  0%,    /* top  — fully transparent   */
        rgba(40,  10, 60, 0.10) 35%,    /* mid  — very light          */
        rgba(60,  15, 90, 0.55) 68%,    /* lower-mid — noticeable     */
        rgba(45,   8, 70, 0.82) 88%,    /* near-bottom — strong       */
        rgba(30,   5, 50, 0.92) 100%    /* bottom — near-opaque       */
    );
    pointer-events: none;
}

/* Caption sits above both overlay layers */
.carousel-caption {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    width: min(800px, 90%);
    padding: var(--spacing-lg);
}

.carousel-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: rgba(112, 48, 160, 0.75);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(212, 181, 232, 0.4);
    backdrop-filter: blur(4px);
}

.carousel-caption h3 {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--neutral-100);
    /* Layer 3 — text-shadow safety net */
    text-shadow:
        0 2px 16px rgba(30, 5, 50, 0.85),
        0 1px  4px rgba(0,  0,  0, 0.60);
    margin-bottom: var(--spacing-sm);
    animation: fadeInUp 0.8s ease both;
}

.carousel-caption p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 8px rgba(30, 5, 50, 0.75);
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 1s ease 0.1s both;
}

.btn-carousel-cta {
    background-color: var(--gad-purple);
    color: var(--neutral-100);
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1.05rem;
    border: 2px solid rgba(212, 181, 232, 0.5);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    box-shadow: 0 4px 20px rgba(112, 48, 160, 0.5);
    animation: fadeInUp 1.2s ease 0.2s both;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-carousel-cta:hover {
    background-color: var(--neutral-100);
    color: var(--gad-purple-dark);
    border-color: var(--neutral-100);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(112, 48, 160, 0.55);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Carousel Indicators ── */
.carousel-indicators {
    margin-bottom: 1.25rem;
    gap: 6px;
    z-index: 10;
}

.carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    margin: 0;
    transition: var(--transition-base);
    flex-shrink: 0;
}

.carousel-indicators .active {
    width: 28px;
    border-radius: 4px;
    background-color: var(--gad-purple);
}

/* ── Carousel Controls ── */
.carousel-control-prev,
.carousel-control-next {
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    margin: 0 1rem;
    opacity: 1;
    border-radius: 50%;
    background-color: rgba(90, 36, 114, 0.72);
    backdrop-filter: blur(6px) saturate(1.4);
    -webkit-backdrop-filter: blur(6px) saturate(1.4);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: background-color 0.2s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease,
                border-color 0.2s ease;
    z-index: 10;
}

.carousel-control-prev { left: 0; }
.carousel-control-next { right: 0; }

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: var(--gad-purple);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 24px rgba(112, 48, 160, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.carousel-control-prev:focus-visible,
.carousel-control-next:focus-visible {
    outline: 3px solid var(--gad-purple-pale);
    outline-offset: 3px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 18px;
    height: 18px;
    background-image: none !important;
    background-color: transparent;
    border-radius: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control-prev-icon::after,
.carousel-control-next-icon::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-top:   2.5px solid #fff;
    border-right: 2.5px solid #fff;
    border-radius: 1px;
}

.carousel-control-prev-icon::after {
    transform: rotate(-135deg) translate(-1px, 1px);
}

.carousel-control-next-icon::after {
    transform: rotate(45deg) translate(-1px, 1px);
}

/* ==========================================
   CONTENT SECTION
   ========================================== */

.content-section {
    padding: var(--spacing-xl) 0;
    background-color: #ebebf0;
}

/* ==========================================
   ACTION BUTTONS PANEL
   ========================================== */

.action-buttons-panel {
    background-color: var(--neutral-100);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 80px;
    border-top: 4px solid var(--gad-purple);
}

.panel-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gad-purple);
    margin-bottom: var(--spacing-md);
    padding-bottom: 0.875rem;
    border-bottom: 2px solid var(--gad-purple-pale);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-button {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background-color: var(--neutral-200);
    padding: var(--spacing-md);
    margin-bottom: 0.875rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--neutral-300);
    transition: background-color 0.25s ease,
                border-color 0.25s ease,
                box-shadow 0.25s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                color 0.25s ease;
    text-decoration: none;
    color: var(--neutral-800);
}

.action-button:last-of-type { margin-bottom: 0; }

.action-button:hover {
    background-color: var(--gad-purple-ghost);
    border-color: var(--gad-purple);
    box-shadow: var(--shadow-purple);
    transform: translateX(5px);
    text-decoration: none;
    color: var(--gad-purple-dark);
}

.action-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gad-purple);
    border-radius: var(--radius-md);
    color: var(--neutral-100);
    font-size: 1.5rem;
    transition: background-color 0.25s ease,
                transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-button:hover .action-icon {
    background-color: var(--gad-purple-dark);
    transform: rotate(6deg) scale(1.1);
}

.action-content { flex: 1; min-width: 0; }

.action-content h5 {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.action-content p {
    font-size: 0.875rem;
    color: var(--neutral-600);
    margin-bottom: 0;
    line-height: 1.5;
}

.action-arrow {
    flex-shrink: 0;
    font-size: 1.35rem;
    color: var(--gad-purple);
    opacity: 0.7;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.action-button:hover .action-arrow {
    transform: translateX(4px);
    opacity: 1;
}

/* ==========================================
   MISSION PANEL
   ========================================== */

.mission-panel {
    background-color: var(--csc-blue-dark);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    color: var(--neutral-100);
    margin-top: var(--spacing-md);
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--gad-purple);
}

.mission-icon {
    font-size: 2rem;
    margin-bottom: 0.625rem;
    color: var(--gad-purple-pale);
    line-height: 1;
}

.mission-panel h5 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neutral-100);
    margin-bottom: 0.625rem;
}

.mission-panel p {
    font-size: 0.875rem;
    line-height: 1.75;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.88);
}

/* ==========================================
   NEWS SECTION
   ========================================== */

.news-section {
    background-color: var(--neutral-100);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--csc-blue);
}

.section-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--neutral-300);
}

.section-header h3 {
    font-family: var(--font-serif);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

.header-accent {
    width: 52px;
    height: 4px;
    background-color: var(--gad-purple);
    border-radius: var(--radius-sm);
    margin-top: 0.25rem;
}

/* ==========================================
   NEWS ARTICLES
   ========================================== */

.news-article {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--neutral-300);
    background-color: var(--neutral-100);
    transition: box-shadow 0.3s ease,
                border-color 0.3s ease,
                transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.news-article:last-child { margin-bottom: 0; }

.news-article:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--gad-purple-pale);
    transform: translateY(-3px);
}

.news-image {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100%;
    min-height: 180px;
}

.news-image img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-article:hover .news-image img {
    transform: scale(1.06);
}

.news-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--gad-purple);
    color: var(--neutral-100);
    padding: 0.3rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: var(--shadow-md);
    line-height: 1.4;
}

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--warning-color);
    color: var(--neutral-900);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1.4;
}

.news-content {
    padding: 0.25rem 0 0.25rem var(--spacing-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-content h4 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.625rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.news-article:hover .news-content h4 {
    color: var(--gad-purple);
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--neutral-600);
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.news-meta i { color: var(--gad-purple); }

.news-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--neutral-700);
    margin-bottom: var(--spacing-md);
    flex: 1;
}

.btn-view-more {
    background-color: var(--gad-purple);
    color: var(--neutral-100);
    padding: 0.55rem 1.375rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
}

.btn-view-more:hover {
    background-color: var(--gad-purple-dark);
    color: var(--neutral-100);
    transform: translateX(3px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.btn-view-more i { transition: transform 0.2s ease; }
.btn-view-more:hover i { transform: translateX(3px); }

.empty-state {
    text-align: center;
    padding: var(--spacing-xxl) var(--spacing-lg);
    color: var(--neutral-600);
}

.empty-icon {
    font-size: 3.5rem;
    color: var(--gad-purple-pale);
    margin-bottom: var(--spacing-sm);
    line-height: 1;
}

.empty-state h5 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neutral-700);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.95rem;
    margin: 0;
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */

.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 46px;
    height: 46px;
    background-color: var(--gad-purple);
    color: var(--neutral-100);
    border: 2px solid transparent;
    border-radius: 50%;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.9);
    transition: opacity 0.3s ease,
                visibility 0.3s ease,
                transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease;
    z-index: 1040;
    box-shadow: 0 4px 14px rgba(112, 48, 160, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    outline: none;
}

.back-to-top::before {
    content: 'Back to top';
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--neutral-900);
    color: var(--neutral-100);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    letter-spacing: 0.3px;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background-color: var(--gad-purple-dark);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 22px rgba(112, 48, 160, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.06) !important;
}

.back-to-top:hover::before { opacity: 1; }

.back-to-top:focus-visible {
    outline: 3px solid var(--gad-purple-pale);
    outline-offset: 3px;
    background-color: var(--gad-purple-dark);
}

/* ==========================================
   FOOTER
   ========================================== */

.gad-footer {
    background-color: var(--neutral-900);
    color: var(--neutral-300);
    margin-top: var(--spacing-xxl);
}

.footer-main {
    padding: var(--spacing-xl) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-heading {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neutral-100);
    margin-bottom: var(--spacing-md);
    padding-bottom: 0.625rem;
    border-bottom: 3px solid var(--gad-purple);
    display: inline-block;
}

.footer-text {
    font-size: 0.925rem;
    line-height: 1.75;
    color: var(--neutral-400);
    margin-bottom: var(--spacing-md);
}

.footer-logos {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    align-items: center;
}

.footer-logo {
    max-width: 72px;
    opacity: 0.85;
    transition: var(--transition-base);
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35));
}

.footer-logo:hover {
    opacity: 1;
    transform: scale(1.06);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: var(--neutral-400);
    text-decoration: none;
    font-size: 0.925rem;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a i {
    font-size: 0.75rem;
    color: var(--gad-purple);
    transition: transform 0.2s ease;
}

.footer-links a:hover {
    color: var(--gad-purple-pale);
    text-decoration: none;
    transform: translateX(5px);
}

.footer-links a:hover i { transform: translateX(3px); }

.footer-contact p {
    margin-bottom: 0.75rem;
    font-size: 0.925rem;
    line-height: 1.65;
    color: var(--neutral-400);
}

.footer-contact p:last-child { margin-bottom: 0; }

.footer-contact i {
    color: var(--gad-purple);
    margin-right: 0.5rem;
    width: 1em;
    display: inline-block;
    text-align: center;
}

.footer-contact strong { color: var(--neutral-300); }

.footer-contact a {
    color: var(--gad-purple-pale);
    text-decoration: none;
}

.footer-contact a:hover {
    color: var(--neutral-100);
    text-decoration: underline;
}

.footer-bottom {
    padding: var(--spacing-md) 0;
    background-color: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-copyright,
.footer-compliance {
    margin: 0;
    font-size: 0.875rem;
    color: var(--neutral-500);
    line-height: 1.6;
}

.footer-compliance i {
    color: var(--gad-purple);
    margin-right: 0.25rem;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 991px) {
    .carousel-item { height: 440px; }

    .carousel-caption h3 { font-size: 1.9rem; }
    .carousel-caption p  { font-size: 1rem; }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 0.5rem;
    }

    .action-buttons-panel {
        position: static;
        margin-bottom: var(--spacing-lg);
    }

    .agency-name { font-size: 1.8rem; }
    .gad-title   { font-size: 1.5rem; }
}

@media (max-width: 767px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }

    .carousel-item { height: 340px; }

    .carousel-caption {
        bottom: 8%;
        padding: var(--spacing-sm);
    }

    .carousel-caption h3 { font-size: 1.4rem; }
    .carousel-caption p  { font-size: 0.9rem; display: none; }

    .btn-carousel-cta {
        padding: 0.6rem 1.375rem;
        font-size: 0.95rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 36px;
        height: 36px;
        margin: 0 0.35rem;
    }

    .carousel-control-prev-icon::after,
    .carousel-control-next-icon::after {
        width: 8px;
        height: 8px;
    }

    .agency-name { font-size: 1.5rem; }
    .gad-title   { font-size: 1.3rem; }

    .news-content {
        padding: var(--spacing-sm) 0 0 0;
    }

    .news-image img { min-height: 200px; }

    .action-button {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .action-arrow { display: none; }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }

    .back-to-top::before { display: none; }

    .footer-main { text-align: center; }
    .footer-logos { justify-content: center; }
    .footer-links a { justify-content: center; }
    .footer-bottom .col-md-6 { text-align: center !important; }
    .footer-bottom .col-md-6 + .col-md-6 { margin-top: 0.5rem; }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .primary-nav,
    .secondary-nav,
    .carousel-section,
    .action-buttons-panel,
    .gad-footer,
    .back-to-top,
    .skip-link {
        display: none !important;
    }

    body {
        background-color: white;
        color: black;
        padding-top: 0;
    }

    .news-section { box-shadow: none; }
    a             { color: black; }
    .news-article { border: 1px solid #ccc; break-inside: avoid; }
}

/* ==========================================
   PERFORMANCE OPTIMIZATIONS
   ========================================== */

.carousel-item img,
.news-image img,
.action-icon,
.back-to-top {
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}