/* ==========================================================================
   Components
   Header, footer, cards, buttons, and reusable UI elements
   ========================================================================== */

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-light);
    color: var(--color-white);
    background-color: var(--color-bg);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    letter-spacing: 0px;
}

@media screen and (max-width: 975px) {
    body {
        line-height: var(--line-height-snug);
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    line-height: var(--line-height-tight);
}

h1 {
    color: var(--color-text-heading);
    font-size: var(--font-size-h1);
}

h2 {
    color: var(--color-text-dark);
    font-size: var(--font-size-h2);
}

h3 {
    color: var(--color-text-dark);
    font-size: var(--font-size-h3);
}

h4 {
    color: var(--color-text-dark);
    font-size: var(--font-size-h4);
    font-weight: var(--font-weight-light);
}

h5 {
    color: var(--color-text-dark);
    font-size: var(--font-size-h5);
}

h6 {
    color: var(--color-text-dark);
    font-size: var(--font-size-h6);
}

@media screen and (max-width: 975px) {
    h1 { font-size: 34px; }
    h2 { font-size: 1.87rem; }
    h3 { font-size: 1.275rem; }
    h4 { font-size: 1.19rem; }
}

@media screen and (max-width: 575px) {
    h1 { font-size: 28px; }
    h2 { font-size: 1.54rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: .98rem; }
}

a {
    color: var(--color-white);
    transition: var(--transition-default);
}

a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.site-header {
    position: relative;
    z-index: 100;
    background-color: var(--color-white);
    transition: var(--transition-default);
}

.site-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header .container {
    display: flex;
    align-items: center;
}

/* Logo */
.site-logo {
    flex: 0 0 auto;
    text-align: center;
}

.site-logo img {
    width: 220px;
    display: block;
}

@media screen and (max-width: 575px) {
    .site-logo img {
        width: 200px;
    }
}

.site-logo a:hover {
    text-decoration: none;
}

/* Main Navigation */
.main-nav {
    flex: 1 1 auto;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 1rem 1.25rem;
    color: var(--color-dark);
    font-size: 14px;
    font-weight: var(--font-weight-regular);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: var(--transition-default);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-primary);
    text-decoration: none;
}

/* Dropdown */
.main-nav .has-submenu > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.main-nav .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    min-width: 220px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 200;
    list-style: none;
    padding: 0.5rem 0;
}

.main-nav .has-submenu:hover .submenu {
    display: block;
}

.main-nav .submenu a {
    padding: 0.6rem 1.25rem;
    font-size: 13px;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex: 0 0 auto;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-dark);
    position: relative;
    transition: var(--transition-default);
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-dark);
    position: absolute;
    left: 0;
    transition: var(--transition-default);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* Mobile menu open state */
.mobile-menu-toggle.open .hamburger {
    background-color: transparent;
}

.mobile-menu-toggle.open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-toggle.open .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

@media screen and (max-width: 975px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav a {
        padding: 0.8rem 1.5rem;
    }

    .main-nav .submenu {
        position: static;
        box-shadow: none;
        background: #f5f5f5;
    }

    .main-nav .has-submenu:hover .submenu,
    .main-nav .submenu {
        display: block;
    }
}


/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.hero-banner {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-banner .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    z-index: 0;
}

.hero-banner .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-banner .hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Hero skewed accent block (homepage) */
.hero-accent-block {
    position: absolute;
    top: 0;
    left: 50%;
    min-height: 100%;
    min-width: 800px;
    z-index: 0;
    max-width: 100%;
    opacity: 1;
    background-color: var(--color-bg-hero-tint);
    transform: translate3d(-600px, 0, 0) skew(20deg, 0);
}

@media screen and (max-width: 975px) {
    .hero-accent-block {
        transform: translate3d(-500px, 0, 0) skew(20deg, 0);
    }
}

@media screen and (max-width: 575px) {
    .hero-accent-block {
        transform: translate3d(-50%, 0, 0) skew(5deg, 0);
        min-width: 100%;
    }
}

.hero-text-wrapper {
    margin-left: 115px;
    max-width: 50%;
    position: relative;
    z-index: 2;
}

@media screen and (max-width: 975px) {
    .hero-text-wrapper {
        max-width: 66%;
        margin-left: 25px;
    }
}

@media screen and (max-width: 575px) {
    .hero-text-wrapper {
        max-width: 100%;
        margin-left: 0;
    }
}

.hero-logo img {
    width: 359px;
    max-width: 100%;
}

.hero-subtitle {
    font-size: var(--font-size-hero-subtitle);
    color: var(--color-white);
    line-height: var(--line-height-snug);
    margin-left: 10px;
    font-weight: var(--font-weight-light);
}

.hero-scroll-arrow {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 3;
}

.hero-scroll-arrow a {
    display: block;
}

.hero-scroll-arrow svg {
    width: 30px;
    height: 30px;
    fill: var(--color-white);
    transition: var(--transition-default);
}

.hero-scroll-arrow a:hover svg {
    transform: translateY(4px);
}

/* Sub-page hero (smaller) */
.hero-banner.hero-small {
    min-height: 20vh;
}

.hero-banner.hero-small .hero-title {
    font-size: var(--font-size-hero);
    color: var(--color-white);
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-snug);
}

@media screen and (max-width: 575px) {
    .hero-banner.hero-small .hero-title {
        font-size: 32px;
    }
}


/* ==========================================================================
   ABOUT SECTION (Gradient bar)
   ========================================================================== */
.section-gradient {
    background: linear-gradient(90deg, rgb(55, 118, 187) 0%, rgb(67, 156, 190) 50%, rgb(64, 184, 195) 100%);
    color: var(--color-white);
    padding: 60px 0;
}

.section-gradient h2 {
    color: var(--color-white) !important;
    text-align: left;
    font-size: 2rem;
    font-weight: 700;
}

.section-gradient p {
    color: var(--color-white) !important;
    line-height: 1.6;
}

/* ==========================================================================
   AREA CARDS (Pricing-box style)
   ========================================================================== */
.area-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}

.area-card {
    background: #3776BB;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0; /* Sharp corners per live site */
}

.area-card-image {
    height: 185px;
    position: relative;
    overflow: hidden;
}

.area-card-image .card-bg {
    height: 100%;
    background-size: cover;
    background-position: center;
}

.area-card-image .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.area-card-image h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    color: #ffffff !important;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    z-index: 2;
    padding: 0 10px;
    line-height: 1.2;
}

.area-card-body {
    padding: 20px;
    flex-grow: 1;
}

.area-card-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.area-card-body li {
    color: #ffffff;
    font-size: 15px;
    line-height: 1.4;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.area-card-body li:last-child {
    border-bottom: none;
}

@media screen and (max-width: 975px) {
    .area-cards {
        grid-template-columns: repeat(2, 1fr);
        margin: 30px;
    }
}

@media screen and (max-width: 575px) {
    .area-cards {
        grid-template-columns: 1fr;
    }
}

.area-card-image .card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
}

.area-card-image .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-bg-overlay-dark);
}

.area-card-image h3 {
    position: relative;
    z-index: 1;
    color: var(--color-white);
    text-align: center;
    padding: 0.5rem;
}

.area-card-body {
    background: var(--color-primary);
    padding: 1.5rem;
    flex: 1;
}

.area-card-body ul {
    list-style: disc;
    padding-left: 1.5rem;
    color: var(--color-white);
}

.area-card-body li {
    margin-bottom: 0.5rem;
}


/* ==========================================================================
   ASSOCIATES SECTION
   ========================================================================== */
.associates-section {
    position: relative;
    background-image: url('/assets/images/bg-associates.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0;
}

.associates-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(27, 45, 66, 0.85); /* Dark overlay for readability */
    z-index: 1;
}

.associates-section .container {
    position: relative;
    z-index: 2;
}

.associates-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.associate-logo {
    background-color: #ffffff;
    flex: 0 0 200px; /* Fixed width */
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 15px; /* Increased horizontal padding */
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Safety first */
}

.associate-logo a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.associate-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

@media screen and (max-width: 975px) {
    .associate-logo {
        width: 180px;
    }
}

@media screen and (max-width: 575px) {
    .associate-logo {
        width: 150px;
        height: 60px;
    }
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-block;
    padding: var(--btn-padding);
    font-family: var(--font-family);
    font-size: var(--btn-font-size);
    font-weight: var(--font-weight-light);
    text-transform: uppercase;
    letter-spacing: 0px;
    line-height: var(--line-height-snug);
    border: 1px solid transparent;
    border-radius: var(--btn-border-radius);
    cursor: pointer;
    transition: var(--transition-default);
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: var(--color-white);
}


/* ==========================================================================
   NEWS CARDS
   ========================================================================== */

/* News Grid */

/* News card grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.news-card {
    background: var(--color-white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition-default);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

@media screen and (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 975px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 575px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

.news-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card a:hover {
    text-decoration: none;
}

.news-card-date {
    font-size: 10px;
    color: var(--color-dark);
    padding: 0.5rem 1rem 0; /* Padding for the date if it's inside the link */
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.news-card-body {
    background: var(--color-primary);
    padding: 1.5rem;
    flex-grow: 1; /* Force blue body to fill available space */
    display: flex;
    flex-direction: column;
}

.news-card-body h4 {
    color: var(--color-white);
    text-align: center;
    font-weight: var(--font-weight-bold);
    font-size: 1.2rem;
}

.news-card-body p {
    color: var(--color-white);
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* News article page */
.article-header {
    margin-bottom: 2rem;
}

.article-date {
    font-size: 12px;
    color: var(--color-gray-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.article-content {
    color: var(--color-dark);
    line-height: var(--line-height-base);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.article-back {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-gray-light);
}

.article-back a {
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.article-back a:hover {
    color: var(--color-primary-dark);
}


/* ==========================================================================
   GOVERNING BODIES
   ========================================================================== */
.gov-section-title {
    padding: 50px 0 15px 15px;
}

.gov-card {
    background: var(--color-primary);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto; /* Allow card to grow to match row height */
    margin-bottom: 2rem;
}

.gov-card p {
    color: var(--color-white);
}

.gov-card .member-name {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
}


/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: var(--gradient-brand);
    color: var(--color-white);
    min-height: 278px;
    display: flex;
    align-items: center;
    padding: 40px 0;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

@media screen and (max-width: 975px) {
    .site-footer {
        height: auto;
    }

    .site-footer .container {
        justify-content: flex-start;
    }
}

.footer-box {
    flex: 1 1 0;
    min-width: 0;
}

@media screen and (max-width: 575px) {
    .footer-box {
        flex: 0 0 100%;
        text-align: center;
        margin-bottom: 1.5rem;
    }
}

.footer-logo img {
    width: 250px;
    max-width: 100%;
}

.footer-contact h3 {
    color: var(--color-white);
    text-align: center;
    margin-bottom: 1rem;
}

.footer-contact p,
.footer-contact a {
    color: var(--color-white);
}

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

.footer-contact {
    padding: 0 10px 10px;
}

.footer-partners {
    text-align: center;
}

.footer-partners img {
    width: 160px;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

.footer-partners .partner-spacer {
    height: 8px;
}


/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-default);
    border: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transform: rotate(180deg);
}


/* ==========================================================================
   SCROLL ANIMATIONS
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================================
   UTILITY
   ========================================================================== */
.spacer-sm { height: 8px; }
.spacer-md { height: 1rem; }
.spacer-lg { height: 50px; }
.spacer-xl { height: 75px; }

.color-white { color: var(--color-white) !important; }
.color-dark { color: var(--color-dark) !important; }
.color-primary { color: var(--color-primary) !important; }
.bg-primary { background-color: var(--color-primary) !important; }
.bg-secondary { background-color: var(--color-secondary) !important; }
.bg-white { background-color: var(--color-white) !important; }

/* Text utilities */
.text-justify { text-align: justify; }
.text-dark { color: var(--color-dark); }

/* Image utilities */
.img-cover {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Link utilities */
.link-primary {
    color: var(--color-primary);
}

.link-primary:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}
