/*
 * Customisation et surcharge du Framework Bulma
 * 
 * 
 * @author LGI Sustainable innovation
 * @version 1.1
 * 
 */

:root {
    --main-txt-color: #3a332d;
    --main-bg-brown: #3a332d;
    --main-bg-green: #aec8a4;
    --main-bg-green-light: #e7efc7;
    --main-bg-green-dark: #3b3b1a;
    --btn-green: #e7efc7;
    --btn-white: #f8f8f8;
}

@font-face {
    font-family: "inter";
    src: url(../webfonts/Inter/Inter-VariableFont.ttf);
    font-display: swap;
}
@font-face {
    font-family: "cairo";
    src: url(../webfonts/Cairo/Cairo-VariableFont.ttf);
    font-display: swap;
}

::selection {
    color: white;
    background-color: var(--main-bg-green);
}

body {
    font-family: "cairo", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
        "Helvetica Neue", sans-serif;
    color: var(--main-txt-color);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "inter", sans-serif;
    margin: 0;
}

h2 {
    font-size: clamp(24px, 6vw, 2.8rem);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Components */

.btn-green {
    font-family: "cairo", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
        "Helvetica Neue", sans-serif;
    background-color: var(--btn-green);
    padding: 12px 2.5rem;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    color: var(--main-txt-color) !important;
}

.btn-white {
    font-family: "cairo", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
        "Helvetica Neue", sans-serif;
    background-color: var(--btn-white);
    padding: 12px 24px;
    border-radius: 40px;
    border: 1px solid var(--main-txt-color);
    cursor: pointer;
    color: var(--main-txt-color) !important;
}

.bg-line {
    background-color: white;
    background-image: linear-gradient(
            to right,
            rgba(231, 239, 199, 0.5) 1px,
            transparent 1px
        ),
        linear-gradient(
            to bottom,
            rgba(231, 239, 199, 0.5) 1px,
            transparent 1px
        ),
        radial-gradient(circle, rgba(231, 239, 199, 0.5) 1px, transparent 1px),
        radial-gradient(circle, rgba(231, 239, 199, 0.5) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px, 4px 40px, 40px 4px;
}

/* Footer */
footer a {
    color: var(--main-txt-color);
}
.footer {
    /* height: 100vh; */
    min-height: 900px;
    background: linear-gradient(
            to bottom,
            transparent 0%,
            var(--main-bg-green) 55%
        ),
        url("../../images/home/footer-bg.webp") center/cover no-repeat;
    align-content: end;
}

.footer .btn-green {
    font-size: 16px;
    padding: 8px 24px;
}

@media (max-width: 600px) {
    .footer .btn-green {
        font-size: 16px;
        padding: 8px 16px !important;
    }
    .main-footer {
        padding: 0rem !important;
    }
}

.footer-img p {
    font-weight: 300;
}

.footer h3 {
    font-weight: 300;
    font-size: 14px;
}

.main-footer {
    padding: 2rem;
    position: relative;
}

.main-footer::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border-top: 1px solid rgba(58, 51, 45, 0.2);
}

.main-footer::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    border-bottom: 1px solid rgba(58, 51, 45, 0.2);
}

.logo-footer-container {
    display: flex;
    align-items: flex-end;
    gap: 20px;
}
.logo-footer-container .social-icons {
    margin-bottom: 1rem;
}

@media (min-width: 750px) {
    .footer .column.is-4:has(ul) {
        padding-left: 7rem;
    }
}

/* Header */
#main-header {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: transparent;
    width: 100%;
    max-width: 1000px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-container {
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px; /* Add padding inside the white block */
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px; /* Adjust based on logo aspect ratio */
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    padding: 0;
    margin: 0;
}

.main-nav a {
    text-decoration: none;
    color: var(--main-txt-color);
    font-weight: 600;
    font-size: 16px;
}

.social-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-icons img {
    height: 28px;
    width: auto;
}

/* Navigation Hover & Dropdown */
.main-nav a {
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.main-nav .has-dropdown > a i {
    margin-left: 8px;
    font-size: 11px;
    transition: transform 0.3s ease;
}

.main-nav a:hover {
    color: var(--main-bg-green);
}

.main-nav li {
    position: relative;
}

.main-nav .dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    top: 57px;
    left: 0%;
    transform: translateX(-19px);
    background: white;
    padding: 10px 0;
    min-width: 200px;
    z-index: 1000;
    flex-direction: column;
    gap: 0;
}

/* Bridge to allow hovering from link to dropdown */
.main-nav .dropdown::before {
    content: "";
    position: absolute;
    top: -57px;
    left: 0;
    width: 100%;
    height: 57px;
}

@media (min-width: 901px) {
    .main-nav .has-dropdown:hover .dropdown {
        display: flex;
    }
}

.main-nav .dropdown li {
    width: 100%;
    text-align: center;
}

.main-nav .dropdown a {
    padding: 12px 20px;
    display: block;
    color: var(--main-txt-color);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
}

.main-nav .dropdown a:hover {
    /* color: var(--main-bg-green); */
    background-color: var(--main-bg-green-light);
}

/* Mobile Menu Elements (Hidden on Desktop) */
.mobile-nav-header,
.mobile-nav-footer {
    display: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--main-txt-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Responsive Navigation */
@media (max-width: 900px) {
    #main-header {
        top: 0;
    }
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: white;
        padding: 40px 30px;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .header-container.nav-active .main-nav {
        right: 0;
    }

    .mobile-nav-header {
        display: block;
        margin-bottom: 40px;
    }

    .mobile-nav-header img {
        height: 40px;
    }

    .mobile-nav-footer {
        display: block;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 25px;
        /* flex-grow: 1; */
        /* overflow-y: auto; */
        margin-bottom: 2rem;
    }

    .main-nav a {
        font-size: 24px;
        font-weight: 700;
        color: var(--main-txt-color);
        justify-content: space-between;
    }

    .main-nav .has-dropdown.active > a i {
        transform: rotate(180deg);
    }

    .main-nav .dropdown {
        position: static;
        display: none;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        min-width: unset;
        gap: 15px;
    }

    .main-nav .dropdown a {
        font-size: 18px;
        font-weight: 500;
        padding: 5px 0;
    }

    .main-nav .has-dropdown.active .dropdown {
        display: flex;
        margin-top: 10px;
    }

    .main-nav .dropdown::before {
        display: none;
    }

    .header-container .social-icons {
        display: none; /* Hide original icons */
    }

    .mobile-nav-footer .social-icons {
        display: flex;
        gap: 20px;
        margin-top: 15px;
    }

    .mobile-nav-footer .social-icons img {
        height: 32px;
    }

    /* Hamburger Animation to X */
    .header-container.nav-active .menu-toggle span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .header-container.nav-active .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .header-container.nav-active .menu-toggle span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Hero Section */
.hero-section {
    background-image: url("../../images/home/home-bg.webp");
    background-size: cover;
    background-position: center;
    height: 100vh;
    max-height: 800px;
    display: flex;
    flex-direction: column; /* Stack header and content vertically */
    align-items: center;
    color: white;
}

.hero-content {
    max-width: 800px; /* Constrain width */
    margin-top: auto; /*  Center vertically */
    margin-bottom: auto;
    align-content: center;
}

.hero-content h1 {
    font-size: clamp(24px, 6vw, 48px);
    font-weight: 700;
    margin-bottom: 40px;
    line-height: 1.2;
    width: 80%;
    justify-content: flex-start;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}

.hero-buttons .btn-green,
.hero-buttons .btn-white {
    font-weight: 600;
    font-size: 18px;
}

/* Challenge Section */
.challenge-section {
    padding: 60px 0;
}

.challenge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 40px;
}

.challenge-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.challenge-text p {
    font-size: 18px;
    margin-bottom: 20px;
}

.challenge-image img {
    width: 100%;
    border-radius: 20px;
    display: block;
}

.challenge-footer {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.challenge-footer p {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 500;
    margin-block: 60px 30px;
}

.btn-white-oval {
    background-color: transparent;
    color: var(--main-txt-color) !important;
    border: 1px solid var(--main-txt-color);
    padding: 8px 40px;
    border-radius: 30px;
    font-weight: 700;
    font-size: clamp(20px, 2vw, 20px);
    cursor: pointer;
    font-family: var(--font-text);
    font-style: oblique 13deg;
}

@media (max-width: 900px) {
    .challenge-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .challenge-text {
        text-align: center;
    }
    .hero-buttons {
        flex-direction: column;
    }

    .btn-white-oval {
        padding: 8px 22px;
    }
}

/* Delivers Section */
.delivers-section {
    background-color: var(--main-bg-green);
    padding: 80px 0;
    text-align: center;
}

.delivers-section h2 {
    margin-bottom: 60px;
}

.delivers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 900px) {
    .delivers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .delivers-grid {
        grid-template-columns: 1fr;
    }
    .delivers-section {
        padding: 60px 0;
    }
}

.deliver-card {
    border: 1px solid var(--main-txt-color);
    padding: 40px 30px;
    text-align: left;
    height: 100%;
    box-sizing: border-box;
}

.deliver-card .icon {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    margin-inline: auto;
    height: 3.5rem;
    width: 4.5rem;
}

.deliver-card h3 {
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 700;
    margin-bottom: 15px;
}

.deliver-card p {
    font-size: 18px;
    line-height: 1.4;
}

/* News Section */
.news-layout {
    display: flex;
    gap: 4rem;
    max-width: 1100px;
    margin-inline: auto;
    padding-top: 6rem;
    padding-bottom: 6rem;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .news-layout {
        flex-direction: column-reverse; /* Stack with sidebar (title) on top if needed, or normal column usually sidebar is secondary content? Image places title on right. On mobile title usually goes first. Let's assume standard stack. */
        flex-direction: column;
        gap: 2rem;
    }
    .news-sidebar {
        order: -1; /* Move title to top on mobile */
        width: 100%;
        text-align: center;
    }
    .news-sidebar hr {
        margin-inline: auto;
    }
}

.news-grid-container {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .news-grid-container {
        grid-template-columns: 1fr;
    }
}

.news-sidebar {
    flex: 1;
    padding-top: 2rem;
}

.news-sidebar h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--main-txt-color);
}

.news-sidebar hr {
    border: none;
    border-top: 1px solid var(--main-txt-color);
    width: 100%;
    margin: 0;
}

.event-sidebar-item {
    display: block;
    text-decoration: none;
    color: var(--main-txt-color);
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

.event-sidebar-item:hover .event-title {
    color: var(--main-bg-green);
}

.event-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--main-bg-green);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.event-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.event-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Custom Card Styles matching the design */
/* Targeting .newsBox within .news-layout to avoid affecting other pages if list.html is reused elsewhere */
.news-layout .newsBox {
    background-color: var(--main-bg-brown);
    color: white;
    border-radius: 0;
    box-shadow: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: none;
}

.news-layout .newsBox .img-container img {
    height: 250px; /* Taller image as per design */
    width: 100%;
    object-fit: cover;
    border-radius: 0;
}

.news-layout .newsBox-txt {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    gap: 1rem;
}

.news-layout .newsBox h3 {
    color: white !important;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.news-layout .newsBox .time {
    font-size: 0.85rem;
    opacity: 0.6;
    display: block;
    margin-top: auto;
}

.news-layout .newsBox .newsBox-desc {
    /* "Read more" text */
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.news-layout .newsBox-info {
    margin-bottom: 1rem;
}

.news-layout .news-icon {
    display: none; /* Hide icon if not in design (Image doesn't show icons like 'News' badge on top right, or maybe it does? Image has text "Event - 25/10/2025" at bottom. list.html has explicit '##type' icon/span. Design image doesn't show a type badge on top. The bottom text handles it.) */
}

/* Ensure link covers whole card and text colors are correct */
.news-grid-container a {
    text-decoration: none;
    display: block;
    height: 100%;
}

.news-section {
    padding: 0; /* Override old padding if still present */
}

.news-header {
    padding-block: 80px;
    background-color: transparent;
}

.news-header h2 {
    margin-bottom: 20px;
    font-weight: 400;
}

.news-header h2 i {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 700;
}

.news-divider {
    border: none;
    border-top: 1px solid #ccc;
    margin: 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(250px, 350px));
    gap: 30px;
    padding-bottom: 8rem;
    align-items: end;
    justify-content: center;
}

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

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 350px;
    }
}

.news-card {
    display: flex;
    flex-direction: column;
}

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

.news-content {
    background-color: var(--main-txt-color);
    color: white;
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
}

.news-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.read-more {
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
}

.news-date {
    font-size: 14px;
    opacity: 0.7;
    margin-top: auto;
}

.news-footer {
    text-align: right;
    margin-bottom: 2rem;
}

.btn-green.oval {
    font-size: clamp(16px, 2vw, 18px);
    padding: 8px 1.5rem;
}

/* Partners Section */
.partners-section {
    background-color: #f5f5f5;
    padding: 80px 0;
    text-align: left;
}

.partners-section h2 {
    margin-bottom: 20px;
}

.partners-desc {
    margin-bottom: 4rem;
    font-size: 20px;
}

.partners-grid {
    width: 90%;
    margin-inline: inherit;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 30px 40px;
}

.partners-grid img {
    max-height: 65px;
    max-width: 160px;
    object-fit: contain;
}

/* Impact Section Animation */
#impact-scroll-area {
    padding-block: 7rem;
    height: 600vh; /* Allow enough scroll space */
    position: relative;
    background-color: var(--main-bg-green-dark);
}

#impact-sticky-container {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    /* overflow: hidden; */
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
    align-items: center;
    background-color: var(--main-bg-green-dark);
}

#impact-card-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 90%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.impact-card {
    position: absolute;
    width: fit-content;
    aspect-ratio: 1;
    height: 16vw;
    min-width: 220px;
    min-height: 220px;
    background-color: white;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    box-sizing: border-box;
    text-align: center;
    transform-origin: center center;
    will-change: transform, top, left;
}

.impact-card h3 {
    font-size: calc(20px + 2vw);
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1;
    opacity: 0.8;
}

.impact-card p {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    opacity: 0.9;
}

#impact-sticky-container h2 i {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 700;
}

/* ------------------------------------------------------------------
   ABOUT PAGE STYLES
   ------------------------------------------------------------------ */

/* General Utilities for About Page */
.text-white {
    color: white;
}
.text-brown {
    color: var(--main-bg-brown);
}
.bg-brown {
    background-color: var(--main-bg-brown);
}
.bg-green-light {
    background-color: var(--main-bg-green);
}
.bg-green-pale {
    background-color: var(--main-bg-green-light);
}
.bg-brown-pale {
    background-color: var(--main-bg-brown);
}
.bg-light-gray {
    background-color: #f5f5f5;
}
.bg-white {
    background-color: white;
}

.padding-large {
    padding: 4rem;
}
.padding-medium {
    padding: 2rem;
}
.padding-section {
    padding: 5rem 0;
}
.content-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.max-w-800 {
    max-width: 800px;
}

/* Typography */
.text-large {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.1;
    font-family: var(--font-heading, "inter", sans-serif);
}

.text-large i {
    font-family: var(--font-heading, "inter", sans-serif);
    font-weight: 700;
    font-style: italic;
}

.text-medium {
    font-size: 1.25rem;
    line-height: 1.5;
    font-weight: 300;
}

.text-heading {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 400;
    line-height: 1.1;
}

.text-heading i {
    font-weight: 700;
    font-style: italic;
}

.text-subheading {
    font-size: 1.5rem;
    font-weight: 400;
}

.text-body {
    font-size: 1.125rem;
    line-height: 1.6;
}

.font-bold {
    font-weight: 700;
}

.list-squares {
    list-style: none;
    padding-left: 1.2rem;
}

.list-squares li {
    position: relative;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.list-squares li::before {
    content: "";
    position: absolute;
    left: -1.2rem;
    top: 0.6em;
    /* top:50%; */
    width: 6px;
    height: 6px;
    background-color: currentColor;
}

/* 
   SPLIT SECTIONS (Intro & Challenges) 
*/
.split-container {
    display: flex;
    flex-wrap: wrap;
    min-height: 60vh;
}

.split-left,
.split-right {
    flex: 1 1 50%;
    box-sizing: border-box;
    min-width: 300px;
}

/* Texture Background Placeholder */
.bg-texture {
    background-color: #ccc;
    background-image: repeating-linear-gradient(
        45deg,
        #ccc 0,
        #ccc 2px,
        #888 2px,
        #888 4px
    );
    /* Simple striped texture placeholder */
    min-height: 300px;
}

/* 
   TECHNOLOGICAL PILLARS 
*/
.pillars-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pillar-card {
    display: flex;
    flex-direction: row;
    border: 1px solid var(--main-bg-brown);
}

@media (max-width: 600px) {
    .pillar-card:first-child {
        position: sticky;
        top: 13%;
    }

    .pillar-card:nth-child(2) {
        position: sticky;
        top: 24%;
    }

    .pillar-card:nth-child(3) {
        position: sticky;
        top: 36%;
    }
    .pillar-card:nth-child(4) {
        position: sticky;
        top: 48%;
    }
    .pillar-card:nth-child(5) {
        position: sticky;
        top: 60%;
    }
}

.pillar-header {
    color: var(--main-bg-green-light);
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 3rem 2rem;
}

@media (max-width: 600px) {
    .pillar-header {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    .pillar-title {
        font-size: 1rem !important;
    }
    .pillar-number {
        font-size: 2rem !important;
    }
}

.pillar-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

.pillar-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.pillar-body {
    flex: 1;
    font-family: "cairo", sans-serif;
    background: white;
    /* color: var(--main-txt-color); */
}

/* 
   WORK PACKAGES 
*/
.about-packages {
    background-color: var(--main-bg-green-light);
}

.packages-grid {
    display: grid;
    /* Max 3 columns on large screens, auto-fit ensures responsiveness */
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* On smaller screens, allow fewer columns */
@media (max-width: 900px) {
    .packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .packages-grid {
        grid-template-columns: 1fr;
    }
}

.package-card {
    display: flex;
    flex-direction: column;
    color: var(--main-bg-green-light);
    border-radius: 8px;
    height: 350px; /* Fixed height for animation consistency */
    position: relative;
    overflow: hidden;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
    text-align: center;
    transition: all 0.4s ease;
}

.package-header {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 0 1rem;
    transition: all 0.5s ease-in-out;
    z-index: 2;
}

.package-title {
    font-size: clamp(1.4rem, 2vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.package-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 400;
    opacity: 0.9;
    margin: 0;
}

.package-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem;
    display: flex; /* Use flex to center the text */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--main-bg-brown); /* Ensure background covers */
    opacity: 0;
    transform: translateY(100%); /* Start below */
    transition: all 0.5s ease-in-out;
    z-index: 1;
}

.package-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.5;
    font-weight: 300;
    text-align: center;
}

.package-content a {
    color: var(--main-bg-green);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.package-content u {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* HOVER EFFECTS */
.package-card:hover .package-header {
    transform: translate(
        -50%,
        calc(-50% - 350px)
    ); /* Move up by full card height to match content speed */
    opacity: 0;
}

.package-card:hover .package-content {
    opacity: 1;
    transform: translateY(0); /* Move into view */
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    .padding-large {
        padding: 2rem;
    }

    .split-container .padding-large:first-child {
        padding-top: 10rem;
    }

    .pillar-card {
        flex-direction: column;
    }

    .pillar-header,
    .pillar-body {
        flex: auto;
    }

    .text-large {
        font-size: 1.75rem;
    }

    /* Mobile Slider for Package Cards */
    .package-card {
        padding: 0 !important;
        height: auto;
        min-height: 350px;
        position: relative; /* Ensure it's a positioning context */
    }

    .package-scroll-container {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        justify-content: flex-start;
        align-items: stretch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        width: 100%;
        height: 100%;
    }

    .package-scroll-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .package-header,
    .package-content {
        position: relative;
        top: auto;
        left: auto;
        bottom: auto;
        right: auto;
        width: 100%;
        min-width: 100%;
        height: auto; /* content dictates height, container stretches */
        min-height: 350px; /* Match card min-height */
        transform: none !important;
        opacity: 1 !important;
        scroll-snap-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
    }

    /* Disable hover effects logic on mobile */
    .package-card:hover .package-header,
    .package-card:hover .package-content {
        transform: none;
        opacity: 1;
    }

    /* Mobile Hint Styles */
    .mobile-hint {
        position: absolute;
        bottom: 1rem;
        left: 0;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        pointer-events: none; /* Let clicks pass through */
        z-index: 10;
        padding: 0 1rem;
    }

    .mobile-hint i {
        color: var(--main-bg-green-light);
        font-size: 1.2rem;
        animation: slideRight 1.5s infinite;
    }

    .mobile-hint .dots {
        display: flex;
        gap: 0.5rem;
    }

    .mobile-hint .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: #808080; /* Gray as requested */
        opacity: 0.5;
        transition: background-color 0.3s ease, opacity 0.3s ease;
    }

    .mobile-hint .dot.active {
        background-color: var(--main-bg-green-light);
        opacity: 1;
    }

    @keyframes slideRight {
        0%,
        100% {
            transform: translateX(0);
            opacity: 0.5;
        }
        50% {
            transform: translateX(5px);
            opacity: 1;
        }
    }
}

/* Hide mobile hint on desktop */
@media (min-width: 769px) {
    .mobile-hint {
        display: none;
    }
}

/* ------------------------------------------------------------------
   ANIMATIONS (Compatible with script.js)
   ------------------------------------------------------------------ */

.reveal-bottom {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* Partners Page New Styles */
#partners-hero {
    background-color: var(--main-bg-brown);
    padding-top: 15rem; /* Account for absolute header */
    padding-bottom: 4rem;
    position: relative;
    max-height: 700px;
}

#partners-hero :where(h1, p) {
    color: var(--main-bg-green-light) !important;
}

#partners-hero h1 em {
    color: var(--main-bg-green-light);
    font-style: italic;
}

.partner-team-img {
    width: 100%;
    margin-top: 3rem;
    display: block;
}

.partners-grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 3rem;
    margin-bottom: 3rem;
    margin-top: 25rem;
    justify-items: center;
}

.partner-card {
    border: 1px solid #000; /* As per design */
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1/1; /* Square cards? Design looks rectangular/square */
    height: 100%;
    width: 100%;
    max-height: 350px;
    transition: transform 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-5px);
}

.partner-link {
    text-decoration: none;
    color: var(--main-txt-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 2rem;
    box-sizing: border-box;
}

.partner-logo-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.partner-logo {
    max-width: 80%;
    max-height: 120px;
    object-fit: contain;
}

.partner-action {
    width: fit-content;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    font-size: 1rem;
    font-weight: 400;
}

@media (max-width: 900px) {
    .partners-grid-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .partners-grid-cards {
        grid-template-columns: 1fr;
    }

    .partner-card {
        height: 280px;
    }

    .partner-team-img {
        margin-top: 7rem;
    }

    .partners-grid-cards {
        margin-top: 3rem;
    }
}

/* NEWS & EVENT */
.header-news {
    padding-bottom: 4rem;
    position: relative;
    height: 100vh;
    max-height: 520px;
    background-color: var(--main-bg-green);
}

.title-news {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    padding-top: 8rem;
}

.title-news h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

/* Public Deliverables Section */
.public-deliverables-section {
    padding: 20rem 0 80px;
}

.deliverables-box {
    background-color: white;
    padding: 40px 60px;
    border-radius: 0;
}

.deliverable-item {
    padding: 20px 0;
}

.deliverable-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 30px;
    transition: color 0.3s ease;
}

.deliverable-header:hover {
    color: var(--main-bg-green);
}

.deliverable-header .chevron {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.deliverable-item.active .chevron {
    transform: rotate(180deg);
}

.deliverable-header .wp-title {
    font-size: 1.1rem;
    font-weight: 500;
}

.deliverable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding-left: 60px; /* Align with title (chevron + gap) */
}

.deliverable-item.active .deliverable-content {
    max-height: 500px; /* Adjust as needed */
    padding-top: 20px;
    padding-bottom: 10px;
}

.deliverable-content p {
    font-weight: 700;
    color: var(--main-bg-green);
}

.deliverable-divider {
    margin: 0;
    border: none;
    border-top: 1px solid rgba(58, 51, 45, 0.2);
}

@media (max-width: 768px) {
    .deliverables-box {
        padding: 20px;
    }
    .deliverable-header {
        gap: 15px;
    }
    .deliverable-content {
        padding-left: 35px;
    }
}

/* Publications Section */
.publications-section {
    padding: 80px 0;
}

.bg-grid-green {
    background-color: var(--main-bg-green-light);
    background-image: linear-gradient(
            to right,
            rgba(255, 255, 255, 0.4) 1px,
            transparent 1px
        ),
        linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.4) 1px,
            transparent 1px
        ),
        radial-gradient(circle, rgba(255, 255, 255, 0.4) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 5px 50px, 50px 5px;
}

.publications-box {
    background-color: var(--main-bg-brown);
    padding: 60px;
    color: white;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.publications-table {
    width: 100%;
    border-collapse: collapse;
}

.publications-table th {
    text-align: left;
    padding: 15px 10px;
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.publications-table td {
    padding: 20px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: top;
}

.publications-table tr:last-child td {
    border-bottom: none;
}

.publications-table .pub-title {
    font-weight: 500;
    max-width: 400px;
}

.publications-table .pub-link {
    color: var(--main-bg-green);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.publications-table .pub-link:hover {
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .publications-box {
        padding: 40px 20px;
    }
    .publications-table {
        display: block;
        overflow-x: auto;
    }
}

/* Media Centre Styles */
.media-section {
    background-color: var(--main-bg-brown);
    padding: 60px 0;
}

.media-interactive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.media-card {
    background-color: white;
    padding: 30px;
    position: relative;
    cursor: pointer;
    height: fit-content;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.media-card:hover {
    background-color: #fcfcfc;
}

.media-card-header {
    height: 130px;
}

.media-card-title {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--main-txt-color);
}

.media-card .arrow-right {
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 1.2rem;
    color: var(--main-txt-color);
    transition: transform 0.3s ease;
}

.media-card.active .arrow-right {
    transform: rotate(90deg);
}

.media-card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease;
}

.media-card.active .media-card-content {
    max-height: 500px;
    margin-top: 20px;
}

/* newsletter boxes */
.newsletter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.newsletter-card {
    background-color: white;
    padding: 20px 30px;
    display: block;
    text-decoration: none;
    color: var(--main-txt-color);
    font-size: 1.1rem;
    font-weight: 400;
    text-align: left;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.newsletter-card:hover {
    background-color: var(--main-bg-green-light);
}

/* Press Section */
.press-section {
    margin-top: 10rem;
}

.press-box {
    background-color: #f8f8f8;
    padding: 40px;
    min-height: 200px;
}

.press-box h4 {
    color: var(--main-txt-color);
    font-weight: 300;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.press-doc-list {
    list-style: none;
    margin: 0;
}

.press-doc-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.press-doc-link-wrapper {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
}

.press-doc-link-wrapper:hover .text-body {
    color: var(--main-bg-green);
}

@media (max-width: 900px) {
    .media-interactive-grid,
    .newsletter-grid {
        grid-template-columns: 1fr;
    }
}

/* News Template Styles */

.news-featured-image img {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.sideBox {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.has-border-radius {
    border-radius: 10px;
}

#summary-list li {
    margin-bottom: 0.8rem;
}

#summary-list li a {
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
    font-size: 16px;
}

#summary-list li a:hover {
    color: var(--main-bg-green) !important;
    padding-left: 5px;
}

.news-article-section .content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: var(--main-bg-brown);
}

.news-article-section .content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .news-header {
        padding: 40px 0;
    }

    .sidebar-sticky {
        position: static !important;
        margin-top: 40px;
    }
}

/* Latest Posts Modern Styles */
.sideListNews {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.latest-post-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    text-decoration: none !important;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.latest-post-item:hover {
    background-color: #f9f9f9;
    transform: translateX(5px);
}

.latest-post-img {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.latest-post-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.latest-post-type {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--main-bg-green);
    letter-spacing: 0.5px;
}

.latest-post-title {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--main-bg-brown);
    font-weight: 500;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.latest-post-item:hover .latest-post-title {
    color: var(--main-bg-green);
}
