/* ===== Base CSS ===== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

:root {
    --dark-blue: #051d40;
    --vivid-green: #44aa00;
    --yellow: #fade3f;
    --light-gray: #f5f5f5;
    --text-dark: #1a1a1a;
}

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

html {
    scroll-behavior: smooth;
}

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

/* ===== Top Bar ===== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: rgba(5,29,64,1);
    padding: 0.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.top-bar-left {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.top-bar-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.top-bar a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.85rem;
}

.top-bar a:hover {
    color: var(--yellow);
}

.top-bar-socials {
    display: flex;
    gap: 0.8rem;
}

.top-bar-socials a {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    font-size: 0.75rem;
}

.top-bar-socials a:hover {
    background: var(--vivid-green);
}

.search-icon {
    cursor: pointer;
    padding: 0.3rem;
}

/* ===== Main Navigation ===== */
nav {
    position: fixed;
    top: 42px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(5,29,64,0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 0.5rem 5%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.logo {
    height: 60px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.nav-links > li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
    display: block;
    padding: 0.5rem 0;
}

.nav-links > li > a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--yellow);
    transition: width 0.3s ease;
}

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

.nav-links > li > a:hover::after {
    width: 100%;
}

/* Active nav link styling */
.nav-links a.active {
color: var(--yellow) !important;
}

.nav-links > li > a.active::after {
width: 100% !important;
background: var(--yellow) !important;
}

/* Page transition */
}

/* Utility classes */
.text-center {
text-align: center;
}

.container {
max-width: 1400px;
margin: 0 auto;
padding: 0 5%;
}

/* ===== Dropdown Menu ===== */
.dropdown {
    position: relative;
}

.dropdown > a::after {
    content: ' ▾';
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dark-blue);
    min-width: 240px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    border-radius: 8px;
    margin-top: 0.5rem;
    padding: 0.8rem 0;
    z-index: 1001;
}

.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    height: 20px;
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover {
    display: block;
}

.dropdown-content a {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.dropdown-content a:hover {
    background: rgba(68, 170, 0, 0.15);
    color: var(--yellow);
    padding-left: 2rem;
    border-left-color: var(--vivid-green);
}

/* ===== Hamburger ===== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--dark-blue);
    padding: 100px 2rem 2rem;
    transition: right 0.4s ease;
    z-index: 999;
    box-shadow: -5px 0 20px rgba(0,0,0,0.3);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu ul li {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
}

.mobile-menu.active ul li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu > ul > li > a {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.mobile-menu > ul > li > a:hover {
    color: var(--yellow);
    border-bottom-color: var(--yellow);
    padding-left: 1rem;
}

.mobile-dropdown {
    margin-left: 1rem;
    margin-top: 0.5rem;
}

.mobile-dropdown a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    display: block;
    padding: 0.4rem 0;
    transition: all 0.3s ease;
}

.mobile-dropdown a:hover {
    color: var(--yellow);
    padding-left: 0.5rem;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile dropdown styling */
.mobile-dropdown-item {
position: relative;
}

.mobile-dropdown-item > a {
position: relative;
padding-right: 2rem !important;
}

.mobile-dropdown-item > a::after {
content: '▼';
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
font-size: 0.7rem;
transition: transform 0.3s ease;
}

.mobile-dropdown-item:hover > a::after {
transform: translateY(-50%) rotate(180deg);
}

.mobile-dropdown {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease;
padding-left: 1rem;
}

.mobile-dropdown-item:hover .mobile-dropdown {
max-height: 500px;
}

.mobile-dropdown a {
color: rgba(255,255,255,0.8);
text-decoration: none;
font-size: 1rem;
font-weight: 500;
display: block;
padding: 0.6rem 0;
transition: all 0.3s ease;
border-left: 2px solid transparent;
padding-left: 1rem;
}

.mobile-dropdown a:hover {
color: var(--yellow);
padding-left: 1.5rem;
border-left-color: var(--vivid-green);
}

/* ===== Hero Section ===== */
.hero { 
    min-height: 100vh; 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    padding-top: 140px; 
}

.hero-video { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    z-index: 0; 
}

.hero-video-placeholder { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(135deg, var(--dark-blue) 0%, #0a3d6e 100%); 
    z-index: 0; 
}

.hero-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(5,29,64,0.7); 
    z-index: 1; 
}

.particles { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    z-index: 1; 
}

.particle { 
    position: absolute; 
    background: var(--vivid-green); 
    border-radius: 50%; 
    animation: float 20s infinite; 
    opacity: 0.3; 
}

@keyframes float { 
    0%, 100% { transform: translateY(0) translateX(0); } 
    33% { transform: translateY(-100px) translateX(100px); } 
    66% { transform: translateY(-50px) translateX(-50px); } 
}

.hero-content { 
    position: relative; 
    z-index: 2; 
    text-align: center; 
    padding: 2rem; 
    max-width: 1200px; 
    animation: fadeInUp 1s ease; 
}

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

.hero-title { 
    font-size: 5rem; 
    font-weight: 700; 
    color: white; 
    margin-bottom: 1rem; 
    line-height: 1.2; 
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3); 
}

.hero-subtitle { 
    font-size: 2.5rem; 
    color: var(--yellow); 
    margin-bottom: 2rem; 
    font-weight: 600; 
}

.hero-description { 
    font-size: 1.3rem; 
    color: rgba(255,255,255,0.9); 
    margin-bottom: 3rem; 
    max-width: 900px; 
    margin-left: auto; 
    margin-right: auto; 
}

.cta-buttons { 
    display: flex; 
    gap: 1.5rem; 
    justify-content: center; 
    flex-wrap: wrap; 
}

.btn { 
    padding: 1rem 2.5rem; 
    font-size: 1.1rem; 
    font-weight: 600; 
    border: none; 
    border-radius: 50px; 
    cursor: pointer; 
    text-decoration: none; 
    transition: all 0.3s ease; 
    position: relative; 
    overflow: hidden; 
    display: inline-block; 
}

.btn-primary { 
    background: var(--yellow); 
    color: var(--dark-blue); 
}

.btn-primary::before { 
    content: ''; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    width: 0; 
    height: 0; 
    border-radius: 50%; 
    background: var(--vivid-green); 
    transform: translate(-50%, -50%); 
    transition: width 0.6s, height 0.6s; 
}

.btn-primary:hover::before { 
    width: 300px; 
    height: 300px; 
}

.btn-primary span { 
    position: relative; 
    z-index: 1; 
}

.btn-primary:hover { 
    color: white; 
    transform: translateY(-3px); 
    box-shadow: 0 10px 30px rgba(68,170,0,0.4); 
}

.btn-secondary { 
    background: transparent; 
    color: white; 
    border: 2px solid white; 
}

.btn-secondary:hover { 
    background: white; 
    color: var(--dark-blue); 
    transform: translateY(-3px); 
    box-shadow: 0 10px 30px rgba(255,255,255,0.3); 
}

/* ===== Page Container ===== */
.page { 
    margin-bottom: 4rem; 
}

.section-title { 
font-size: 3rem; 
color: var(--dark-blue); 
margin-bottom: 1rem; 
position: relative; 
display: block;
    text-align: center;
hyphens: none;
word-wrap: normal;
overflow-wrap: normal;
word-break: keep-all;
}

.section-title::after { 
    content: ''; 
    position: absolute; 
    bottom: -10px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 100px; 
    height: 4px; 
    background: linear-gradient(to right, var(--vivid-green), var(--yellow)); 
    border-radius: 2px; 
}

.section-description { 
    font-size: 1.2rem; 
    color: #666; 
    max-width: 800px; 
    margin: 2rem auto 0; 
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* ===== Stats Grid ===== */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 2rem; 
    margin-top: 4rem; 
}

.stat-card { 
    background: white; 
    padding: 2.5rem; 
    border-radius: 20px; 
    text-align: center; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.1); 
    transition: all 0.3s ease; 
    position: relative; 
    overflow: hidden; 
}

.stat-card::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 5px; 
    background: linear-gradient(to right, var(--vivid-green), var(--yellow)); 
    transform: scaleX(0); 
    transition: transform 0.3s ease; 
}

.stat-card:hover::before { 
    transform: scaleX(1); 
}

.stat-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 60px rgba(0,0,0,0.15); 
}

.stat-number { 
    font-size: 3rem; 
    font-weight: 700; 
    color: var(--vivid-green); 
    margin-bottom: 0.5rem; 
}

.stat-label { 
    font-size: 1.1rem; 
    color: var(--text-dark); 
    font-weight: 600; 
}

.stat-description { 
    font-size: 0.9rem; 
    color: #666; 
    margin-top: 0.5rem; 
}

/* ===== What We Do Section ===== */
.what-we-do { 
    padding: 8rem 5%; 
    background: var(--dark-blue); 
    color: white; 
}

.solutions-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 3rem; 
    margin-top: 4rem; 
}

.solution-card { 
    background: rgba(255,255,255,0.05); 
    backdrop-filter: blur(10px); 
    border-radius: 20px; 
    padding: 3rem; 
    transition: all 0.3s ease; 
    border: 1px solid rgba(255,255,255,0.1); 
    position: relative; 
    overflow: hidden; 
}

.solution-card::before { 
    content: ''; 
    position: absolute; 
    top: -50%; 
    right: -50%; 
    width: 200%; 
    height: 200%; 
    background: radial-gradient(circle, var(--vivid-green) 0%, transparent 70%); 
    opacity: 0; 
    transition: opacity 0.3s ease; 
}

.solution-card:hover::before { 
    opacity: 0.1; 
}

.solution-card:hover { 
    transform: translateY(-10px); 
    border-color: var(--yellow); 
    box-shadow: 0 20px 60px rgba(68,170,0,0.3); 
}

.solution-title { 
    font-size: 1.8rem; 
    color: var(--yellow); 
    margin-bottom: 1rem; 
}

.solution-description { 
    color: rgba(255,255,255,0.8); 
    margin-bottom: 2rem; 
    line-height: 1.8; 
}

.learn-more { 
    color: var(--yellow); 
    text-decoration: none; 
    font-weight: 600; 
    display: inline-flex; 
    align-items: center; 
    gap: 0.5rem; 
    transition: gap 0.3s ease; 
}

.learn-more:hover { 
    gap: 1rem; 
}

/* ===== Impact Section ===== */
.impact { 
    padding: 8rem 5%; 
    background: linear-gradient(135deg, var(--light-gray) 0%, white 100%); 
}

.impact-content { 
    max-width: 1200px; 
    margin: 0 auto; 
}

.impact-metrics { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 2rem; 
    margin: 4rem 0; 
}

.metric-card { 
    background: white; 
    padding: 2.5rem; 
    border-radius: 20px; 
    text-align: center; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); 
    transition: all 0.3s ease; 
    position: relative; 
}

.metric-card::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 5px; 
    background: linear-gradient(to right, var(--vivid-green), var(--yellow)); 
    transform: scaleX(0); 
    transition: transform 0.3s ease; 
}

.metric-card:hover::after { 
    transform: scaleX(1); 
}

.metric-card:hover { 
    transform: translateY(-10px) scale(1.02); 
}

.metric-value { 
    font-size: 2.5rem; 
    font-weight: 700; 
    color: var(--vivid-green); 
    margin-bottom: 0.5rem; 
}

.metric-label { 
    font-size: 1.1rem; 
    color: var(--text-dark); 
    font-weight: 600; 
}

.testimonial { 
    background: var(--dark-blue); 
    color: white; 
    padding: 3rem; 
    border-radius: 20px; 
    margin-top: 4rem; 
    position: relative; 
    overflow: hidden; 
}

.testimonial::before { 
    content: '"'; 
    position: absolute; 
    top: -20px; 
    left: 20px; 
    font-size: 10rem; 
    color: var(--yellow); 
    opacity: 0.2; 
}

.testimonial-text { 
    font-size: 1.5rem; 
    font-style: italic; 
    margin-bottom: 1.5rem; 
    position: relative; 
    z-index: 1; 
}

.testimonial-author { 
    font-size: 1.1rem; 
    color: var(--yellow); 
    font-weight: 600; 
}

/* ===== Insights Section ===== */
.insights-section { 
    padding: 8rem 5%; 
    background: white; 
}

.insights-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 3rem; 
    margin-top: 4rem; 
}

.insight-card { 
    background: white; 
    border-radius: 20px; 
    overflow: hidden; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.1); 
    transition: all 0.3s ease; 
}

.insight-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 60px rgba(0,0,0,0.15); 
}

.insight-image { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    display: block; 
}

.insight-content { 
    padding: 2rem; 
}

.insight-title { 
    font-size: 1.4rem; 
    color: var(--dark-blue); 
    margin-bottom: 1rem; 
    font-weight: 600; 
}

.insight-excerpt { 
    color: #666; 
    margin-bottom: 1.5rem; 
    line-height: 1.6; 
}

/* ===== Newsletter Section ===== */
.newsletter-section { 
    background: var(--dark-blue); 
    color: white; 
    padding: 4rem; 
    border-radius: 20px; 
    text-align: center; 
    margin-top: 4rem; 
}

.newsletter-title { 
font-size: 2rem; 
color: var(--yellow); 
margin-bottom: 1rem;
hyphens: none;
word-wrap: normal;
overflow-wrap: normal;
word-break: keep-all;
}

.newsletter-form { 
    display: flex; 
    gap: 1rem; 
    max-width: 600px; 
    margin: 2rem auto 0; 
    flex-wrap: wrap; 
    justify-content: center; 
}

.newsletter-input { 
    flex: 1; 
    min-width: 250px; 
    padding: 1rem 1.5rem; 
    border: none; 
    border-radius: 50px; 
    font-size: 1rem; 
}

.newsletter-btn { 
    padding: 1rem 2.5rem; 
    background: var(--yellow); 
    color: var(--dark-blue); 
    border: none; 
    border-radius: 50px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.3s ease; 
}

.newsletter-btn:hover { 
    background: var(--vivid-green); 
    color: white; 
    transform: translateY(-3px); 
}

/* ===== Partners Section ===== */
.partners-section { 
    padding: 8rem 5%; 
    background: linear-gradient(to bottom, var(--light-gray), white); 
}

.partners-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 3rem; 
    margin-top: 4rem; 
    align-items: center; 
}

.partner-logo { 
    background: white; 
    padding: 2rem; 
    border-radius: 15px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.08); 
    transition: all 0.3s ease; 
    height: 120px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    filter: grayscale(100%); 
}

.partner-logo:hover { 
    filter: grayscale(0%); 
    transform: translateY(-5px); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
}

.partners-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 4rem auto;
}

.partners-cards-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* ===== CTA Section ===== */
.cta-section { 
    background: var(--dark-blue); 
    color: white; 
    padding: 6rem 5%; 
    text-align: center; 
    margin-top: 4rem; 
    border-radius: 20px; 
}

.cta-title { 
    font-size: 2.5rem; 
    margin-bottom: 1.5rem; 
    color: var(--yellow); 
}

.cta-description { 
    font-size: 1.2rem; 
    margin-bottom: 3rem; 
    max-width: 700px; 
    margin-left: auto; 
    margin-right: auto; 
}

/* ===== Leadership Team (About Page) ===== */
#leadership-section .leadership-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 3rem;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

#leadership-section .leadership-team-grid > div {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#leadership-section .leadership-team-grid img {
    width: 100px !important;
    height: 100px !important;
    margin-bottom: 1rem !important;
    border: 3px solid var(--yellow);
    border-radius: 50%;
    object-fit: cover;
}

#leadership-section .leadership-team-grid h3 {
    font-size: 1.2rem !important;
    margin-bottom: 0.5rem !important;
}

#leadership-section .leadership-team-grid p:not(:first-of-type) {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

/* ===== Investment Cards ===== */
.invest-cards { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem; 
    margin-top: 3rem; 
}

.invest-card {
    background: linear-gradient(135deg, rgba(68, 170, 0, 0.1), rgba(250, 222, 63, 0.1));
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.invest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--vivid-green), var(--yellow));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.invest-card:hover::before { 
    opacity: 0.1; 
}

.invest-card:hover {
    border-color: var(--vivid-green);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(68, 170, 0, 0.2);
}

.invest-card-content { 
    position: relative; 
    z-index: 1; 
}

.invest-card h4 {
    font-size: 1.3rem;
    color: var(--dark-blue);
    margin-bottom: 1rem;
    font-weight: 700;
}

.invest-card p {
    color: #555;
    line-height: 1.8;
}

/* ===== Gallery Slider ===== */
.gallery-slider-container {
    position: relative;
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 60px;
}

.gallery-slider-wrapperUContinue{
overflow: hidden;
border-radius: 20px;
box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.gallery-slider-track {
display: flex;
transition: transform 0.5s ease-in-out;
}
.gallery-slide-group {
min-width: 100%;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1rem;
padding: 1rem;
}
.gallery-slide-item {
position: relative;
overflow: hidden;
border-radius: 12px;
cursor: pointer;
transition: transform 0.3s ease;
aspect-ratio: 4/3;
}
.gallery-slide-item:hover {
transform: scale(1.05);
z-index: 10;
}
.gallery-slide-item img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}.gallery-caption {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
padding: 1.5rem 1rem 1rem;
color: white;
transform: translateY(100%);
transition: transform 0.3s ease;
}.gallery-slide-item:hover .gallery-caption {
transform: translateY(0);
}.gallery-caption h4 {
font-size: 1rem;
margin-bottom: 0.3rem;
font-weight: 600;
}.gallery-caption p {
font-size: 0.85rem;
opacity: 0.9;
}.gallery-slider-control {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(5,29,64, 0.9);
color: white;
border: none;
width: 50px;
height: 50px;
border-radius: 50%;
cursor: pointer;
z-index: 100;
font-size: 1.5rem;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}.gallery-slider-control:hover {
background: var(--vivid-green);
transform: translateY(-50%) scale(1.1);
}.gallery-slider-control.prev {
left: 0;
}.gallery-slider-control.next {
right: 0;
}.gallery-slider-dots {
display: flex;
justify-content: center;
gap: 10px;
margin-top: 2rem;
}.gallery-dot {
width: 12px;
height: 12px;
border-radius: 50%;
background: #ddd;
cursor: pointer;
transition: all 0.3s ease;
}.gallery-dot.active {
background: var(--vivid-green);
width: 30px;
border-radius: 6px;
}

/* ===== PROJECT MAP STYLES ===== */
#novarisProjectMap {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Loading Animation */
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

/* Leaflet Popup Customization */
.novaris-popup .leaflet-popup-content-wrapper {
border-radius: 15px;
box-shadow: 0 8px 25px rgba(0,0,0,0.2);
padding: 0;
overflow: hidden;
}

.novaris-popup .leaflet-popup-content {
margin: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
min-width: 280px;
}

.novaris-popup .leaflet-popup-tip {
background: white;
}

/* Custom Marker Pulse Animation */
.novaris-marker {
animation: markerPulse 2.5s ease-in-out infinite;
}

@keyframes markerPulse {
0%, 100% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.15);
opacity: 0.8;
}
}

/* Map Legend Styling */
.map-legend {
background: white !important;
padding: 15px !important;
border-radius: 12px !important;
box-shadow: 0 3px 15px rgba(0,0,0,0.15) !important;
border: none !important;
}

.map-legend h4 {
margin: 0 0 12px 0 !important;
color: var(--dark-blue) !important;
font-size: 1rem !important;
font-weight: 700 !important;
}

.map-legend-item {
display: flex;
align-items: center;
margin-bottom: 8px;
font-size: 0.9rem;
color: #333;
}

.map-legend-item:last-child {
margin-bottom: 0;
}

.map-legend-color {
width: 16px;
height: 16px;
border-radius: 50%;
margin-right: 10px;
border: 2px solid white;
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Leaflet Control Styling */
.leaflet-control-zoom {
border: none !important;
box-shadow: 0 3px 15px rgba(0,0,0,0.15) !important;
}

.leaflet-control-zoom a {
border-radius: 8px !important;
border: none !important;
width: 40px !important;
height: 40px !important;
line-height: 40px !important;
font-size: 20px !important;
transition: all 0.3s ease !important;
}

.leaflet-control-zoom a:hover {
background: var(--vivid-green) !important;
color: white !important;
}

/* Custom Leaflet Marker Styles */
.custom-marker {
background: transparent !important;
border: none !important;
}

.novaris-marker {
animation: markerPulse 2.5s ease-in-out infinite;
}

@keyframes markerPulse {
0%, 100% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.15);
opacity: 0.8;
}
}

/* Popup Styling */
.leaflet-popup-content-wrapper {
border-radius: 12px !important;
padding: 0 !important;
}

.leaflet-popup-content {
margin: 15px 20px !important;
font-size: 14px !important;
}
/* ===== Job Modals ===== */
.job-modal {
display: none;
position: fixed;
z-index: 10000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.7);
animation: fadeIn 0.3s ease;
}@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}.job-modal-content {
background-color: white;
margin: 2% auto;
padding: 0;
border-radius: 20px;
width: 90%;
max-width: 900px;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
animation: slideDown 0.4s ease;
}@keyframes slideDown {
from {
transform: translateY(-50px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}.job-modal-header {
background: linear-gradient(135deg, var(--dark-blue), #0a3d6e);
color: white;
padding: 2rem;
border-radius: 20px 20px 0 0;
position: relative;
}.job-modal-close {
color: white;
position: absolute;
right: 2rem;
top: 2rem;
font-size: 2rem;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
}.job-modal-close:hover {
background: var(--vivid-green);
transform: rotate(90deg);
}.job-modal-body {
padding: 2.5rem;
}.job-overview-panel {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
background: var(--light-gray);
padding: 1.5rem;
border-radius: 12px;
margin-bottom: 2rem;
}.job-overview-item {
display: flex;
align-items: center;
gap: 0.5rem;
}.job-overview-item strong {
color: var(--dark-blue);
}.job-section {
margin-bottom: 2rem;
}.job-section h3 {
color: var(--dark-blue);
font-size: 1.5rem;
margin-bottom: 1rem;
border-bottom: 2px solid var(--vivid-green);
padding-bottom: 0.5rem;
}.job-section h4 {
color: var(--vivid-green);
font-size: 1.2rem;
margin: 1.5rem 0 0.5rem;
}.job-section ul {
padding-left: 1.5rem;
color: #666;
line-height: 1.9;
}.job-section ul li {
margin-bottom: 0.5rem;
}.job-section p {
color: #666;
line-height: 1.8;
}



/* ===== Application Form ===== */
.application-form {
background: var(--light-gray);
padding: 2rem;
border-radius: 12px;
margin-top: 2rem;
}.form-group {
margin-bottom: 1.5rem;
}.form-group label {
display: block;
color: var(--dark-blue);
font-weight: 600;
margin-bottom: 0.5rem;
}.form-group input,
.form-group textarea,
.form-group select {
width: 100%;
padding: 0.8rem;
border: 2px solid #ddd;
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.3s ease;
font-family: inherit;
}.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
outline: none;
border-color: var(--vivid-green);
}.form-group textarea {
resize: vertical;
min-height: 100px;
}.form-checkbox {
display: flex;
align-items: start;
gap: 0.5rem;
}.form-checkbox input[type="checkbox"] {
width: auto;
margin-top: 0.3rem;
cursor: pointer;
}.form-checkbox label {
cursor: pointer;
margin-bottom: 0;
}.submit-application-btn {
width: 100%;
padding: 1.2rem;
background: var(--vivid-green);
color: white;
border: none;
border-radius: 50px;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}.submit-application-btn:hover {
background: var(--dark-blue);
transform: translateY(-2px);
box-shadow: 0 10px 30px rgba(68, 170, 0, 0.3);
}/* ===== Accordion Styles ===== */
.accordion-item {
background: white;
border-radius: 12px;
margin-bottom: 1rem;
overflow: hidden;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
transition: all 0.3s ease;
}.accordion-item:hover {
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}.accordion-header {
background: linear-gradient(135deg, var(--dark-blue), #0a3d6e);
color: white;
padding: 1.5rem 2rem;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
transition: all 0.3s ease;
}.accordion-header:hover {
background: linear-gradient(135deg, #0a3d6e, var(--vivid-green));
}.accordion-header h4 {
margin: 0;
font-size: 1.3rem;
}.accordion-icon {
font-size: 1.5rem;
transition: transform 0.3s ease;
}.accordion-item.active .accordion-icon {
transform: rotate(180deg);
}.accordion-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.4s ease;
}.accordion-content-inner {
padding: 2rem;
color: #666;
line-height: 1.8;
}.accordion-content-inner h5 {
color: var(--vivid-green);
margin-bottom: 1rem;
}.accordion-content-inner ul {
padding-left: 1.5rem;
margin-bottom: 1.5rem;
}.accordion-content-inner ul li {
margin-bottom: 0.5rem;
}.accordion-item.active .accordion-content {
max-height: 2000px;
}
/* ===== Footer ===== */
footer {
background: var(--dark-blue);
color: white;
padding: 4rem 5% 2rem;
}

.footer-content {
display: grid;
grid-template-columns: repeat(6, 1fr); /* CHANGED: 6 columns instead of 4 */
gap: 2rem; /* REDUCED: from 3rem to 2rem for better fit */
margin-bottom: 3rem;
}

.footer-section h3 {
color: var(--yellow);
margin-bottom: 1.5rem;
font-size: 1.2rem; /* REDUCED: from 1.3rem */
}

.footer-section p,
.footer-section a {
color: rgba(255,255,255,0.8);
text-decoration: none;
display: block;
margin-bottom: 0.8rem;
transition: color 0.3s ease, padding 0.3s ease;
font-size: 0.9rem; /* ADDED: slightly smaller for better fit */
}

.footer-section a:hover {
color: var(--yellow);
padding-left: 5px;
}

.social-links {
display: flex;
gap: 1rem;
margin-top: 1rem;
}

.social-link {
width: 40px;
height: 40px;
background: rgba(255,255,255,0.1);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
text-decoration: none;
color: white;
}

.social-link:hover {
background: var(--vivid-green);
transform: translateY(-5px);
}

.footer-bottom {
text-align: center;
padding-top: 2rem;
border-top: 1px solid rgba(255,255,255,0.1);
color: rgba(255,255,255,0.6);
}
/* ===== Utility Classes ===== */
}.fade-in.visible {
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in:not(.visible) {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
opacity: 1;
transform: translateY(0);
}.boxed-row {
max-width: 1200px;
margin: 0 auto;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 3rem;
align-items: center;
}.boxed-row img {
width: 100%;
border-radius: 20px;
object-fit: cover;
box-shadow: 0 10px 40px rgba(0,0,0,0.12);
display: block;
}.small-collage {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
}.small-collage img {
width: 100%;
height: 160px;
object-fit: cover;
border-radius: 12px;
}.stats-image-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 3rem;
align-items: start;
}/* ===== Video Carousel ===== */
.video-carousel-container {
position: relative;
max-width: 900px;
margin: 40px auto;
overflow: hidden;
border-radius: 12px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
background: var(--light-gray);
}.video-carousel-track {
display: flex;
transition: transform 0.5s ease-in-out;
}.video-slide {
min-width: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
}.video-wrapper {
width: 100%;
max-width: 700px;
aspect-ratio: 16 / 9;
margin-bottom: 20px;
position: relative;
}.video-wrapper video,
.video-wrapper iframe {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 8px;
}.testimonial-caption {
text-align: center;
padding: 10px 0;
}.testimonial-caption h3 {
color: var(--dark-blue);
margin-bottom: 5px;
}.testimonial-caption p {
color: #666;
}.carousel-control {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(5,29,64, 0.7);
color: white;
border: none;
padding: 12px;
cursor: pointer;
z-index: 10;
font-size: 24px;
border-radius: 4px;
transition: background 0.3s;
}.carousel-control:hover {
background: var(--dark-blue);
}.carousel-control.prev {
left: 10px;
}.carousel-control.next {
right: 10px;
}.carousel-dots {
text-align: center;
padding-bottom: 15px;
}.dot {
height: 15px;
width: 15px;
margin: 0 5px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
transition: background-color 0.6s ease;
cursor: pointer;
}.dot.active {
background-color: var(--vivid-green);
}/* ===== Video Container (Who We Are) ===== */
.who-we-are .video-container {
position: relative;
width: 100%;
padding-bottom: 56.25%;
overflow: hidden;
border-radius: 12px;
box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}.who-we-are .video-container video,
.who-we-are .video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
   
}/* ===== Values Grid ===== */
.values-grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 2rem;
}/* ===== SupaNova Features Grid ===== */
.supanova-features-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 2rem;
}/* ===== Events Grid ===== */
.events-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 2rem;
}/* ===== CSR Initiatives Grid ===== */
.csr-initiatives-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 2rem;
}/* ===== Publications Grid ===== */
#publicationsGrid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 2rem;
}.publication-card {
cursor: pointer;
}/* ===== News Timeline ===== */
.news-item {
background: white;
}#newsTimeline {
max-width: 1000px;
margin: 0 auto;
}/* ===== Blog Grid ===== */
#blogGrid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 3rem;
}.blog-article {
cursor: pointer;
}/* ===== Procurement Process Row ===== */
.procurement-process-row {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: nowrap;
overflow-x: auto;
gap: 1rem;
}.procurement-process-row::-webkit-scrollbar {
height: 6px;
}.procurement-process-row::-webkit-scrollbar-thumb {
background: var(--vivid-green);
border-radius: 3px;
}/* ===== Filter Buttons ===== */
.gallery-filter-btn,
.pub-filter-btn,
.news-filter-btn,
.blog-filter-btn {
cursor: pointer;
transition: all 0.3s ease;
}.gallery-filter-btn.active,
.pub-filter-btn.active,
.news-filter-btn.active,
.blog-filter-btn.active {
background: var(--vivid-green) !important;
color: white !important;
}


/* Override the first circle to be white with black text */
#csr-section .cta-section > div > div > div:first-child > div {
background: white !important;
color: var(--dark-blue) !important;
border: 3px solid var(--vivid-green);
}

/* Ensure the number inside first circle is black */
#csr-section .cta-section > div > div > div:first-child > div,
#csr-section .cta-section > div > div > div:first-child h4,
#csr-section .cta-section > div > div > div:first-child p {
color: var(--dark-blue) !important;
}

/* ===== RESPONSIVE DESIGN ===== *//* Extra Large Desktop (1400px and above) */
@media (min-width: 1400px) {
.values-grid {
grid-template-columns: repeat(6, 1fr) !important;
}
}/* Large Desktop to Tablet (1024px and below) */
@media (max-width: 1024px) {
.hero-title { font-size: 3rem; }
.hero-subtitle { font-size: 2rem; }
.hero-description { font-size: 1.1rem; }.stats-grid, 
.impact-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}.boxed-row,
.stats-image-row {
    grid-template-columns: 1fr;
    gap: 2rem;
}.solutions-grid {
    grid-template-columns: 1fr;
}.values-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}.supanova-features-grid,
.events-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}#leadership-section .leadership-team-grid,
.csr-initiatives-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}
/* Portal Features - 2 columns on tablets */
#procurement-section > div > div > div[style*="repeat(4, 1fr)"] {
grid-template-columns: repeat(2, 1fr) !important;
}
}
/* Tablets and Large Mobile (768px and below) */
@media (max-width: 768px) {

    /* Prevent hyphenation on mobile */
.newsletter-title {
font-size: 1.5rem;
line-height: 1.3;
hyphens: none;
word-break: keep-all;
}

.section-title {
font-size: 2rem;
line-height: 1.3;
hyphens: none;
word-break: keep-all;
}

/* Hide top bar on mobile */
.top-bar {
display: none;
}
/* Adjust navigation */
nav {
    top: 0;
    padding: 0.8rem 5%;
}.logo {
    height: 45px;
}
/* Hide desktop nav, show hamburger */
.nav-links {
    display: none;
}.hamburger {
    display: flex;
}

/* Hero adjustments */
.hero {
    padding-top: 100px;
    min-height: 70vh;
}.hero-title {
    font-size: 2.2rem;
    line-height: 1.2;
}.hero-subtitle {
    font-size: 1.4rem;
}.hero-description {
    font-size: 1rem;
    padding: 0 1rem;
}.cta-buttons {
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
}.btn {
    width: 100%;
    padding: 1rem;
}
/* Section headers */
.section-title {
    font-size: 2rem;
}.section-description {
    font-size: 1rem;
}
/* Single column layouts */
.stats-grid, 
.impact-metrics,
#publicationsGrid,
.invest-cards,
.solutions-grid,
.insights-grid,
#blogGrid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
}
.stat-card, 
.metric-card {
    padding: 2rem 1.5rem;
}.boxed-row,
.stats-image-row,
.partners-intro-grid,
.partners-cards-2x2,
#contact-page .boxed-row {
    grid-template-columns: 1fr !important;
    gap: 2rem;
}.stats-image-row .stats-grid {
    order: 2;
}.stats-image-row > div:last-child {
    order: 1;
}.boxed-row img {
    height: 250px;
    object-fit: cover;
}.solution-card {
    padding: 2rem;
}

/* Partners grid - 2 columns */
.partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}.partner-logo {
    height: 100px;
    padding: 1rem;
}

/* Newsletter form */
.newsletter-form {
    flex-direction: column;
}.newsletter-input {
    width: 100%;
    min-width: auto;
}

/* Gallery slider */
.gallery-slide-group {
    grid-template-columns: 1fr;
}.gallery-slider-container {
    padding: 0 20px;
}.gallery-slider-control {
    width: 35px;
    height: 35px;
    font-size: 1rem;
}

/* Job modals */
.job-modal-content {
    width: 95%;
    margin: 5% auto;
}.job-modal-header,
.job-modal-body {
    padding: 1.5rem;
}.job-overview-panel {
    grid-template-columns: 1fr;
}

/* Values grid */
.values-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
}.values-grid > div {
    padding: 1.5rem 1rem;
}.values-grid img {
    height: 80px;
}.values-grid h4 {
    font-size: 0.95rem;
}

/* Leadership, CSR, SupaNova, Events */
#leadership-section .leadership-team-grid,
.csr-initiatives-grid,
.supanova-features-grid,
.events-grid {
    grid-template-columns: 1fr !important;
}
/* Footer */
.footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
}/* Section padding adjustments */
.who-we-are, 
.what-we-do, 
.impact, 
.insights-section, 
.partners-section {
    padding: 4rem 1rem;
}
section {
    padding-left: 1rem;
    padding-right: 1rem;
}/* Small collage */
.small-collage {
    grid-template-columns: repeat(2, 1fr);
}/* Procurement process scroll */
.procurement-process-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
} 


/* Portal Features - 1 column on mobile */
#procurement-section > div > div > div[style*="repeat(4, 1fr)"] {
grid-template-columns: 1fr !important;
}
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
.hero-title {
font-size: 1.8rem;
}.hero-subtitle {
    font-size: 1.2rem;
}.section-title {
    font-size: 1.7rem;
}.stat-number, 
.metric-value {
    font-size: 2rem;
}.partners-grid {
    grid-template-columns: 1fr;
}.btn {
    font-size: 1rem;
    padding: 0.9rem;
}.values-grid,
.small-collage {
    grid-template-columns: 1fr !important;
}
}/* Landscape Orientation on Phones */
@media (max-width: 896px) and (orientation: landscape) {
.hero {
min-height: 100vh;
}.hero-title {
    font-size: 2rem;
}
}/* iPad and Tablets (768px to 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
.stats-grid,
.impact-metrics {
grid-template-columns: repeat(2, 1fr);
}#leadership-section .leadership-team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}.partners-grid {
    grid-template-columns: repeat(3, 1fr);
}#publicationsGrid {
    grid-template-columns: repeat(2, 1fr) !important;
}
}/* Print Styles */
@media print {
.top-bar,
nav,
.hamburger,
.mobile-menu,
.menu-overlay,
.cta-buttons,
.newsletter-section,
footer {
display: none;
}.page {
    display: block !important;
}body {
    font-size: 12pt;
    line-height: 1.5;
}.hero {
    min-height: auto;
    padding: 2rem 1rem;
}
}
/* ===== MOBILE FIXES ===== */

/* 1. Fix Flagship Initiatives Stats on Projects Page - Mobile */
@media (max-width: 768px) {
/* Flagship section stats grid - stack vertically on mobile */
#flagship-section .impact-metrics,
#flagship-section > div > div > div:last-child {
grid-template-columns: 1fr !important;
gap: 1.5rem;
}

/* Ensure flagship stats cards don't overflow */
#flagship-section .metric-card,
#flagship-section .stat-card {
padding: 1.5rem 1rem;
word-wrap: break-word;
overflow-wrap: break-word;
}

#flagship-section .metric-value,
#flagship-section .stat-number {
font-size: 2rem;
}

#flagship-section .metric-label,
#flagship-section .stat-label {
font-size: 0.95rem;
line-height: 1.3;
}
}

/* 2. Fix Solutions Page Layout - Mobile (Image first, then text) */
@media (max-width: 768px) {
/* Solutions page - reorder image and text */
#solutions-page .boxed-row {
display: flex;
flex-direction: column;
}

/* Image always comes first */
#solutions-page .boxed-row > div:first-child,
#solutions-page .boxed-row > img {
order: 1;
margin-bottom: 1.5rem;
}

/* Text content comes second */
#solutions-page .boxed-row > div:last-child {
order: 2;
}

/* Ensure solution cards don't overflow */
#solutions-page .solution-card {
padding: 1.5rem;
word-wrap: break-word;
overflow-wrap: break-word;
}

#solutions-page .solution-title {
font-size: 1.4rem;
line-height: 1.3;
margin-bottom: 1rem;
}

#solutions-page .solution-description {
font-size: 0.95rem;
line-height: 1.6;
}

/* Solutions section specific adjustments */
#solar-minigrids .boxed-row,
#hybrid-systems .boxed-row,
#waste-energy .boxed-row,
#energy-efficiency .boxed-row,
#digital-solutions .boxed-row {
grid-template-columns: 1fr !important;
}

/* Ensure images are properly sized */
#solutions-page .boxed-row img {
width: 100%;
height: auto;
min-height: 200px;
max-height: 300px;
object-fit: cover;
}
}



/* 3. Fix Events Section on Insights Page - Mobile */
@media (max-width: 768px) {
/* Events grid - single column on mobile */
#events-section .events-grid,
#events-section > div > div {
grid-template-columns: 1fr !important;
gap: 2rem;
}

/* Event cards - better spacing and readability */
#events-section > div > div > div {
padding: 1.5rem;
margin-bottom: 1.5rem;
}

/* Event header styling */
#events-section h3 {
font-size: 1.2rem;
line-height: 1.3;
margin-bottom: 0.5rem;
word-wrap: break-word;
}

/* Event details */
#events-section p {
font-size: 0.9rem;
line-height: 1.5;
word-wrap: break-word;
overflow-wrap: break-word;
}

/* Event images */
#events-section img {
max-width: 100%;
height: auto;
margin-bottom: 1rem;
}

/* Event buttons */
#events-section a,
#events-section button {
padding: 0.8rem 1.5rem;
font-size: 0.9rem;
margin-bottom: 0.5rem;
display: block;
width: 100%;
text-align: center;
}
}

/* 4. Fix Partners Page Layout - Quote above cards on mobile */
@media (max-width: 768px) {
/* Partner with us section reorder */
#partner-with-us-section .partners-intro-grid,
#partner-with-us-section > div > div:first-of-type {
display: flex;
flex-direction: column;
}

/* Quote section comes first */
#partner-with-us-section .partners-intro-grid > div:first-child {
order: 1;
margin-bottom: 2rem;
text-align: center;
}

/* Cards section comes second */
#partner-with-us-section .partners-intro-grid > div:last-child,
#partner-with-us-section .partners-cards-2x2 {
order: 2;
grid-template-columns: 1fr;
}

/* Quote text styling */
#partner-with-us-section .partners-intro-grid > div:first-child p {
font-size: 1rem;
line-height: 1.7;
text-align: center;
margin-bottom: 1rem;
padding: 0 1rem;
}

/* Cards better spacing */
#partner-with-us-section .partners-cards-2x2 > div {
padding: 1.5rem;
margin-bottom: 1rem;
}

#partner-with-us-section .partners-cards-2x2 h4 {
font-size: 1.1rem;
line-height: 1.3;
margin-bottom: 0.8rem;
}

#partner-with-us-section .partners-cards-2x2 p {
font-size: 0.9rem;
line-height: 1.6;
}
}

/* Additional safety for text overflow across all pages */
@media (max-width: 768px) {
/* Prevent text overflow in all cards and containers */
.stat-card,
.metric-card,
.solution-card,
.insight-card,
.partner-logo,
.invest-card,
.accordion-content-inner,
.job-section,
.form-group {
word-wrap: break-word;
overflow-wrap: break-word;
hyphens: auto;
}

/* Ensure all headings wrap properly */
h1, h2, h3, h4, h5, h6 {
word-wrap: break-word;
overflow-wrap: break-word;
hyphens: auto;
}

/* Ensure all paragraphs and text wrap properly */
p, span, div, li {
word-wrap: break-word;
overflow-wrap: break-word;
}

/* Prevent horizontal scroll from any element */
/* FIXED: Exclude Leaflet map elements to prevent marker issues */
*:not(.leaflet-marker-icon):not(.leaflet-marker-icon *):not(.leaflet-popup):not(.leaflet-popup *):not(.leaflet-container):not(.leaflet-container *) {
max-width: 100%;
}

img, video, iframe {
max-width: 100%;
height: auto;
}
}

/* Extra specificity for Flagship section stats */
@media (max-width: 768px) {
/* Target the specific stats grid in flagship section */
section[style*="background:var(--dark-blue)"] .impact-metrics,
section[style*="background:var(--dark-blue)"] > div > div > div[style*="grid-template-columns"] {
grid-template-columns: 1fr !important;
}

/* Ensure the "Energising Healthcare Programme" stats work properly */
#flagship-section > div > div[style*="grid-template-columns"] {
grid-template-columns: 1fr !important;
gap: 1.5rem;
}
}

/* Specific fix for Solutions page content sections */
@media (max-width: 768px) {
/* All solution detail sections */
#solutions-page section > div > div[style*="grid-template-columns"],
#solar-minigrids > div,
#hybrid-systems > div,
#waste-energy > div,
#energy-efficiency > div,
#digital-solutions > div {
display: flex !important;
flex-direction: column !important;
}

/* Ensure proper spacing */
#solutions-page section > div > div[style*="grid-template-columns"] > div,
#solutions-page section > div > div[style*="grid-template-columns"] > img {
width: 100%;
margin-bottom: 1.5rem;
}
}

/* Specific fix for Events section styling */
@media (max-width: 768px) {
/* Events cards container */
#events-section > div > div[style*="display:grid"] {
display: grid !important;
grid-template-columns: 1fr !important;
gap: 2rem !important;
}

/* Individual event cards */
#events-section > div > div > div[style*="background:white"] {
display: flex;
flex-direction: column;
padding: 1.5rem !important;
}

/* Event card headers */
#events-section > div > div > div[style*="background:white"] > div:first-child {
padding: 1rem !important;
margin-bottom: 1rem;
}

/* Event card content */
#events-section > div > div > div[style*="background:white"] > div:last-child {
padding: 1rem !important;
}

/* Event buttons container */
#events-section > div > div > div[style*="background:white"] > div:last-child > div {
display: flex;
flex-direction: column;
gap: 0.8rem;
}
}

/* Partners page quote section specific fix */
@media (max-width: 768px) {
/* The specific quote + cards layout */
#partner-with-us-section > div > div[style*="display: grid"] {
display: flex !important;
flex-direction: column !important;
}

/* Quote section (left side on desktop) */
#partner-with-us-section > div > div > div:first-child {
order: 1;
margin-bottom: 2rem;
padding: 1.5rem;
}

/* Cards grid (right side on desktop) */
#partner-with-us-section > div > div > div:last-child {
order: 2;
}

/* Inner cards grid */
#partner-with-us-section > div > div > div:last-child > div {
display: grid !important;
grid-template-columns: 1fr !important;
gap: 1.5rem !important;
}
}

/* Additional mobile optimization for small screens (480px and below) */
@media (max-width: 480px) {
/* Reduce padding on very small screens */
.stat-card,
.metric-card,
.solution-card {
padding: 1.2rem;
}

/* Smaller font sizes for very small screens */
.section-title {
font-size: 1.5rem;
}

.section-description {
font-size: 0.95rem;
}

/* Event cards on very small screens */
#events-section > div > div > div {
padding: 1.2rem !important;
}

#events-section h3 {
font-size: 1.1rem;
}

#events-section p {
font-size: 0.85rem;
}
}
/* ===== INSIGHTS PAGE - COMPLETE CSS WITH ALL MOBILE ADJUSTMENTS ===== */

/* Publications Section - Slider on Mobile */
@media (max-width: 768px) {
/* Publications grid - horizontal scroll slider */
#publicationsGrid {
display: flex !important;
overflow-x: auto !important;
overflow-y: hidden !important;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;
gap: 1rem !important;
padding: 1rem 0.5rem !important;
margin: 0 -1rem !important;
padding-left: 1rem !important;
padding-right: 1rem !important;
grid-template-columns: none !important;
}

/* Publication cards - fixed width for sliding */
#publicationsGrid > div {
flex: 0 0 85% !important;
scroll-snap-align: start;
min-width: 280px !important;
max-width: 350px !important;
}

/* Publication card content - ensure no overflow */
.publication-card {
word-wrap: break-word;
overflow-wrap: break-word;
}

.publication-card h3 {
font-size: 1.1rem !important;
line-height: 1.3;
margin-bottom: 0.8rem;
}

.publication-card p {
font-size: 0.9rem !important;
line-height: 1.6;
}

/* Scrollbar styling */
#publicationsGrid::-webkit-scrollbar {
height: 6px;
}

#publicationsGrid::-webkit-scrollbar-track {
background: var(--light-gray);
border-radius: 10px;
}

#publicationsGrid::-webkit-scrollbar-thumb {
background: var(--vivid-green);
border-radius: 10px;
}

/* Add swipe indicator */
#publications-section::after {
content: '← Swipe to see more publications →';
display: block;
text-align: center;
color: var(--vivid-green);
font-size: 0.85rem;
margin-top: 1rem;
font-weight: 600;
}
}

/* Featured Story Section - Stack Vertically on Mobile */
@media (max-width: 768px) {
/* Featured story banner - stack vertically */
#news-section > div:first-of-type,
#news-section > div > div[style*="display:grid"][style*="grid-template-columns:1fr 1fr"] {
display: flex !important;
flex-direction: column !important;
border-radius: 20px;
overflow: hidden;
}

/* Text content first */
#news-section > div > div > div:first-child {
order: 1;
padding: 2rem 1.5rem !important;
width: 100% !important;
}

/* Image second */
#news-section > div > div > div:last-child {
order: 2;
min-height: 250px !important;
height: 300px !important;
width: 100% !important;
}

#news-section > div > div > div:last-child img {
width: 100%;
height: 100%;
object-fit: cover;
}

/* Adjust featured story text */
#news-section h3 {
font-size: 1.4rem !important;
line-height: 1.3;
margin-bottom: 1rem;
}

#news-section p {
font-size: 0.95rem !important;
line-height: 1.6;
margin-bottom: 1rem;
}

#news-section a {
display: inline-block;
margin-top: 1rem;
}
}

/* News Timeline - Better Mobile Layout */
@media (max-width: 768px) {
#newsTimeline {
padding: 0 1rem;
}

.news-item {
margin-bottom: 1.5rem !important;
padding: 1.5rem !important;
border-radius: 15px;
}

.news-item > div {
flex-direction: column !important;
gap: 1rem !important;
}

.news-item > div > div {
width: 100% !important;
min-width: 100% !important;
flex: none !important;
}

.news-item h4 {
font-size: 1.2rem !important;
line-height: 1.3;
margin-bottom: 0.8rem;
}

.news-item p {
font-size: 0.9rem !important;
line-height: 1.6;
}

.news-item a {
width: 100% !important;
margin-top: 1rem !important;
padding: 0.8rem 1.5rem !important;
text-align: center;
display: block;
}
}

/* Blog Section - Single Column on Mobile */
@media (max-width: 768px) {
#blogGrid {
grid-template-columns: 1fr !important;
gap: 2rem !important;
padding: 0 1rem;
}

.blog-article {
margin-bottom: 1rem;
}

/* Blog article images */
.blog-article img {
height: 200px !important;
width: 100%;
object-fit: cover;
}

/* Blog article content */
.blog-article h3 {
font-size: 1.3rem !important;
line-height: 1.3;
margin-bottom: 0.8rem;
}

.blog-article p {
font-size: 0.95rem !important;
line-height: 1.6;
}
}

/* Events Section - FULL WIDTH SLIDER (ONE CARD AT A TIME) */
@media (max-width: 768px) {
/* Create full-width horizontal scroll container */
#events-section > div > div[style*="display:grid"],
#events-section .events-grid {
display: flex !important;
overflow-x: auto !important;
overflow-y: hidden !important;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;
gap: 1.5rem !important;
padding: 1rem 0 !important;
margin: 0 -5% !important;
padding-left: 5% !important;
padding-right: 5% !important;
}

/* Individual event cards - FULL WIDTH (one at a time) */
#events-section > div > div > div,
#events-section .events-grid > div {
flex: 0 0 90% !important;
scroll-snap-align: center;
min-width: 90vw !important;
max-width: 90vw !important;
margin-right: 0 !important;
}

/* Event card structure - ensure everything is visible */
#events-section > div > div > div > div:first-child,
#events-section .events-grid > div > div:first-child {
padding: 1.5rem !important;
min-height: auto !important;
}

#events-section > div > div > div > div:last-child,
#events-section .events-grid > div > div:last-child {
padding: 1.5rem !important;
}

/* Event logos/images - better sizing */
#events-section > div > div > div img,
#events-section .events-grid img {
max-height: 80px !important;
width: auto !important;
object-fit: contain !important;
margin: 0 auto 1rem !important;
display: block;
}

/* Event titles - readable size */
#events-section > div > div > div h3,
#events-section .events-grid h3 {
font-size: 1.3rem !important;
line-height: 1.4 !important;
margin-bottom: 0.8rem !important;
word-wrap: break-word;
overflow-wrap: break-word;
}

/* Event descriptions - proper spacing */
#events-section > div > div > div h4,
#events-section .events-grid h4 {
font-size: 1.1rem !important;
line-height: 1.4 !important;
margin-bottom: 0.8rem !important;
word-wrap: break-word;
}

#events-section > div > div > div p,
#events-section .events-grid p {
font-size: 0.95rem !important;
line-height: 1.6 !important;
margin-bottom: 1rem !important;
word-wrap: break-word;
overflow-wrap: break-word;
}

/* CTA Buttons - Full width and clearly visible */
#events-section > div > div > div > div:last-child > div,
#events-section .events-grid > div > div:last-child > div {
display: flex !important;
flex-direction: column !important;
gap: 1rem !important;
width: 100% !important;
}

#events-section > div > div > div a,
#events-section > div > div > div button,
#events-section .events-grid a,
#events-section .events-grid button {
width: 100% !important;
padding: 1rem 1.5rem !important;
font-size: 1rem !important;
text-align: center !important;
display: block !important;
border-radius: 25px !important;
margin-bottom: 0 !important;
box-sizing: border-box;
}

/* Scrollbar styling */
#events-section > div > div::-webkit-scrollbar,
#events-section .events-grid::-webkit-scrollbar {
height: 8px;
margin-top: 1rem;
}

#events-section > div > div::-webkit-scrollbar-track,
#events-section .events-grid::-webkit-scrollbar-track {
background: var(--light-gray);
border-radius: 10px;
margin: 0 5%;
}

#events-section > div > div::-webkit-scrollbar-thumb,
#events-section .events-grid::-webkit-scrollbar-thumb {
background: var(--vivid-green);
border-radius: 10px;
}

/* Swipe indicator - more prominent */
#events-section > div::after {
content: '← Swipe to see more events →';
display: block;
text-align: center;
color: var(--vivid-green);
font-size: 0.9rem;
margin-top: 1.5rem;
font-weight: 600;
letter-spacing: 0.5px;
}

/* Add pagination dots indicator */
#events-section .section-header::after {
content: '• • • •';
display: block;
text-align: center;
color: var(--vivid-green);
font-size: 1.5rem;
margin-top: 1rem;
letter-spacing: 0.5rem;
}
}

/* Filter Buttons - Better Mobile Display */
@media (max-width: 768px) {
/* Filter buttons container - allow wrapping */
#publications-section > div[style*="text-align:center"],
#news-section > div[style*="text-align:center"],
#blog-section > div[style*="text-align:center"] {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.5rem;
padding: 0 1rem;
margin-bottom: 2rem;
}

/* Individual filter buttons */
.pub-filter-btn,
.news-filter-btn,
.blog-filter-btn {
padding: 0.6rem 1.2rem !important;
margin: 0.3rem !important;
font-size: 0.85rem !important;
white-space: nowrap;
flex-shrink: 0;
}
}

/* Newsletter Widget - Mobile Optimization */
@media (max-width: 768px) {
#insights-subscription-widget {
margin: 3rem 1rem 0;
padding: 2rem 1.5rem;
}

#insights-subscription-widget h3 {
font-size: 1.5rem;
}

#insights-subscription-widget p {
font-size: 0.95rem;
}

#insights-newsletter-form {
flex-direction: column;
width: 100%;
}

#insights-email-input {
width: 100% !important;
min-width: 100%;
}

#insights-subscribe-btn {
width: 100%;
}
}

/* Insights Page - Overall Section Spacing */
@media (max-width: 768px) {
#publications-section,
#news-section,
#blog-section,
#events-section {
padding: 4rem 1rem !important;
}

/* Section headers on insights page */
#publications-section .section-header,
#news-section .section-header,
#blog-section .section-header,
#events-section .section-header {
margin-bottom: 2rem;
padding: 0 0.5rem;
}

.section-header .section-title {
font-size: 2rem;
}

.section-header .section-description {
font-size: 1rem;
}
}

/* Very Small Screens (480px and below) */
@media (max-width: 480px) {
/* Publications on very small screens */
#publicationsGrid > div {
flex: 0 0 90% !important;
min-width: 260px !important;
}

/* Featured story adjustments */
#news-section h3 {
font-size: 1.2rem !important;
}

#news-section > div > div > div:first-child {
padding: 1.5rem 1rem !important;
}

/* Events cards on very small screens */
#events-section > div > div > div,
#events-section .events-grid > div {
flex: 0 0 95% !important;
min-width: 95vw !important;
max-width: 95vw !important;
}

/* Slightly smaller text on very small screens */
#events-section > div > div > div h3,
#events-section .events-grid h3 {
font-size: 1.2rem !important;
}

#events-section > div > div > div h4,
#events-section .events-grid h4 {
font-size: 1rem !important;
}

#events-section > div > div > div p,
#events-section .events-grid p {
font-size: 0.9rem !important;
}

/* Buttons remain prominent */
#events-section > div > div > div a,
#events-section > div > div > div button,
#events-section .events-grid a,
#events-section .events-grid button {
padding: 0.9rem 1.2rem !important;
font-size: 0.95rem !important;
}

/* Section titles smaller */
.section-header .section-title {
font-size: 1.7rem;
}

.section-header .section-description {
font-size: 0.95rem;
}
}

/* Landscape Mode on Phones */
@media (max-width: 896px) and (orientation: landscape) {
/* Events - show more than one if space allows */
#events-section > div > div > div,
#events-section .events-grid > div {
flex: 0 0 70% !important;
min-width: 70vw !important;
max-width: 70vw !important;
}

/* Publications */
#publicationsGrid > div {
flex: 0 0 45% !important;
}
}

/* Tablet Size (768px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
/* Events - Show 2 cards at a time on tablets */
#events-section > div > div[style*="display:grid"],
#events-section .events-grid {
display: flex !important;
overflow-x: auto !important;
scroll-snap-type: x mandatory;
gap: 1.5rem !important;
}

#events-section > div > div > div,
#events-section .events-grid > div {
flex: 0 0 48% !important;
min-width: 45vw !important;
scroll-snap-align: start;
}

/* Publications - 2 columns */
#publicationsGrid {
grid-template-columns: repeat(2, 1fr) !important;
}

/* Blog grid - 2 columns */
#blogGrid {
grid-template-columns: repeat(2, 1fr) !important;
}
}

/* Touch Optimization - Ensure Smooth Swiping */
@media (hover: none) and (pointer: coarse) {
#events-section > div > div[style*="display:grid"],
#events-section .events-grid,
#publicationsGrid {
scroll-behavior: smooth;
scroll-padding: 0 5%;
}

/* Larger touch targets */
#events-section > div > div > div a,
#events-section > div > div > div button,
#events-section .events-grid a,
#events-section .events-grid button,
.news-item a,
.blog-article a,
.publication-card a {
min-height: 48px;
touch-action: manipulation;
}
}

/* Prevent Text Overflow on All Insights Page Elements */
@media (max-width: 768px) {
#publications-section *,
#news-section *,
#blog-section *,
#events-section * {
word-wrap: break-word;
overflow-wrap: break-word;
}

/* Ensure images don't cause overflow */
#publications-section img,
#news-section img,
#blog-section img,
#events-section img {
max-width: 100%;
height: auto;
}
}

/* ========================================
PROJECTS PAGE - MOBILE FIXES (CORRECTED)
======================================== */

/* 1. Fix Map Stats Grid - Mobile Responsive */
@media (max-width: 768px) {
/* Map stats container - stack vertically on mobile */
#novarisProjectMap ~ div > div[style*="grid-template-columns"] {
grid-template-columns: 1fr 1fr !important;
gap: 1rem !important;
}

/* Individual stat cards - adjust font sizes */
#novarisProjectMap ~ div > div > div {
padding: 1rem 0.75rem !important;
}

#novarisProjectMap ~ div > div > div > div:first-child {
font-size: 1.5rem !important;
}

#novarisProjectMap ~ div > div > div > div:last-child {
font-size: 0.85rem !important;
}
}

@media (max-width: 480px) {
/* Single column on very small screens */
#novarisProjectMap ~ div > div[style*="grid-template-columns"] {
grid-template-columns: 1fr !important;
}
}

/* 2. Prevent Text Hyphenation - TARGETED (Not Global) */
.page h1,
.page h2,
.page h3,
.page h4,
.page h5,
.page h6,
.page .section-title,
.page .hero-title,
.page .stat-label,
.page .metric-label,
.page .newsletter-title,
.page p,
.page span,
.page div:not([class*="leaflet"]):not([id*="map"]) {
hyphens: none !important;
-webkit-hyphens: none !important;
-moz-hyphens: none !important;
word-break: normal !important;
}

/* Allow word breaking for long words only in text content */
.page p,
.page li,
.page .section-description {
overflow-wrap: break-word !important;
word-wrap: break-word !important;
}

/* 3. Project Detail Pages - Mobile Responsive */
@media (max-width: 768px) {
/* Ibogo, Erikorodo, Benue detail pages - container padding */
#ibogo-project-page section,
#erikorodo-detail-page section,
#benue-detail-page section {
padding-left: 1rem !important;
padding-right: 1rem !important;
}

/* Quick stats bar at top of detail pages */
#ibogo-project-page section > div > div[style*="background:var(--dark-blue)"] {
grid-template-columns: 1fr 1fr !important;
gap: 1rem !important;
padding: 1.5rem 1rem !important;
}

/* Individual stat boxes */
#ibogo-project-page section > div > div[style*="background:var(--dark-blue)"] > div {
padding: 1rem 0.75rem !important;
}

/* Reduce stat number font size */
#ibogo-project-page section > div > div[style*="background:var(--dark-blue)"] > div > div:first-child {
font-size: 1.5rem !important;
}

/* Reduce stat label font size */
#ibogo-project-page section > div > div[style*="background:var(--dark-blue)"] > div > div:last-child {
font-size: 0.8rem !important;
line-height: 1.3 !important;
}

/* Content grids - stack vertically */
#ibogo-project-page .flipbook-page,
#erikorodo-detail-page > section > div,
#benue-detail-page > section > div {
display: flex !important;
flex-direction: column !important;
}

/* All grid layouts on detail pages */
#ibogo-project-page div[style*="display:grid"],
#erikorodo-detail-page div[style*="display:grid"],
#benue-detail-page div[style*="display:grid"] {
grid-template-columns: 1fr !important;
gap: 1.5rem !important;
}

/* Card padding adjustments */
#ibogo-project-page .flipbook-page > div,
#erikorodo-detail-page .invest-card,
#benue-detail-page .invest-card {
padding: 1.5rem 1rem !important;
margin-left: 0 !important;
margin-right: 0 !important;
}

/* Headings - responsive sizing */
#ibogo-project-page h1 {
font-size: 1.8rem !important;
}

#ibogo-project-page h2,
#erikorodo-detail-page h2,
#benue-detail-page h2 {
font-size: 1.5rem !important;
}

#ibogo-project-page h3,
#erikorodo-detail-page h3,
#benue-detail-page h3 {
font-size: 1.2rem !important;
}

/* Paragraphs and lists */
#ibogo-project-page p,
#ibogo-project-page li,
#erikorodo-detail-page p,
#erikorodo-detail-page li,
#benue-detail-page p,
#benue-detail-page li {
font-size: 0.95rem !important;
line-height: 1.6 !important;
}

/* Images - ensure they don't overflow */
#ibogo-project-page img,
#erikorodo-detail-page img,
#benue-detail-page img {
max-width: 100% !important;
height: auto !important;
}

/* Buttons - full width on mobile */
#ibogo-project-page .btn,
#ibogo-project-page button,
#erikorodo-detail-page .btn,
#erikorodo-detail-page button,
#benue-detail-page .btn,
#benue-detail-page button {
width: 100% !important;
display: block !important;
margin-bottom: 1rem !important;
}

/* Button containers - stack vertically */
#ibogo-project-page .cta-buttons,
#erikorodo-detail-page .cta-buttons,
#benue-detail-page .cta-buttons {
flex-direction: column !important;
gap: 1rem !important;
}
}

/* 4. Very Small Screens (480px and below) */
@media (max-width: 480px) {
/* Single column for stats bar */
#ibogo-project-page section > div > div[style*="background:var(--dark-blue)"] {
grid-template-columns: 1fr !important;
}

/* Further reduce padding */
#ibogo-project-page section,
#erikorodo-detail-page section,
#benue-detail-page section {
padding-left: 0.75rem !important;
padding-right: 0.75rem !important;
}

/* Hero titles - smaller on tiny screens */
#ibogo-project-page .hero-title,
#erikorodo-detail-page .hero-title,
#benue-detail-page .hero-title {
font-size: 1.6rem !important;
}

/* Breadcrumb - smaller text */
#ibogo-project-page .hero-content > div:first-child,
#erikorodo-detail-page .hero-content > div:first-child,
#benue-detail-page .hero-content > div:first-child {
font-size: 0.75rem !important;
}
}

/* 5. Prevent Horizontal Scroll - ONLY FOR PAGE CONTENT */
.page {
overflow-x: hidden !important;
max-width: 100vw !important;
}

.page > section {
max-width: 100vw !important;
overflow-x: hidden !important;
}

/* 6. Sidebar on detail pages - mobile stacking */
@media (max-width: 768px) {
/* Sidebar layout - stack below content */
#ibogo-project-page > section > div > div[style*="grid-template-columns: 1fr 350px"] {
display: flex !important;
flex-direction: column !important;
}

/* Sidebar sticky positioning - remove on mobile */
#ibogo-project-page > section > div > div > div[style*="position:sticky"] {
position: relative !important;
top: auto !important;
margin-top: 2rem !important;
}
}

/* 7. Timeline/Process Sections - Mobile Friendly */
@media (max-width: 768px) {
/* Timeline items */
#ibogo-project-page div[style*="position:relative; margin-bottom:3rem"] {
padding-left: 2rem !important;
}

/* Process flow arrows - hide on mobile */
#ibogo-project-page div[style*="font-size:2rem; color:var(--vivid-green)"] {
display: none !important;
}
}

/* 8. CRITICAL: Exclude Leaflet Map from All Fixes */
#novarisProjectMap,
#novarisProjectMap *,
.leaflet-container,
.leaflet-container *,
.leaflet-popup,
.leaflet-popup *,
.leaflet-marker-icon,
.leaflet-control,
.leaflet-control * {
hyphens: auto !important;
word-break: normal !important;
overflow-wrap: normal !important;
max-width: none !important;
}

/* CRITICAL: Force Leaflet markers to be visible */
.leaflet-marker-icon {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

.leaflet-marker-pane {
    z-index: 600 !important;
}

/* Ensure map container stays full width */
#novarisProjectMap {
width: 100% !important;
max-width: 100% !important;
}

/* ========================================
FLIPBOOK STYLES
======================================== */

/* Flipbook Modal Overlay */
.flipbook-modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.95);
z-index: 10000;
overflow: hidden;
}

.flipbook-modal.active {
display: flex;
align-items: center;
justify-content: center;
}

/* Flipbook Container */
.flipbook-container {
position: relative;
width: 90%;
max-width: 1200px;
height: 85vh;
background: #f5f5f5;
border-radius: 8px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: column;
}

/* Flipbook Header */
.flipbook-header {
background: linear-gradient(135deg, var(--dark-blue), #0a3d6e);
color: white;
padding: 1.5rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
border-radius: 8px 8px 0 0;
}

.flipbook-title {
font-size: 1.5rem;
font-weight: 700;
margin: 0;
}

.flipbook-close {
background: rgba(255, 255, 255, 0.1);
border: none;
color: white;
font-size: 2rem;
width: 45px;
height: 45px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}

.flipbook-close:hover {
background: var(--vivid-green);
transform: rotate(90deg);
}

/* Flipbook Content Area */
.flipbook-content {
flex: 1;
padding: 2rem;
overflow: hidden;
position: relative;
display: flex;
align-items: center;
justify-content: center;

}

/* The actual flipbook */
#flipbook {
width: 100%;
height: 100%;
max-width: 900px;
max-height: 700px;
margin: 0 auto;

}

#flipbook .page {
background: white;
display: flex;
flex-direction: column;
justify-content: flex-start;
padding: 3rem;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
overflow-y: auto;
box-sizing: border-box;
}

#flipbook .page::-webkit-scrollbar {
width: 6px;
}

#flipbook .page::-webkit-scrollbar-thumb {
background: var(--vivid-green);
border-radius: 3px;
}

/* Page Content Styling */
.page-content h2 {
color: var(--dark-blue);
font-size: 2rem;
margin-bottom: 1.5rem;
border-bottom: 3px solid var(--vivid-green);
padding-bottom: 0.8rem;
}

.page-content h3 {
color: var(--vivid-green);
font-size: 1.5rem;
margin: 2rem 0 1rem;
}

.page-content h4 {
color: var(--dark-blue);
font-size: 1.2rem;
margin: 1.5rem 0 0.8rem;
}

.page-content p {
color: #666;
line-height: 1.8;
margin-bottom: 1rem;
}

.page-content ul {
color: #666;
line-height: 2;
padding-left: 2rem;
margin-bottom: 1rem;
}

.page-content .stat-box {
background: var(--light-gray);
padding: 1.5rem;
border-radius: 12px;
border-left: 5px solid var(--vivid-green);
margin: 1.5rem 0;
}

/* Flipbook Controls */
.flipbook-controls {
background: var(--dark-blue);
padding: 1.5rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
border-radius: 0 0 8px 8px;
}

.flipbook-nav {
display: flex;
gap: 1rem;
}

.flipbook-btn {
background: var(--vivid-green);
color: white;
border: none;
padding: 0.8rem 1.5rem;
border-radius: 50px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 0.5rem;
}

.flipbook-btn:hover {
background: var(--yellow);
color: var(--dark-blue);
transform: translateY(-2px);
}

.flipbook-btn:disabled {
background: #666;
cursor: not-allowed;
opacity: 0.5;
}

.flipbook-page-indicator {
color: white;
font-size: 1.1rem;
font-weight: 600;
}

/* Cover Page Special Styling */
#flipbook .page.cover {
background: linear-gradient(135deg, var(--vivid-green), #66bb33);
color: white;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}

#flipbook .page.cover h1 {
font-size: 3rem;
margin-bottom: 1rem;
color: white;
}

#flipbook .page.cover p {
font-size: 1.5rem;
color: rgba(255, 255, 255, 0.9);
}

/* Mobile Responsive */
@media (max-width: 768px) {
.flipbook-container {
width: 95%;
height: 90vh;
}

#flipbook .page {
padding: 1.5rem;
}

.page-content h2 {
font-size: 1.5rem;
}

.flipbook-controls {
flex-direction: column;
gap: 1rem;
}

#flipbook .page.cover h1 {
font-size: 2rem;
}
}

/* ========================================
   MOBILE RESPONSIVE FIXES
   ======================================== */

/* ========================================
   FIX 1: Social Media Icons - Proper Sizing
   ======================================== */

/* Make social icons fit properly in circles */
.social-link {
    width: 50px !important;
    height: 50px !important;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link img {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain;
}

/* Mobile: Smaller social icons */
@media (max-width: 768px) {
    .social-link {
        width: 45px !important;
        height: 45px !important;
    }
    
    .social-link img {
        width: 24px !important;
        height: 24px !important;
    }
}

/* ========================================
   FIX 2: About Page - Full Width on Mobile
   ======================================== */

@media (max-width: 768px) {
    /* Remove side padding on mobile for full width */
    body {
        padding: 0 !important;
    }
    
    /* Full width sections on mobile */
    section,
    .container,
    [style*="max-width:1200px"] {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Specific fix for about page sections */
    #vision-mission-section {
        padding: 2rem 15px !important;
        margin: 2rem 0 !important;
    }
}

/* ========================================
   FIX 3: Vision & Mission - Stack on Mobile
   ======================================== */

/* Vision & Mission Section */
#vision-mission-section > div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

/* Desktop: Side by side with images */
@media (min-width: 769px) {
    #vision-mission-section > div {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #vision-mission-section > div > div {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        align-items: center;
    }
}

/* Mobile: Stack vertically with image on top */
@media (max-width: 768px) {
    #vision-mission-section > div > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        grid-template-columns: 1fr !important;
    }
    
    /* Image first, then text */
    #vision-mission-section > div > div > div:first-child {
        order: 1;
    }
    
    #vision-mission-section > div > div > div:last-child {
        order: 2;
        text-align: center !important;
    }
    
    /* Images full width on mobile */
    #vision-mission-section img {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 12px;
    }
}

/* ========================================
   FIX 4: Project Gallery - Responsive Slider
   ======================================== */

/* Gallery Grid - Responsive */
.gallery-grid,
[style*="display:grid"][style*="grid-template-columns: repeat(3"] {
    display: grid !important;
    gap: 1rem;
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
    .gallery-grid,
    [style*="display:grid"][style*="grid-template-columns: repeat(3"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Tablet: 2 columns */
@media (min-width: 577px) and (max-width: 1023px) {
    .gallery-grid,
    [style*="display:grid"][style*="grid-template-columns: repeat(3"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile: 1 column slider */
@media (max-width: 576px) {
    .gallery-grid,
    [style*="display:grid"][style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .gallery-grid::-webkit-scrollbar {
        display: none;
    }
    
    .gallery-grid > * {
        scroll-snap-align: start;
        min-width: 100%;
    }
    
    /* Gallery images should not bleed */
    .gallery-grid img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
        border-radius: 8px;
    }
}

/* ========================================
   FIX 5: Project Map - Full Width & Responsive Stats
   ======================================== */

/* Map Container - Full Width on Mobile */
#novarisProjectMap {
    width: 100% !important;
    max-width: 100% !important;
    height: 400px !important;
}

@media (min-width: 769px) {
    #novarisProjectMap {
        height: 600px !important;
    }
}

/* Map Stats - Responsive Grid */
#novarisProjectMap ~ div,
#novarisProjectMap + div {
    display: grid !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
    padding: 0 15px !important;
}

/* Desktop: 4 columns */
@media (min-width: 769px) {
    #novarisProjectMap ~ div,
    #novarisProjectMap + div {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Tablet: 2 columns */
@media (min-width: 481px) and (max-width: 768px) {
    #novarisProjectMap ~ div,
    #novarisProjectMap + div {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile: 1 column (stacked) OR horizontal slider */
@media (max-width: 480px) {
    #novarisProjectMap ~ div,
    #novarisProjectMap + div {
        /* Option 1: Stacked vertically */
        grid-template-columns: 1fr !important;
        
        /* Option 2: Horizontal slider (uncomment below to use)
        grid-template-columns: repeat(4, 1fr) !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 10px;
        */
    }
    
    /* Map stat cards on mobile */
    #novarisProjectMap ~ div > div,
    #novarisProjectMap + div > div {
        padding: 1rem !important;
        text-align: center;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        
        /* For slider option (uncomment if using slider)
        scroll-snap-align: start;
        min-width: 120px;
        */
    }
    
    #novarisProjectMap ~ div > div > div:first-child,
    #novarisProjectMap + div > div > div:first-child {
        font-size: 1.8rem !important;
        font-weight: 700;
        margin-bottom: 0.3rem;
    }
    
    #novarisProjectMap ~ div > div > div:last-child,
    #novarisProjectMap + div > div > div:last-child {
        font-size: 0.85rem !important;
        color: #666;
    }
}

/* ========================================
   FIX 6: General Mobile Responsiveness
   ======================================== */

/* Prevent horizontal scroll */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    * {
        max-width: 100% !important;
    }
    
    /* But allow Leaflet map elements to be unconstrained */
    .leaflet-container,
    .leaflet-container *,
    .leaflet-marker-icon,
    .leaflet-popup {
        max-width: none !important;
    }
    
    /* Images should be responsive */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Text should not overflow */
    h1, h2, h3, h4, h5, h6, p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* ========================================
   FIX 7: Touch-Friendly Elements on Mobile
   ======================================== */

@media (max-width: 768px) {
    /* Larger tap targets */
    button,
    a,
    .btn,
    [onclick] {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 12px 20px !important;
    }
    
    /* Comfortable spacing */
    section {
        padding: 2rem 15px !important;
    }
    
    /* Readable font sizes */
    body {
        font-size: 16px !important;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
}

/* ========================================
   FIX 8: Project Map Specific Mobile Fixes
   ======================================== */

@media (max-width: 768px) {
    /* Map section padding */
    #novarisProjectMap {
        border-radius: 10px !important;
        margin: 0 !important;
    }
    
    /* Map legend on mobile */
    .map-legend {
        font-size: 0.75rem !important;
        padding: 8px !important;
    }
    
    .map-legend h4 {
        font-size: 0.85rem !important;
        margin-bottom: 5px !important;
    }
    
    /* Leaflet controls */
    .leaflet-control-zoom {
        margin: 5px !important;
    }
    
    .leaflet-control-zoom a {
        width: 35px !important;
        height: 35px !important;
        line-height: 35px !important;
        font-size: 18px !important;
    }
}

/* ========================================
   END OF MOBILE RESPONSIVE FIXES
   ======================================== */

   /* ========================================
   ADDITIONAL MOBILE FIXES
   ======================================== */

/* ========================================
   FIX 1: Remove Social Media Icon Circles
   ======================================== */

/* Remove background circles entirely */
.social-link {
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.social-link img {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain;
    display: block;
}

.social-link:hover {
    background: transparent !important;
    transform: scale(1.1) !important;
}

/* Mobile: Slightly smaller icons */
@media (max-width: 768px) {
    .social-link img {
        width: 28px !important;
        height: 28px !important;
    }
}

/* ========================================
   FIX 2: Logo Size on Mobile - Prevent Overflow
   ======================================== */

/* Desktop: Normal size */
.logo {
    height: 60px !important;
    max-height: 60px !important;
    width: auto !important;
    max-width: 200px !important;
    object-fit: contain !important;
}

/* Tablet: Smaller */
@media (max-width: 1024px) and (min-width: 769px) {
    .logo {
        height: 50px !important;
        max-height: 50px !important;
        max-width: 180px !important;
    }
}

/* Mobile: Much smaller to prevent overflow */
@media (max-width: 768px) {
    .logo {
        height: 40px !important;
        max-height: 40px !important;
        max-width: 140px !important;
    }
    
    /* Ensure logo container doesn't expand */
    nav a:first-child,
    .navbar-brand,
    [href*="index"] > img.logo {
        max-width: 140px !important;
        flex-shrink: 1 !important;
    }
}

/* Small mobile: Even smaller */
@media (max-width: 480px) {
    .logo {
        height: 35px !important;
        max-height: 35px !important;
        max-width: 120px !important;
    }
}

/* ========================================
   FIX 3: Navbar/Header - Proper Mobile Layout
   ======================================== */

/* Ensure navbar doesn't cause overlap */
nav {
    position: fixed !important;
    top: 42px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1rem 3% !important;
}

/* Mobile: Adjust navbar padding */
@media (max-width: 768px) {
    nav {
        padding: 0.75rem 15px !important;
        gap: 10px !important;
    }
    
    /* Ensure hamburger is always visible and clickable */
    .hamburger {
        position: relative !important;
        z-index: 1001 !important;
        width: 30px !important;
        height: 25px !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }
    
    .hamburger span {
        display: block !important;
        width: 100% !important;
        height: 3px !important;
        background: white !important;
        margin: 5px 0 !important;
        transition: all 0.3s ease !important;
    }
}

/* Scrolled navbar - reduce padding */
nav.scrolled {
    padding: 0.5rem 3% !important;
}

@media (max-width: 768px) {
    nav.scrolled {
        padding: 0.5rem 15px !important;
    }
    
    nav.scrolled .logo {
        height: 32px !important;
        max-height: 32px !important;
    }
}

/* ========================================
   FIX 4: Logo Should NOT Stay Fixed on Scroll
   ======================================== */

/* If logo has position: fixed, override it */
.logo {
    position: static !important;
    position: relative !important;
}

/* Logo container should be relative, not fixed */
nav > a:first-child,
.navbar-brand {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

/* ========================================
   FIX 5: Remove Hyphenation from "Impact"
   ======================================== */

/* Remove hyphenation globally */
* {
    hyphens: none !important;
    -webkit-hyphens: none !important;
    -ms-hyphens: none !important;
}

/* Specifically target text content */
h1, h2, h3, h4, h5, h6, p, span, div {
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-break: keep-all !important;
}

/* Override any previous hyphenation rules */
#novarisProjectMap,
#novarisProjectMap *,
.leaflet-container,
.leaflet-container *,
.leaflet-popup,
.leaflet-popup *,
.leaflet-marker-icon,
.leaflet-control,
.leaflet-control * {
    hyphens: none !important;
    -webkit-hyphens: none !important;
}

/* ========================================
   FIX 6: Video Section - Proper Alignment
   ======================================== */

/* Video carousel container - prevent bleeding */
.video-carousel-container {
    position: relative !important;
    width: 100% !important;
    max-width: 900px !important;
    margin: 40px auto !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

/* Video slides - proper alignment */
.video-slide {
    min-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 20px !important;
}

/* Video wrapper - maintain aspect ratio */
.video-wrapper {
    width: 100% !important;
    max-width: 700px !important;
    aspect-ratio: 16 / 9 !important;
    margin: 0 auto 20px !important;
    position: relative !important;
    overflow: hidden !important;
}

.video-wrapper video,
.video-wrapper iframe {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    display: block !important;
}

/* Mobile: Adjust video section */
@media (max-width: 768px) {
    .video-carousel-container {
        max-width: 100% !important;
        margin: 20px 0 !important;
        border-radius: 8px !important;
    }
    
    .video-slide {
        padding: 15px !important;
    }
    
    .video-wrapper {
        max-width: 100% !important;
        margin-bottom: 15px !important;
    }
    
    /* Carousel controls - more visible on mobile */
    .carousel-control {
        padding: 10px !important;
        font-size: 20px !important;
    }
    
    .carousel-control.prev {
        left: 5px !important;
    }
    
    .carousel-control.next {
        right: 5px !important;
    }
}

/* ========================================
   FIX 7: Impact Stories Section - Proper Layout
   ======================================== */

/* If impact stories section has specific container */
.impact-stories,
#impact-stories,
[class*="impact"][class*="stor"],
section:has(.video-carousel-container) {
    padding: 3rem 15px !important;
    overflow: hidden !important;
}

@media (max-width: 768px) {
    .impact-stories,
    #impact-stories,
    [class*="impact"][class*="stor"],
    section:has(.video-carousel-container) {
        padding: 2rem 10px !important;
    }
}

/* Section titles - no hyphenation */
.impact-stories h2,
.impact-stories h3,
#impact-stories h2,
#impact-stories h3 {
    hyphens: none !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

/* ========================================
   FIX 8: Video Grid (if multiple videos shown)
   ======================================== */

/* If videos are in a grid layout */
.video-grid,
[style*="display:grid"] .video-wrapper,
[style*="display: grid"] .video-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

/* Desktop: 2-3 columns */
@media (min-width: 769px) {
    .video-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
        gap: 2rem !important;
    }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
    .video-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    .video-grid .video-wrapper {
        width: 100% !important;
    }
}

/* ========================================
   FIX 9: Ensure No Overlap Issues
   ======================================== */

/* Main content should start below fixed header */
body {
    padding-top: 0 !important;
}

main,
.main-content,
section:first-of-type {
    margin-top: 110px !important; /* Space for top bar + navbar */
}

@media (max-width: 768px) {
    main,
    .main-content,
    section:first-of-type {
        margin-top: 90px !important;
    }
}

/* ========================================
   FIX 10: Mobile Menu Should Cover Logo When Open
   ======================================== */

.mobile-menu.active {
    z-index: 1002 !important; /* Higher than logo */
}

.menu-overlay.active {
    z-index: 999 !important; /* Below mobile menu but above content */
}

/* ========================================
   FINAL BULLETPROOF FIX
   ======================================== */

/* ========================================
   HAMBURGER FIX - FORCE VISIBLE
   ======================================== */

/* Override EVERYTHING - Force hamburger visible on mobile/tablet */
@media screen and (max-width: 1024px) {
    .hamburger {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 30px !important;
        height: 22px !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 10000 !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
    
    /* Force the 3 lines to show */
    .hamburger span {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 30px !important;
        height: 3px !important;
        background-color: #ffffff !important;
        background: #ffffff !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
        position: relative !important;
    }
    
    /* Make sure hamburger span doesn't collapse */
    .hamburger span:nth-child(1),
    .hamburger span:nth-child(2),
    .hamburger span:nth-child(3) {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 30px !important;
        height: 3px !important;
        background: white !important;
    }
    
    /* Ensure it's clickable */
    .hamburger:hover {
        opacity: 0.8 !important;
    }
}

/* Desktop: Hide hamburger */
@media screen and (min-width: 1025px) {
    .hamburger {
        display: none !important;
    }
}

/* ========================================
   VIDEO BLEEDING FIX - FORCE CONTAINMENT
   ======================================== */

/* Target the video grid container directly */
section div[style*="display:grid"][style*="grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Tablet: 2 columns */
@media screen and (max-width: 1024px) {
    section div[style*="display:grid"][style*="grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

/* Mobile: 1 column */
@media screen and (max-width: 576px) {
    section div[style*="display:grid"][style*="grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 !important;
    }
}

/* Video card containers */
div[style*="background:rgba(255,255,255,0.1)"][style*="border-radius:15px"] {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Video placeholder boxes */
div[style*="width:100%; height:200px"][style*="background:#333"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 200px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

@media screen and (max-width: 768px) {
    div[style*="width:100%; height:200px"][style*="background:#333"] {
        height: 180px !important;
    }
}

/* Impact stories section container */
div[style*="background:var(--dark-blue)"][style*="padding:4rem"] {
    padding: 3rem 1.5rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

@media screen and (max-width: 768px) {
    div[style*="background:var(--dark-blue)"][style*="padding:4rem"] {
        padding: 2rem 1rem !important;
    }
}

/* ========================================
   PREVENT ALL HORIZONTAL SCROLL
   ======================================== */

@media screen and (max-width: 768px) {
    html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    * {
        max-width: 100vw !important;
    }
    
    /* Exception for Leaflet map elements */
    .leaflet-container,
    .leaflet-container *,
    .leaflet-marker-icon,
    .leaflet-popup,
    .leaflet-popup * {
        max-width: none !important;
    }
}

/* ========================================
   SURGICAL FIXES - ONLY TARGET SPECIFIC ELEMENTS
   These are HIGHLY SPECIFIC and won't affect other areas
   ======================================== */

/* ========================================
   FIX 1: VISION & MISSION - CENTER ON TABLET ONLY
   ======================================== */

/* ONLY target the Vision & Mission section by ID */
@media (min-width: 577px) and (max-width: 1024px) {
    /* The main Vision & Mission container */
    #vision-mission-section {
        padding: 2.5rem 2rem !important;
        margin: 3rem auto !important;
    }
    
    /* The grid container inside Vision & Mission */
    #vision-mission-section > div[style*="display:grid"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        max-width: 600px !important;
        margin: 0 auto !important;
        gap: 3rem !important;
    }
    
    /* Each vision/mission block (has 2 divs inside) */
    #vision-mission-section > div > div[style*="display:grid"][style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 1.5rem !important;
        width: 100% !important;
    }
    
    /* Images ONLY in Vision & Mission section */
    #vision-mission-section img[alt*="Vision"],
    #vision-mission-section img[alt*="Mission"],
    #vision-mission-section img[src*="vision"],
    #vision-mission-section img[src*="mission"] {
        width: 80% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }
    
    /* Text ONLY in Vision & Mission */
    #vision-mission-section h4,
    #vision-mission-section > div > div > div p {
        text-align: center !important;
        max-width: 500px !important;
    }
}


/* ========================================
   FIX 3: PROJECT GALLERY - SINGLE SLIDER ON MOBILE ONLY
   ======================================== */

/* ONLY target gallery on projects page with specific class or structure */
@media (max-width: 576px) {
    /* Target gallery container specifically */
    section .gallery-grid,
    section div[style*="display:grid"][style*="grid-template-columns: repeat(3, 1fr)"] {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 0 !important;
        scrollbar-width: none !important;
    }
    
    /* Hide scrollbar */
    section .gallery-grid::-webkit-scrollbar,
    section div[style*="display:grid"][style*="grid-template-columns: repeat(3, 1fr)"]::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Each gallery item */
    section .gallery-grid > div,
    section .gallery-grid > a,
    section div[style*="display:grid"][style*="grid-template-columns: repeat(3, 1fr)"] > div,
    section div[style*="display:grid"][style*="grid-template-columns: repeat(3, 1fr)"] > a {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        scroll-snap-align: center !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
    
    /* Images in gallery only */
    section .gallery-grid img,
    section div[style*="display:grid"][style*="grid-template-columns: repeat(3, 1fr)"] img {
        width: 100% !important;
        height: auto !important;
        border-radius: 10px !important;
    }
}

/* ========================================
   FIX 4: INSIGHTS PAGE - READ MORE BUTTONS ONLY
   ======================================== */

/* ONLY target news/insights cards - be very specific */
@media (max-width: 768px) {
    /* Target insights/news page sections specifically */
    section#insights-page div[style*="background:white"][style*="border-radius"],
    section#news-section div[style*="background:white"][style*="border-radius"],
    section#publications-section div[style*="background:white"][style*="border-radius"],
    div.news-card,
    div.insight-card {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Content area in these cards */
    section#insights-page div[style*="background:white"] > div,
    section#news-section div[style*="background:white"] > div,
    section#publications-section div[style*="background:white"] > div,
    div.news-card > div,
    div.insight-card > div {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 1.5rem !important;
    }
    
    /* ONLY "Read More" links in insights/news sections */
    section#insights-page a[href*="insights"],
    section#insights-page a[href$=".html"]:not(nav a):not(footer a),
    section#news-section a[href*="insights"],
    section#news-section a[href$=".html"]:not(nav a):not(footer a),
    section#publications-section a[href*="insights"],
    section#publications-section a[href$=".html"]:not(nav a):not(footer a),
    div.news-card a.read-more,
    div.insight-card a.read-more {
        display: inline-block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.75rem 1.5rem !important;
        margin-top: auto !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
}

/* ========================================
   SAFETY: ENSURE NAVIGATION NOT AFFECTED
   ======================================== */

/* Explicitly protect navigation from any changes */
nav,
nav *,
.nav-links,
.nav-links *,
header nav,
header nav *,
.mobile-menu,
.mobile-menu *,
.hamburger,
.hamburger * {
    /* Ensure navigation keeps its original styling */
    background: initial;
    color: initial;
}

/* Protect nav links specifically */
nav a,
.nav-links a,
header nav a {
    background: transparent !important;
    color: white !important;
}

nav a:hover,
.nav-links a:hover {
    color: var(--vivid-green) !important;
}

/* ========================================
   END OF SURGICAL FIXES
   ======================================== */

   /* ========================================
   NAVIGATION BACKGROUND FIX
   Add this to the END of your styles.css
   (This fixes the white navbar issue)
   ======================================== */

/* Restore navigation dark blue background */
nav {
    background: rgba(5, 29, 64, 0.95) !important;
    backdrop-filter: blur(10px) !important;
}

/* Scrolled nav (slightly transparent) */
nav.scrolled {
    background: rgba(5, 29, 64, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}

/* Ensure nav links are white */
nav a,
.nav-links a,
nav .nav-links li a {
    color: white !important;
    background: transparent !important;
}

/* Nav link hover - green text */
nav a:hover,
.nav-links a:hover,
nav .nav-links li a:hover {
    color: var(--vivid-green) !important;
    background: transparent !important;
}

/* Logo stays normal */
nav .logo {
    background: transparent !important;
}

/* Hamburger stays white */
.hamburger span {
    background: white !important;
}

/* Mobile menu background */
.mobile-menu {
    background: var(--dark-blue) !important;
}

/* ========================================
   END OF NAVIGATION FIX
   ======================================== */
   /* ========================================
   PRECISE MOBILE FIXES - Map Stats & Gallery

   ======================================== */

/* ========================================
   FIX 1: PROJECT MAP STATS - EXACT LAYOUT
   ======================================== */

/* Target the EXACT stats container with inline styles */
#novarisProjectMap ~ div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"],
#novarisProjectMap + div[style*="display:grid"][style*="grid-template-columns:repeat(4, 1fr)"] {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem !important;
    margin-top: 2rem !important;
}

/* Mobile: Change to special layout */
@media (max-width: 768px) {
    /* Container becomes CSS Grid with specific rows */
    #novarisProjectMap ~ div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"],
    #novarisProjectMap + div[style*="display:grid"][style*="grid-template-columns:repeat(4, 1fr)"] {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 1rem !important;
        margin-top: 1.5rem !important;
        padding: 0 10px !important;
    }
    
    /* First stat (Total Projects) - spans all 3 columns */
    #novarisProjectMap ~ div > div:nth-child(1),
    #novarisProjectMap + div > div:nth-child(1) {
        grid-column: 1 / 4 !important;
        grid-row: 1 !important;
    }
    
    /* Second stat (Operational) - column 1, row 2 */
    #novarisProjectMap ~ div > div:nth-child(2),
    #novarisProjectMap + div > div:nth-child(2) {
        grid-column: 1 / 2 !important;
        grid-row: 2 !important;
    }
    
    /* Third stat (In Development) - column 2, row 2 */
    #novarisProjectMap ~ div > div:nth-child(3),
    #novarisProjectMap + div > div:nth-child(3) {
        grid-column: 2 / 3 !important;
        grid-row: 2 !important;
    }
    
    /* Fourth stat (Pipeline) - column 3, row 2 */
    #novarisProjectMap ~ div > div:nth-child(4),
    #novarisProjectMap + div > div:nth-child(4) {
        grid-column: 3 / 4 !important;
        grid-row: 2 !important;
    }
    
    /* Adjust padding on mobile */
    #novarisProjectMap ~ div > div,
    #novarisProjectMap + div > div {
        padding: 1rem 0.5rem !important;
    }
    
    /* Adjust font sizes for mobile */
    #novarisProjectMap ~ div > div > div:first-child,
    #novarisProjectMap + div > div > div:first-child {
        font-size: 1.8rem !important;
    }
    
    #novarisProjectMap ~ div > div > div:last-child,
    #novarisProjectMap + div > div > div:last-child {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }
}

/* Very small phones - stack all 4 */
@media (max-width: 380px) {
    #novarisProjectMap ~ div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"],
    #novarisProjectMap + div[style*="display:grid"][style*="grid-template-columns:repeat(4, 1fr)"] {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto auto auto !important;
    }
    
    #novarisProjectMap ~ div > div:nth-child(1),
    #novarisProjectMap + div > div:nth-child(1) {
        grid-column: 1 / 2 !important;
        grid-row: 1 !important;
    }
    
    #novarisProjectMap ~ div > div:nth-child(2),
    #novarisProjectMap + div > div:nth-child(2) {
        grid-column: 1 / 2 !important;
        grid-row: 2 !important;
    }
    
    #novarisProjectMap ~ div > div:nth-child(3),
    #novarisProjectMap + div > div:nth-child(3) {
        grid-column: 1 / 2 !important;
        grid-row: 3 !important;
    }
    
    #novarisProjectMap ~ div > div:nth-child(4),
    #novarisProjectMap + div > div:nth-child(4) {
        grid-column: 1 / 2 !important;
        grid-row: 4 !important;
    }
}

/* ========================================
   FIX 2: PROJECT GALLERY - SINGLE IMAGE SLIDER
   ======================================== */

/* Target the EXACT video grid with inline styles */
div[style*="display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
    display: grid !important;
    gap: 2rem !important;
}

/* Desktop: 3 columns */
@media (min-width: 1025px) {
    div[style*="display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Tablet: 2 columns */
@media (min-width: 577px) and (max-width: 1024px) {
    div[style*="display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

/* Mobile: Single image slider */
@media (max-width: 576px) {
    /* Convert to horizontal scrolling container */
    div[style*="display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    /* Hide scrollbar */
    div[style*="display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"]::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    
    /* Each video card - full width */
    div[style*="display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] > div {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        scroll-snap-align: center !important;
        scroll-snap-stop: always !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Video card inner content */
    div[style*="display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] > div > div[style*="width:100%; height:200px"] {
        width: 100% !important;
        height: 200px !important;
    }
    
    /* Add swipe indicator (optional - shows user they can swipe) */
    div[style*="display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"]::after {
        content: '← Swipe →' !important;
        position: absolute !important;
        bottom: -25px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 0.8rem !important;
        color: rgba(255, 255, 255, 0.6) !important;
        pointer-events: none !important;
    }
}

/* ========================================
   ALTERNATIVE: If videos are in different container
   ======================================== */

/* Target by parent section structure */
@media (max-width: 576px) {
    /* Any grid in a dark blue background section */
    div[style*="background:var(--dark-blue)"] div[style*="display:grid"] {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scrollbar-width: none !important;
    }
    
    div[style*="background:var(--dark-blue)"] div[style*="display:grid"]::-webkit-scrollbar {
        display: none !important;
    }
    
    div[style*="background:var(--dark-blue)"] div[style*="display:grid"] > div {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        scroll-snap-align: center !important;
    }
}

/* ========================================
   ENSURE MAP CONTAINER IS FULL WIDTH
   ======================================== */

@media (max-width: 768px) {
    #novarisProjectMap {
        width: 100% !important;
        max-width: 100% !important;
        height: 400px !important;
        margin: 0 !important;
    }
}

/* ========================================
   FINAL MOBILE FIXES - Map Stats Text & Gallery Slider
   ======================================== */


/* ========================================
   FIX 2: PROJECT GALLERY - SINGLE IMAGE SLIDER
   ======================================== */

/* Gallery container */
.gallery-slider-container {
    position: relative !important;
    width: 100% !important;
    overflow: hidden !important;
}

/* Gallery wrapper */
.gallery-slider-wrapper {
    width: 100% !important;
    overflow: hidden !important;
}

/* Gallery track - contains all slide groups */
.gallery-slider-track {
    display: flex !important;
    transition: transform 0.3s ease !important;
}

/* Desktop & Tablet: Show 4 images in grid per slide */
@media (min-width: 577px) {
    .gallery-slide-group {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
        min-width: 100% !important;
        padding: 0 1rem !important;
        box-sizing: border-box !important;
    }
}

/* Mobile: Single image slider */
@media (max-width: 576px) {
    /* Gallery track - horizontal scroll */
    .gallery-slider-track {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        gap: 0 !important;
    }
    
    /* Hide scrollbar */
    .gallery-slider-track::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Slide groups - become flex containers */
    .gallery-slide-group {
        display: flex !important;
        flex-direction: row !important;
        flex-shrink: 0 !important;
        width: auto !important;
        min-width: auto !important;
    }
    
    /* Each individual image - full width */
    .gallery-slide-item {
        flex: 0 0 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        scroll-snap-align: center !important;
        scroll-snap-stop: always !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
    
    /* Images inside */
    .gallery-slide-item img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 3 !important;
        object-fit: cover !important;
        border-radius: 12px !important;
    }
    
    /* Caption styling on mobile */
    .gallery-caption {
        padding: 1rem !important;
        text-align: center !important;
    }
    
    .gallery-caption h4 {
        font-size: 1.1rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .gallery-caption p {
        font-size: 0.85rem !important;
    }
    
    /* Navigation buttons - larger and more visible on mobile */
    .gallery-slider-control {
        position: absolute !important;
        top: 35% !important;
        transform: translateY(-50%) !important;
        z-index: 10 !important;
        background: rgba(0, 0, 0, 0.7) !important;
        color: white !important;
        border: none !important;
        width: 45px !important;
        height: 45px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        font-size: 1.8rem !important;
        font-weight: bold !important;
        transition: all 0.3s ease !important;
    }
    
    .gallery-slider-control:hover,
    .gallery-slider-control:active {
        background: rgba(68, 170, 0, 0.9) !important;
        transform: translateY(-50%) scale(1.1) !important;
    }
    
    .gallery-slider-control.prev {
        left: 10px !important;
    }
    
    .gallery-slider-control.next {
        right: 10px !important;
    }
}

/* ========================================
   FIX 3: ALTERNATIVE GALLERY FIX IF ABOVE DOESN'T WORK
   ======================================== */

/* If the gallery doesn't respond to the above, force it */
@media (max-width: 576px) {
    /* Force all gallery items into a single row */
    #gallery-section .gallery-slide-item,
    section[id*="gallery"] .gallery-slide-item {
        flex: 0 0 100vw !important;
        min-width: 100vw !important;
        scroll-snap-align: center !important;
    }
    
    /* Force track to scroll horizontally */
    #gallery-section .gallery-slider-track,
    section[id*="gallery"] .gallery-slider-track {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
    }
}

/* ========================================
   END OF FINAL MOBILE FIXES
   ======================================== */

   /* ========================================
   CRITICAL FIXES - Stat Cards Width & Gallery Slider
   Add these to the END of your styles.css file
   Replace the previous map stats mobile fixes
   ======================================== */

/* ========================================
   FIX 1: MAP STATS - WIDER BOXES ON MOBILE
   ======================================== */

@media (max-width: 768px) {
    /* Container - reduce gap to make more room for boxes */
    #novarisProjectMap ~ div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"],
    #novarisProjectMap + div[style*="display:grid"][style*="grid-template-columns:repeat(4, 1fr)"] {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 0.5rem !important;
        margin-top: 1.5rem !important;
        padding: 0 5px !important;
    }
    
    /* First stat (Total Projects) - spans all 3 columns */
    #novarisProjectMap ~ div > div:nth-child(1),
    #novarisProjectMap + div > div:nth-child(1) {
        grid-column: 1 / 4 !important;
        grid-row: 1 !important;
    }
    
    /* Second stat (Operational) - column 1, row 2 */
    #novarisProjectMap ~ div > div:nth-child(2),
    #novarisProjectMap + div > div:nth-child(2) {
        grid-column: 1 / 2 !important;
        grid-row: 2 !important;
    }
    
    /* Third stat (In Development) - column 2, row 2 */
    #novarisProjectMap ~ div > div:nth-child(3),
    #novarisProjectMap + div > div:nth-child(3) {
        grid-column: 2 / 3 !important;
        grid-row: 2 !important;
    }
    
    /* Fourth stat (Pipeline) - column 3, row 2 */
    #novarisProjectMap ~ div > div:nth-child(4),
    #novarisProjectMap + div > div:nth-child(4) {
        grid-column: 3 / 4 !important;
        grid-row: 2 !important;
    }
    
    /* Better padding for all boxes */
    #novarisProjectMap ~ div > div,
    #novarisProjectMap + div > div {
        padding: 1rem 0.4rem !important;
    }
    
    /* Font sizes for row 2 - slightly larger now that boxes are wider */
    #novarisProjectMap ~ div > div:nth-child(2) > div:first-child,
    #novarisProjectMap ~ div > div:nth-child(3) > div:first-child,
    #novarisProjectMap ~ div > div:nth-child(4) > div:first-child,
    #novarisProjectMap + div > div:nth-child(2) > div:first-child,
    #novarisProjectMap + div > div:nth-child(3) > div:first-child,
    #novarisProjectMap + div > div:nth-child(4) > div:first-child {
        font-size: 1.8rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    /* Labels for row 2 - prevent wrapping */
    #novarisProjectMap ~ div > div:nth-child(2) > div:last-child,
    #novarisProjectMap ~ div > div:nth-child(3) > div:last-child,
    #novarisProjectMap ~ div > div:nth-child(4) > div:last-child,
    #novarisProjectMap + div > div:nth-child(2) > div:last-child,
    #novarisProjectMap + div > div:nth-child(3) > div:last-child,
    #novarisProjectMap + div > div:nth-child(4) > div:last-child {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* Small phones - slightly different approach */
@media (max-width: 400px) {
    /* Even smaller gap */
    #novarisProjectMap ~ div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"],
    #novarisProjectMap + div[style*="display:grid"][style*="grid-template-columns:repeat(4, 1fr)"] {
        gap: 0.4rem !important;
        padding: 0 3px !important;
    }
    
    /* Smaller fonts */
    #novarisProjectMap ~ div > div:nth-child(2) > div:first-child,
    #novarisProjectMap ~ div > div:nth-child(3) > div:first-child,
    #novarisProjectMap ~ div > div:nth-child(4) > div:first-child,
    #novarisProjectMap + div > div:nth-child(2) > div:first-child,
    #novarisProjectMap + div > div:nth-child(3) > div:first-child,
    #novarisProjectMap + div > div:nth-child(4) > div:first-child {
        font-size: 1.6rem !important;
    }
    
    #novarisProjectMap ~ div > div:nth-child(2) > div:last-child,
    #novarisProjectMap ~ div > div:nth-child(3) > div:last-child,
    #novarisProjectMap ~ div > div:nth-child(4) > div:last-child,
    #novarisProjectMap + div > div:nth-child(2) > div:last-child,
    #novarisProjectMap + div > div:nth-child(3) > div:last-child,
    #novarisProjectMap + div > div:nth-child(4) > div:last-child {
        font-size: 0.65rem !important;
    }
}

/* ========================================
   FIX 2: GALLERY SLIDER - MAKE IT WORK PROPERLY
   ======================================== */

/* Mobile: Single image slider that actually works */
@media (max-width: 576px) {
    /* Gallery container */
    .gallery-slider-container {
        position: relative !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    /* Gallery wrapper */
    .gallery-slider-wrapper {
        width: 100% !important;
        overflow: hidden !important;
    }
    
    /* Gallery track - this needs to show ALL images in a row */
    .gallery-slider-track {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        transition: transform 0.3s ease !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }
    
    /* Hide scrollbar */
    .gallery-slider-track::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Each slide group - don't use slide groups, flatten everything */
    .gallery-slide-group {
        display: contents !important;
    }
    
    /* Each individual gallery item - full viewport width */
    .gallery-slide-item {
        flex: 0 0 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        width: 100vw !important;
        scroll-snap-align: start !important;
        scroll-snap-stop: always !important;
        box-sizing: border-box !important;
        padding: 0 15px !important;
    }
    
    /* Images */
    .gallery-slide-item img {
        width: 100% !important;
        height: auto !important;
        max-height: 400px !important;
        object-fit: cover !important;
        border-radius: 12px !important;
        display: block !important;
    }
    
    /* Caption */
    .gallery-caption {
        padding: 1rem 0 !important;
        text-align: center !important;
    }
    
    .gallery-caption h4 {
        font-size: 1.1rem !important;
        margin-bottom: 0.3rem !important;
        color: var(--dark-blue) !important;
    }
    
    .gallery-caption p {
        font-size: 0.9rem !important;
        color: #666 !important;
    }
    
    /* Navigation buttons - visible and functional */
    .gallery-slider-control {
        position: absolute !important;
        top: 40% !important;
        transform: translateY(-50%) !important;
        z-index: 100 !important;
        background: rgba(0, 0, 0, 0.7) !important;
        color: white !important;
        border: none !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        font-size: 2rem !important;
        font-weight: bold !important;
        transition: all 0.3s ease !important;
    }
    
    .gallery-slider-control:active {
        background: var(--vivid-green) !important;
        transform: translateY(-50%) scale(0.95) !important;
    }
    
    .gallery-slider-control.prev {
        left: 10px !important;
    }
    
    .gallery-slider-control.next {
        right: 10px !important;
    }
}

/* Tablet: 2x2 grid */
@media (min-width: 577px) and (max-width: 1024px) {
    .gallery-slider-track {
        display: flex !important;
    }
    
    .gallery-slide-group {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
        min-width: 100% !important;
        padding: 0 1rem !important;
    }
    
    .gallery-slide-item {
        width: 100% !important;
    }
}

/* Desktop: 2x2 grid per slide */
@media (min-width: 1025px) {
    .gallery-slider-track {
        display: flex !important;
    }
    
    .gallery-slide-group {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
        min-width: 100% !important;
        padding: 0 2rem !important;
    }
    
    .gallery-slide-item {
        width: 100% !important;
    }
}

/* ========================================
   FIX 3: ENSURE GALLERY FILTER BUTTONS WORK
   ======================================== */

@media (max-width: 576px) {
    /* Filter buttons container */
    div[style*="text-align:center"]:has(.gallery-filter-btn) {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Filter buttons */
    .gallery-filter-btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
        margin: 0 !important;
    }
}

/* ========================================
   END OF CRITICAL FIXES
   ======================================== */

   /* ========================================
   ABSOLUTE FIX - NO TEXT BREAKING EVER
   ======================================== */

/* ========================================
   FIX 1: MAP STATS - ABSOLUTELY NO TEXT BREAKING
   ======================================== */

@media (max-width: 768px) {
    /* Container - minimal gap for maximum box width */
    #novarisProjectMap ~ div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"],
    #novarisProjectMap + div[style*="display:grid"][style*="grid-template-columns:repeat(4, 1fr)"] {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 0.3rem !important;
        margin-top: 1.5rem !important;
        padding: 0 3px !important;
    }
    
    /* First stat (Total Projects) - spans all 3 columns */
    #novarisProjectMap ~ div > div:nth-child(1),
    #novarisProjectMap + div > div:nth-child(1) {
        grid-column: 1 / 4 !important;
        grid-row: 1 !important;
    }
    
    /* Second stat (Operational) */
    #novarisProjectMap ~ div > div:nth-child(2),
    #novarisProjectMap + div > div:nth-child(2) {
        grid-column: 1 / 2 !important;
        grid-row: 2 !important;
    }
    
    /* Third stat (In Development) */
    #novarisProjectMap ~ div > div:nth-child(3),
    #novarisProjectMap + div > div:nth-child(3) {
        grid-column: 2 / 3 !important;
        grid-row: 2 !important;
    }
    
    /* Fourth stat (Pipeline) */
    #novarisProjectMap ~ div > div:nth-child(4),
    #novarisProjectMap + div > div:nth-child(4) {
        grid-column: 3 / 4 !important;
        grid-row: 2 !important;
    }
    
    /* All boxes - padding */
    #novarisProjectMap ~ div > div,
    #novarisProjectMap + div > div {
        padding: 1rem 0.2rem !important;
    }
    
    /* Numbers in all boxes */
    #novarisProjectMap ~ div > div > div:first-child,
    #novarisProjectMap + div > div > div:first-child {
        font-size: 2rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    /* Labels - FORCE NO WRAPPING */
    #novarisProjectMap ~ div > div > div:last-child,
    #novarisProjectMap + div > div > div:last-child {
        font-size: 0.72rem !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        padding: 0 !important;
    }
    
    /* Row 2 specific - smaller numbers */
    #novarisProjectMap ~ div > div:nth-child(2) > div:first-child,
    #novarisProjectMap ~ div > div:nth-child(3) > div:first-child,
    #novarisProjectMap ~ div > div:nth-child(4) > div:first-child,
    #novarisProjectMap + div > div:nth-child(2) > div:first-child,
    #novarisProjectMap + div > div:nth-child(3) > div:first-child,
    #novarisProjectMap + div > div:nth-child(4) > div:first-child {
        font-size: 1.8rem !important;
    }
}

/* SOLUTION: Abbreviate the text in HTML or use smaller font */
@media (max-width: 400px) {
    /* For very small phones */
    #novarisProjectMap ~ div > div > div:last-child,
    #novarisProjectMap + div > div > div:last-child {
        font-size: 0.65rem !important;
    }
    
    #novarisProjectMap ~ div > div:nth-child(2) > div:first-child,
    #novarisProjectMap ~ div > div:nth-child(3) > div:first-child,
    #novarisProjectMap ~ div > div:nth-child(4) > div:first-child,
    #novarisProjectMap + div > div:nth-child(2) > div:first-child,
    #novarisProjectMap + div > div:nth-child(3) > div:first-child,
    #novarisProjectMap + div > div:nth-child(4) > div:first-child {
        font-size: 1.6rem !important;
    }
}

/* ========================================
   ALTERNATIVE: USE ABBREVIATED TEXT ON MOBILE
   ======================================== */

/* Hide full text, show abbreviated on mobile */
@media (max-width: 768px) {
    /* This requires adding data attributes to HTML */
    #novarisProjectMap ~ div > div > div:last-child::after,
    #novarisProjectMap + div > div > div:last-child::after {
        /* We'll use CSS to conditionally show shorter text */
    }
}

/* ========================================
   FIX 2: GALLERY SLIDER - WORKING VERSION
   ======================================== */

@media (max-width: 576px) {
    /* Gallery container */
    .gallery-slider-container {
        position: relative !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    .gallery-slider-wrapper {
        width: 100% !important;
        overflow: hidden !important;
    }
    
    /* Track - horizontal scroll */
    .gallery-slider-track {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }
    
    .gallery-slider-track::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Flatten slide groups */
    .gallery-slide-group {
        display: contents !important;
    }
    
    /* Each item full width */
    .gallery-slide-item {
        flex: 0 0 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        scroll-snap-align: start !important;
        scroll-snap-stop: always !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
    }
    
    .gallery-slide-item img {
        width: 100% !important;
        height: auto !important;
        max-height: 400px !important;
        object-fit: cover !important;
        border-radius: 12px !important;
    }
    
    .gallery-caption {
        padding: 1rem 0 !important;
        text-align: center !important;
    }
    
    .gallery-caption h4 {
        font-size: 1.1rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .gallery-caption p {
        font-size: 0.9rem !important;
    }
    
    /* Navigation buttons */
    .gallery-slider-control {
        position: absolute !important;
        top: 40% !important;
        transform: translateY(-50%) !important;
        z-index: 100 !important;
        background: rgba(0, 0, 0, 0.7) !important;
        color: white !important;
        border: none !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        font-size: 2rem !important;
    }
    
    .gallery-slider-control:active {
        background: var(--vivid-green) !important;
    }
    
    .gallery-slider-control.prev {
        left: 10px !important;
    }
    
    .gallery-slider-control.next {
        right: 10px !important;
    }
}

/* ========================================
   END OF ABSOLUTE FIX
   ======================================== */

   /* ========================================
   DROPDOWN MENU FIX - Restore Dark Blue Background
   Add these to the END of your styles.css file
   ======================================== */

/* ========================================
   FIX: RESTORE DROPDOWN MENU BACKGROUNDS
   ======================================== */

/* Desktop dropdown menus - dark blue background */
.dropdown-content {
    display: none !important;
    position: absolute !important;
    background: rgba(5, 29, 64, 0.98) !important;
    background: var(--dark-blue) !important;
    min-width: 240px !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3) !important;
    border-radius: 8px !important;
    z-index: 1001 !important;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content,
.dropdown-content:hover {
    display: block !important;
}

/* Dropdown links - white text */
.dropdown-content a {
    display: block !important;
    padding: 0.75rem 1.5rem !important;
    color: white !important;
    background: transparent !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-size: 0.9rem !important;
    border-left: 3px solid transparent !important;
}

/* Dropdown links hover - green highlight */
.dropdown-content a:hover {
    background: rgba(68, 170, 0, 0.15) !important;
    color: var(--yellow) !important;
    color: var(--vivid-green) !important;
    padding-left: 2rem !important;
    border-left-color: var(--vivid-green) !important;
}

/* Mobile dropdown menus */
.mobile-dropdown {
    background: rgba(5, 29, 64, 0.95) !important;
    padding: 0.5rem 0 !important;
    margin-top: 0.5rem !important;
    border-radius: 8px !important;
}

.mobile-dropdown a {
    display: block !important;
    padding: 0.75rem 1.5rem !important;
    color: white !important;
    background: transparent !important;
    text-decoration: none !important;
}

.mobile-dropdown a:hover {
    background: rgba(68, 170, 0, 0.15) !important;
    color: var(--vivid-green) !important;
}

/* Ensure nav parent doesn't affect dropdowns */
nav .dropdown,
nav .dropdown-content,
nav .dropdown-content * {
    background: initial !important;
}

/* But dropdown-content specifically gets dark blue */
nav .dropdown-content {
    background: var(--dark-blue) !important;
    background: rgba(5, 29, 64, 0.98) !important;
}

/* And dropdown links stay white */
nav .dropdown-content a {
    color: white !important;
    background: transparent !important;
}

nav .dropdown-content a:hover {
    background: rgba(68, 170, 0, 0.15) !important;
    color: var(--vivid-green) !important;
}

/* ========================================
   END OF DROPDOWN MENU FIX
   ======================================== */

   /* ========================================
   ULTRA-SPECIFIC FIXES - Events Sections Only
   Add these to the END of your styles.css file
   These will ONLY affect the specific sections shown in images
   ======================================== */

/* ========================================
   FIX 1: EVENTS & CONFERENCES - ONE CARD AT A TIME ON MOBILE
   Target: Section with "Shaping the Conversation" heading
   ======================================== */

/* ONLY target the specific events grid at line 6688 */
@media (max-width: 768px) {
    /* The EXACT grid container with 4 columns */
    #events-section > div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"] {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 2rem 0 0 !important;
    }
    
    /* Hide scrollbar */
    #events-section > div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"]::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Each of the 4 event cards - full viewport width */
    #events-section > div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"] > div {
        flex: 0 0 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        scroll-snap-align: center !important;
        scroll-snap-stop: always !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    
    /* The white card backgrounds */
    #events-section > div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"] > div[style*="background:white"] {
        width: 100% !important;
        height: auto !important;
    }
    
    /* Card headers (colored gradient sections) */
    #events-section > div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"] > div > div:first-child {
        padding: 1.5rem 1rem !important;
    }
    
    /* Card logos/images */
    #events-section > div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"] img {
        max-width: 60px !important;
        max-height: 60px !important;
    }
    
    /* Card titles in header */
    #events-section > div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"] h3 {
        font-size: 1.2rem !important;
    }
    
    /* Card content section */
    #events-section > div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"] > div > div:last-child {
        padding: 1.5rem !important;
    }
    
    /* Event descriptions */
    #events-section > div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"] h4 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
    }
    
    /* Button containers */
    #events-section > div[style*="display:grid; grid-template-columns:repeat(4, 1fr)"] > div > div > div[style*="display:flex; flex-direction:column"] {
        margin-top: 1rem !important;
    }
}

/* ========================================
   FIX 2: UPCOMING EVENTS - PROPER CONTAINMENT
   Target: Dark blue box with "Upcoming Events" heading
   ======================================== */

@media (max-width: 768px) {
    /* The EXACT upcoming events container at line 6770 */
    #events-section > div[style*="max-width:800px"][style*="background:var(--dark-blue)"] {
        max-width: 100% !important;
        width: 100% !important;
        margin: 3rem 0 0 !important;
        padding: 2rem 15px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    /* Upcoming Events heading */
    #events-section > div[style*="max-width:800px"][style*="background:var(--dark-blue)"] > h3 {
        font-size: 1.5rem !important;
        margin-bottom: 1.5rem !important;
        text-align: center !important;
    }
    
    /* Container for event cards */
    #events-section > div[style*="max-width:800px"][style*="background:var(--dark-blue)"] > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    /* Individual upcoming event cards */
    #events-section > div[style*="max-width:800px"][style*="background:var(--dark-blue)"] > div > div {
        padding: 1.2rem !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    /* Event card titles */
    #events-section > div[style*="max-width:800px"][style*="background:var(--dark-blue)"] h4 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
        word-wrap: break-word !important;
    }
    
    /* Event card details (location/date) */
    #events-section > div[style*="max-width:800px"][style*="background:var(--dark-blue)"] p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.8rem !important;
        word-wrap: break-word !important;
    }
    
    /* Register Interest links */
    #events-section > div[style*="max-width:800px"][style*="background:var(--dark-blue)"] a {
        font-size: 0.9rem !important;
        display: inline-block !important;
        word-wrap: break-word !important;
    }
}

/* ========================================
   FIX 3: PREVENT ANY OVERFLOW ON EVENTS SECTION
   ======================================== */

@media (max-width: 768px) {
    /* The main events section */
    #events-section {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Section header */
    #events-section > .section-header {
        padding: 0 15px !important;
    }
}

/* ========================================
   END OF ULTRA-SPECIFIC FIXES
   ======================================== */

   /* ========================================
   IBOGO PROJECT PAGE - MOBILE RESPONSIVE CSS
   ONLY affects ibogo-project.html page
   ======================================== */

/* ========================================
   MOBILE & TABLET RESPONSIVE FIXES
   ======================================== */

/* Detect ibogo project page specifically */
body:has(section[style*="background:linear-gradient"][style*="Ibogo"]),
body:has(h1:contains("Ibogo Solar Farm")) {
    /* Page identification - styles below will only apply here */
}

/* ========================================
   FIX 1: HERO SECTION
   ======================================== */

@media (max-width: 768px) {
    /* Hero content container */
    section[style*="background:linear-gradient"] > div[style*="max-width:1200px"] {
        max-width: 100% !important;
        padding: 0 20px !important;
    }
    
    /* Hero title */
    section[style*="background:linear-gradient"] h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Hero subtitle */
    section[style*="background:linear-gradient"] p {
        font-size: 1.1rem !important;
    }
    
    /* Breadcrumb */
    section[style*="background:linear-gradient"] div[style*="margin-bottom:2rem"] {
        font-size: 0.9rem !important;
    }
}

/* ========================================
   FIX 2: QUICK STATS BAR
   ======================================== */

@media (max-width: 768px) {
    /* Stats container */
    div[style*="background:var(--dark-blue)"][style*="grid-template-columns:repeat(auto-fit, minmax(150px, 1fr))"] {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 1.5rem 1rem !important;
        gap: 1rem !important;
    }
    
    /* Stat numbers */
    div[style*="background:var(--dark-blue)"] > div > div:first-child {
        font-size: 1.6rem !important;
    }
    
    /* Stat labels */
    div[style*="background:var(--dark-blue)"] > div > div:last-child {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    /* Very small phones - stack vertically */
    div[style*="background:var(--dark-blue)"][style*="grid-template-columns:repeat(auto-fit, minmax(150px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================
   FIX 3: MAIN LAYOUT - SIDEBAR STACK ON MOBILE
   ======================================== */

@media (max-width: 1024px) {
    /* Main container */
    section:has(.flipbook-page) > div[style*="max-width:1400px"] {
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    
    /* Two-column layout (main + sidebar) */
    div[style*="display:grid; grid-template-columns:1fr 350px"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    /* Sidebar - no longer sticky on mobile */
    div[style*="position:sticky; top:140px"] {
        position: relative !important;
        top: 0 !important;
        order: -1 !important;
    }
}

/* ========================================
   FIX 4: FLIPBOOK PAGES
   ======================================== */

@media (max-width: 768px) {
    /* All flipbook pages */
    .flipbook-page {
        padding: 2rem 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Page titles */
    .flipbook-page h2 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }
    
    /* Page subtitles */
    .flipbook-page h3 {
        font-size: 1.2rem !important;
    }
    
    /* Page text */
    .flipbook-page p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    /* Section headings */
    .flipbook-page h4 {
        font-size: 1.1rem !important;
    }
}

/* ========================================
   FIX 5: TWO-COLUMN GRIDS -> SINGLE COLUMN
   ======================================== */

@media (max-width: 768px) {
    /* All 2-column grids */
    .flipbook-page div[style*="grid-template-columns:repeat(2, 1fr)"],
    .flipbook-page div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* 3-column grids -> single column */
    .flipbook-page div[style*="grid-template-columns:repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Auto-fit grids - ensure minimum 1 column */
    .flipbook-page div[style*="grid-template-columns:repeat(auto-fit, minmax(200px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================
   FIX 6: "PROJECT AT A GLANCE" SECTION
   ======================================== */

@media (max-width: 768px) {
    /* Project at a glance container */
    .flipbook-page > div[style*="background:var(--light-gray)"] {
        padding: 1.5rem !important;
    }
    
    /* Title */
    .flipbook-page > div[style*="background:var(--light-gray)"] h4 {
        font-size: 1.3rem !important;
    }
}

/* ========================================
   FIX 7: "THE NEED" SECTION - 4 BOXES
   ======================================== */

@media (max-width: 768px) {
    /* The 4 green boxes */
    div[style*="background:rgba(68,170,0,0.1)"] {
        padding: 1.5rem 1rem !important;
    }
    
    div[style*="background:rgba(68,170,0,0.1)"] h4 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    div[style*="background:rgba(68,170,0,0.1)"] p {
        font-size: 0.9rem !important;
    }
}

/* ========================================
   FIX 8: "THE SOLUTION" GREEN BOX
   ======================================== */

@media (max-width: 768px) {
    /* Green solution box */
    div[style*="background:var(--vivid-green)"][style*="text-align:center"] {
        padding: 2rem 1.5rem !important;
    }
    
    div[style*="background:var(--vivid-green)"] h3 {
        font-size: 1.5rem !important;
    }
    
    div[style*="background:var(--vivid-green)"] p {
        font-size: 1rem !important;
    }
}

/* ========================================
   FIX 9: TIMELINE SECTION
   ======================================== */

@media (max-width: 768px) {
    /* Timeline container */
    div[style*="position:relative"][style*="padding-left:5rem"] {
        padding-left: 3rem !important;
    }
    
    /* Timeline vertical line */
    div[style*="position:absolute; left:0; top:0; bottom:0; width:3px"] {
        left: 0.8rem !important;
    }
    
    /* Timeline dots */
    div[style*="position:absolute; left:-3rem; width:40px; height:40px"] {
        left: 0 !important;
        width: 30px !important;
        height: 30px !important;
        font-size: 0.9rem !important;
    }
    
    /* Timeline items */
    div[style*="position:relative"][style*="padding-left:5rem"] > div {
        margin-bottom: 2rem !important;
        padding-left: 0.5rem !important;
    }
    
    /* Timeline titles */
    div[style*="position:relative"][style*="padding-left:5rem"] h4 {
        font-size: 1rem !important;
    }
    
    /* Timeline text */
    div[style*="position:relative"][style*="padding-left:5rem"] p {
        font-size: 0.9rem !important;
    }
}

/* ========================================
   FIX 10: SIDEBAR CTA BOX
   ======================================== */

@media (max-width: 1024px) {
    /* CTA box on mobile - full width at top */
    div[style*="background:var(--dark-blue)"][style*="padding:2.5rem"] {
        padding: 2rem 1.5rem !important;
        margin-bottom: 2rem !important;
    }
    
    /* CTA title */
    div[style*="background:var(--dark-blue)"] > h3 {
        font-size: 1.3rem !important;
    }
    
    /* CTA buttons */
    div[style*="background:var(--dark-blue)"] button {
        font-size: 0.95rem !important;
    }
    
    /* Project facts */
    div[style*="background:var(--dark-blue)"] h4 {
        font-size: 1rem !important;
    }
}

/* ========================================
   FIX 11: BOTTOM NAVIGATION BUTTONS
   ======================================== */

@media (max-width: 768px) {
    /* Navigation container */
    div[style*="text-align:center; margin-top:4rem"] {
        margin-top: 2rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }
    
    /* Buttons */
    div[style*="text-align:center; margin-top:4rem"] a {
        display: block !important;
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* ========================================
   FIX 12: GENERAL TEXT & PADDING ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    /* Reduce large headings */
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.8rem !important;
    }
    
    h3 {
        font-size: 1.3rem !important;
    }
    
    h4 {
        font-size: 1.1rem !important;
    }
    
    /* Lists */
    ul li {
        font-size: 0.95rem !important;
    }
    
    /* Emoji/icon sizes */
    div[style*="font-size:3rem"] {
        font-size: 2rem !important;
    }
    
    div[style*="font-size:2rem"] {
        font-size: 1.5rem !important;
    }
}

/* ========================================
   FIX 13: PREVENT HORIZONTAL SCROLL
   ======================================== */

@media (max-width: 768px) {
    /* All sections */
    section {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    /* All containers */
    div[style*="max-width"] {
        max-width: 100% !important;
    }
    
    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Prevent any element from causing horizontal scroll */
    * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    /* Exception for necessary elements */
    .hamburger,
    .mobile-menu,
    nav,
    footer {
        max-width: none !important;
    }
}

/* ========================================
   FIX 14: TABLET OPTIMIZATIONS (769px - 1024px)
   ======================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    /* Main container */
    section:has(.flipbook-page) > div[style*="max-width:1400px"] {
        padding: 0 30px !important;
    }
    
    /* Flipbook pages */
    .flipbook-page {
        padding: 3rem 2rem !important;
    }
    
    /* 2-column grids stay 2 columns on tablet */
    .flipbook-page div[style*="grid-template-columns:1fr 1fr"],
    .flipbook-page div[style*="grid-template-columns:repeat(2, 1fr)"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem !important;
    }
    
    /* 3-column grids become 2 columns */
    .flipbook-page div[style*="grid-template-columns:repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ========================================
   FIX 15: SMALL MOBILE (≤480px)
   ======================================== */

@media (max-width: 480px) {
    /* Extra small padding */
    .flipbook-page {
        padding: 1.5rem 1rem !important;
    }
    
    /* Smaller text */
    .flipbook-page h2 {
        font-size: 1.5rem !important;
    }
    
    .flipbook-page h3 {
        font-size: 1.1rem !important;
    }
    
    .flipbook-page p {
        font-size: 0.95rem !important;
    }
    
    /* Timeline - tighter spacing */
    div[style*="position:relative"][style*="padding-left"] {
        padding-left: 2.5rem !important;
    }
    
    /* Buttons */
    button,
    a.btn {
        padding: 0.8rem 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* ========================================
   END OF IBOGO PROJECT PAGE RESPONSIVE CSS
   ======================================== */