/* =========================
   ROOT VARIABLES
========================= */
:root {
    --primary:   #002147;
    --secondary: #FFD700;
    --light:     #ffffff;
    --text:      #333;
}

/* =========================
   GLOBAL RESET
========================= */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    color: var(--text);
}

h1, h2 {
    color: var(--primary);
}

section {
    padding: 20px;
    margin: 20px;
    background: white;
    border-radius: 8px;
}

/* =========================
   NAVIGATION BAR
========================= */
.navbar {
    background-color: #001f3f;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 25px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-link img {
    height: 50px;
    margin-right: 10px;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: red;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--secondary);
}

/* =========================
   DROPDOWN MENU
========================= */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #001f3f;
    list-style: none;
    padding: 10px;
    margin: 0;
    border-radius: 5px;
    min-width: 180px;
    z-index: 999;
}

.dropdown-menu li {
    margin: 5px 0;
}

.dropdown-menu li a {
    color: white;
    display: block;
    padding: 5px 10px;
    text-decoration: none;
}

.dropdown-menu li a:hover {
    background-color: var(--secondary);
    color: #001f3f;
}

.dropdown:hover > .dropdown-menu {
    display: block;
}

/* Sub-dropdown */
.dropdown-sub {
    position: relative;
}

.dropdown-sub .dropdown-menu {
    left: 100%;
    top: 0;
}

/* =========================
   HERO SLIDER
========================= */
.hero-slider {
    position: relative;
    overflow: hidden;
    height: 450px;   /* single authoritative height */
    border-radius: 8px;
    background: #000;
}

.hero-slider .slides {
    height: 100%;
}

/* Hide/show slides — JS toggles .active */
.hero-slider .slide {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hero-slider .slide.active {
    display: block;
}

/* Image fills the slide exactly */
.hero-slider .slide img {
    width: 100%;
    height: 100%;           /* fills parent .slide which is 450px */
    object-fit: cover;
    object-position: center top;
    display: block;
}

.hero-slider .caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    width: 90%;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}

.hero-slider .slide.active .caption {
    opacity: 1;
}

.hero-slider button.prev,
.hero-slider button.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--light);
    font-size: 20px;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
}

.hero-slider button.prev { left: 10px; }
.hero-slider button.next { right: 10px; }

/* Hero slider dots */
#hero-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

#hero-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 0;
}

#hero-dots button.active {
    background: #ffffff;
}

/* =========================
   PAGE LAYOUT (GRID)
========================= */
.page-layout {
    display: grid;
    grid-template-columns: 25% 50% 25%;
    gap: 20px;
    padding: 20px;
    align-items: start;   /* sidebars don't stretch unnaturally */
    box-sizing: border-box;
}

/* =========================
   SIDEBARS
========================= */
.left-sidebar,
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-block {
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sidebar-block h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Slide visibility ── */
.cic-slide,
.cds-slide,
.services-slide,
.co-slide {
    display: none;
}

.cic-slide.active,
.cds-slide.active,
.services-slide.active,
.co-slide.active {
    display: block;
}

/* ── Sidebar slide images: single authoritative rule ── */
.cic-slide img,
.cds-slide img,
.services-slide img,
.co-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center top;
    border-radius: 6px;
    display: block;
}

/* ── Sidebar caption ── */
.sidebar-block .caption {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    margin-top: 8px;
    padding: 0 4px;
}

/* ── Slider dots (used by ALL sliders including hero) ── */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* JS creates <button> elements for dots */
.slider-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.slider-dots button.active {
    background: #004080;
}

/* =========================
   MAIN CONTENT
========================= */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =========================
   NEWS
========================= */
.news article {
    margin-bottom: 15px;
}

/* =========================
   MULTIMEDIA / VIDEO
========================= */
.multimedia.expanded {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin: 0;
    box-sizing: border-box;
}

.video-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Main (featured) video — single authoritative size */
.video-container > video,
.video-container > iframe {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    border: none;
}

/* Thumbnail row */
.video-thumbnails {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Thumbnail videos/iframes — NO !important needed */
.video-thumbnails > video,
.video-thumbnails > iframe {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid #ddd;
    display: block;
}

/* =========================
   GALLERY / QUICK LINKS
========================= */
.gallery {
    grid-column: 1 / -1;
    width: 100%;
    padding: 10px 0;
    box-sizing: border-box;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
}

/* Gallery item wrapper */
.gallery-item {
    text-align: center;
}

/* Gallery item image — single authoritative rule */
.gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #ccc;
    padding: 4px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
    box-sizing: border-box;
}

.gallery-item p {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

/* Talk to GAF special box */
.gallery-item.talk-to-gaf {
    background: #f9f9f9;
    border: 2px solid #ccc;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.gallery-item.talk-to-gaf h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 700;
    color: #004080;
}

.gallery-item.talk-to-gaf .contact-info {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* =========================
   BREADCRUMB
========================= */
.breadcrumb {
    font-size: 14px;
    margin: 15px 20px;
    color: #555;
}

.breadcrumb a {
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--secondary);
}

/* =========================
   FOOTER
========================= */
footer {
    background-color: var(--primary);
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 30px;
}

.footer-links h4 {
    border-bottom: 2px solid red;
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 10px;
    color: #fff;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.footer-links ul li {
    margin: 0;
    position: relative;
}

.footer-links ul li:not(:last-child)::after {
    content: "|";
    margin-left: 10px;
    color: rgba(255,255,255,0.5);
}

.footer-links a {
    color: #fff;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* =========================
   RESPONSIVE DESIGN
========================= */
@media (max-width: 768px) {
    .page-layout {
        display: flex;
        flex-direction: column;
        padding: 10px;
    }

    .left-sidebar,
    .right-sidebar {
        width: 100%;
    }

    .hero-slider {
        height: 260px;
    }

    .hero-slider .slide img {
        height: 100%;
    }

    .video-container > video,
    .video-container > iframe {
        height: 220px;
    }

    .video-thumbnails > video,
    .video-thumbnails > iframe {
        width: calc(50% - 4px);
        height: 90px;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item img {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .gallery-thumbnails {
        grid-template-columns: 1fr 1fr;
    }

    .video-thumbnails > video,
    .video-thumbnails > iframe {
        width: 100%;
        height: 100px;
    }
}
