/* ============================================
   AFRICA GENDER INDEX - MODERN STYLESHEET
   Color palette derived from AGI logo:
   - Navy:  #1a2e50
   - Teal:  #0d8b7d
   - Forest:#1a5c4b
   - Light: #2ec4b6 (teal light)
   ============================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
    /* Logo-derived palette */
    --primary: #0d8b7d;
    --primary-light: #2ec4b6;
    --primary-dark: #0a6e63;
    --navy: #1a2e50;
    --navy-light: #243b6a;
    --navy-dark: #111f38;
    --forest: #1a5c4b;
    --accent: #0d8b7d;
    --accent-hover: #0a6e63;
    --accent-light: #2ec4b6;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --dark-3: #334155;
    --gray-100: #f0f7f6;
    --gray-200: #dfe9e8;
    --gray-300: #c4d4d2;
    --gray-400: #8da5a1;
    --gray-500: #5f7975;
    --white: #ffffff;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --shadow-sm: 0 1px 3px rgba(13, 139, 125, 0.06);
    --shadow-md: 0 4px 20px rgba(13, 139, 125, 0.08);
    --shadow-lg: 0 10px 40px rgba(13, 139, 125, 0.1);
    --shadow-xl: 0 20px 60px rgba(26, 46, 80, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
    background: var(--white);
}

a {
    text-decoration: none;
    transition: var(--transition);
}

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

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

/* ---------- TOP BAR ---------- */
.top-bar {
    background: var(--navy-dark);
    color: var(--gray-400);
    font-size: 0.8rem;
    padding: 8px 0;
    letter-spacing: 0.02em;
}

.top-bar a {
    color: var(--gray-400);
    font-size: 0.85rem;
}

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

.top-bar .vr {
    border-color: var(--dark-3);
    opacity: 0.5;
}

.top-link {
    font-weight: 500;
}

/* ---------- NAVBAR ---------- */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-md);
    padding: 0.6rem 0;
    z-index: 1040;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.4rem 0;
    box-shadow: 0 4px 30px rgba(13, 139, 125, 0.12);
}

.navbar-brand {
    display: flex;
    align-items: center;
}

/* Logo image */
.brand-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.navbar.scrolled .brand-logo {
    height: 42px;
}

/* Legacy brand icon (footer fallback) */
.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--forest));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.4rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--navy);
}

.brand-tagline {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--navy);
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary);
    background: rgba(13, 139, 125, 0.07);
}

.navbar-toggler {
    border: none;
    font-size: 1.5rem;
    color: var(--navy);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

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

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(13, 139, 125, 0.07);
    color: var(--primary);
}

.btn-accent {
    background: linear-gradient(135deg, var(--primary), var(--forest));
    color: var(--white);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--navy));
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(13, 139, 125, 0.35);
}

/* ---------- HERO SECTION ---------- */
.hero-section {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 40%, var(--forest) 75%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 0 8rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(46, 196, 182, 0.4);
    border-radius: 50%;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(46, 196, 182, 0.12);
    border: 1px solid rgba(46, 196, 182, 0.25);
    color: var(--accent-light);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, #2ec4b6, #5ee6d6, #0d8b7d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    max-width: 520px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-search .input-group {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    max-width: 540px;
}

.hero-search .input-group-text {
    background: transparent;
    border: none;
    color: var(--gray-400);
    padding-left: 1.2rem;
    font-size: 1.1rem;
}

.hero-search .form-control {
    border: none;
    padding: 1rem 0.5rem;
    font-size: 0.95rem;
}

.hero-search .form-control:focus {
    box-shadow: none;
}

.hero-search .btn-accent {
    padding: 0.8rem 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
    font-size: 0.95rem;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.hero-tags span {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
}

.hero-tags a {
    color: var(--accent-light);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 2px 10px;
    background: rgba(46, 196, 182, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(46, 196, 182, 0.2);
}

.hero-tags a:hover {
    background: rgba(46, 196, 182, 0.25);
    color: var(--white);
}

/* Hero Stats Grid */
.hero-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.hero-stat-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    color: var(--white);
    transition: var(--transition);
}

.hero-stat-card:hover {
    background: rgba(255,255,255,0.13);
    transform: translateY(-4px);
}

.hero-stat-card.accent {
    background: rgba(46, 196, 182, 0.1);
    border-color: rgba(46, 196, 182, 0.2);
}

.hero-stat-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-light);
}

.hero-stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

.hero-stat-card .stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero Wave */
.hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: auto;
}

/* ---------- NEWS TICKER ---------- */
.news-ticker-section {
    background: var(--gray-100);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.news-ticker {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}

.ticker-label {
    background: var(--primary);
    color: var(--white);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    white-space: nowrap;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(13, 139, 125, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(13, 139, 125, 0); }
}

.ticker-wrap {
    overflow: hidden;
    flex: 1;
}

.ticker-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    animation: ticker-scroll 40s linear infinite;
    white-space: nowrap;
}

.ticker-content a {
    color: var(--navy);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.ticker-content a:hover {
    color: var(--primary);
}

.ticker-dot {
    width: 5px;
    height: 5px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---------- SECTION COMMON ---------- */
.section-padding {
    padding: 5rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(13, 139, 125, 0.08);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.section-tag.light {
    background: rgba(46, 196, 182, 0.1);
    color: var(--accent-light);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.2;
}

.section-desc {
    font-size: 1rem;
    color: var(--gray-500);
    max-width: 500px;
    margin-top: 0.5rem;
}

/* ---------- NEWS CARDS ---------- */
.news-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    height: 100%;
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}

.news-card.featured .news-img {
    height: 280px;
}

.news-card .news-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.news-card:hover .news-img img {
    transform: scale(1.05);
}

.news-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.news-body {
    padding: 1.5rem;
}

.news-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.news-meta span {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.news-title {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card.featured .news-title {
    font-size: 1.4rem;
}

.news-excerpt {
    color: var(--gray-500);
    font-size: 0.9rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.news-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--forest));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.news-author span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.read-more:hover {
    color: var(--navy);
    gap: 0.5rem;
}

/* Horizontal News Card */
.news-card.horizontal {
    display: flex;
    flex-direction: row;
}

.news-card.horizontal .news-img {
    width: 200px;
    min-width: 200px;
    height: auto;
}

.news-card.horizontal .news-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.2rem;
}

.news-card.horizontal .news-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 2;
    margin-bottom: 0.5rem;
}

/* ---------- COUNTRY CARDS ---------- */
.country-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.country-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: var(--primary);
}

.country-flag {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.country-card h5 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--navy);
}

.country-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.country-stats div {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
}

.stat-lbl {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.country-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 50px;
    overflow: hidden;
    display: flex;
}

.bar-segment {
    height: 100%;
    transition: width 0.8s ease;
}

/* AGI-themed bar colors */
.bar-segment.education-bar { background: var(--primary); }
.bar-segment.health-bar { background: var(--navy); }
.bar-segment.econ-bar { background: var(--accent-light); }
.bar-segment.fossil { background: var(--gray-500); }
.bar-segment.hydro { background: #2d9cdb; }
.bar-segment.solar { background: var(--primary); }
.bar-segment.wind-bar { background: var(--forest); }
.bar-segment.geo { background: var(--navy-light); }

.bar-legend {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--gray-500);
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 3px;
    vertical-align: middle;
}

.dot.education-bar { background: var(--primary); }
.dot.health-bar { background: var(--navy); }
.dot.econ-bar { background: var(--accent-light); }
.dot.fossil { background: var(--gray-500); }
.dot.hydro { background: #2d9cdb; }
.dot.solar { background: var(--primary); }
.dot.wind-bar { background: var(--forest); }
.dot.geo { background: var(--navy-light); }

/* ---------- DARK DATA SECTION ---------- */
.bg-dark-section {
    background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
}

.bg-dark-section .section-title {
    color: var(--white);
}

/* Data Cards */
.data-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.data-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-4px);
    border-color: var(--accent-light);
}

.data-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.education-icon { background: rgba(46, 196, 182, 0.15); color: var(--accent-light); }
.work-icon { background: rgba(26, 92, 75, 0.2); color: #3ddbc9; }
.parliament-icon { background: rgba(26, 46, 80, 0.2); color: #6b8fd4; }
.health-icon { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }

/* Legacy icons kept for backwards compat */
.solar-icon { background: rgba(46, 196, 182, 0.15); color: var(--accent-light); }
.wind-icon { background: rgba(26, 92, 75, 0.2); color: #3ddbc9; }
.hydro-icon { background: rgba(45, 156, 219, 0.15); color: #2d9cdb; }
.access-icon { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }

.data-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.data-unit {
    font-size: 1rem;
    color: var(--gray-400);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.data-label {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-bottom: 0.75rem;
}

.data-trend {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.data-trend.up {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

/* Chart Card */
.chart-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chart-header h5 {
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
}

.chart-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.chart-visual {
    height: 220px;
    display: flex;
    align-items: flex-end;
}

.chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    gap: 6px;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
}

.chart-bar-group span {
    color: var(--gray-400);
    font-size: 0.65rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.chart-bar-group.highlight span {
    color: var(--accent-light);
    font-weight: 700;
}

.bar-stack {
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    max-width: 32px;
    flex: 1;
    gap: 2px;
    align-items: stretch;
    justify-content: flex-start;
}

.bar {
    border-radius: 3px;
    transition: height 0.8s ease;
}

.bar.solar { background: var(--accent-light); }
.bar.wind-bar { background: var(--forest); }
.bar.hydro { background: #2d9cdb; }

/* Donut Chart */
.energy-mix-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.energy-mix-card h5 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.donut-chart {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.donut-chart svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-segment {
    transition: all 0.8s ease;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    display: block;
    line-height: 1;
}

.donut-label {
    font-size: 0.65rem;
    color: var(--gray-400);
    display: block;
    margin-top: 2px;
}

.mix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--gray-400);
    justify-content: center;
}

.mix-legend strong {
    color: var(--white);
}

/* ---------- PROJECT CARDS ---------- */
.project-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: transparent;
}

.project-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-status.active {
    background: rgba(13, 139, 125, 0.9);
    color: var(--white);
}

.project-status.construction {
    background: rgba(26, 46, 80, 0.85);
    color: var(--white);
}

.project-body {
    padding: 1.5rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tag {
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
}

.tag.education-tag { background: rgba(13, 139, 125, 0.1); color: var(--primary); }
.tag.stem-tag { background: rgba(26, 92, 75, 0.1); color: var(--forest); }
.tag.health-tag { background: rgba(26, 46, 80, 0.1); color: var(--navy); }
.tag.solar { background: rgba(13, 139, 125, 0.1); color: var(--primary); }
.tag.wind { background: rgba(26, 92, 75, 0.1); color: var(--forest); }
.tag.hydro-tag { background: rgba(45, 156, 219, 0.1); color: #2563eb; }

.tag-country {
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-500);
}

.project-card h5 {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.project-card p {
    font-size: 0.88rem;
    color: var(--gray-500);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-details {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.project-details div {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
}

.project-details i {
    color: var(--primary);
    margin-right: 0.25rem;
}

/* ---------- CTA / NEWSLETTER ---------- */
.cta-section {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--forest) 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(46, 196, 182, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(46, 196, 182, 0.15);
    color: var(--accent-light);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cta-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-text {
    color: rgba(255,255,255,0.7);
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.7;
}

.cta-form .input-group {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    max-width: 480px;
}

.cta-form .form-control {
    border: none;
    padding: 1rem 1.2rem;
}

.cta-form .form-control:focus {
    box-shadow: none;
}

.cta-form .btn-accent {
    padding: 0.8rem 1.5rem;
    white-space: nowrap;
}

/* CTA Features */
.cta-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cta-feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.cta-feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(46, 196, 182, 0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.cta-feature strong {
    color: var(--white);
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.2rem;
}

.cta-feature p {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    margin: 0;
}

/* ---------- PARTNERS ---------- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
}

.partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.partner-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.partner-logo {
    width: 60px;
    height: 60px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.partner-item span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
    text-align: center;
}

/* ---------- FOOTER ---------- */
.site-footer {
    background: var(--navy-dark);
    color: var(--gray-400);
    padding: 4rem 0 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.footer-logo {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-brand .brand-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.footer-brand .brand-name {
    color: var(--white);
    font-size: 1rem;
}

.footer-about {
    font-size: 0.88rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--gray-400);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 1rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-heading {
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

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

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

.footer-links a {
    color: var(--gray-400);
    font-size: 0.88rem;
}

.footer-links a:hover {
    color: var(--accent-light);
    padding-left: 4px;
}

.contact-links li {
    font-size: 0.85rem;
}

.footer-divider {
    border-color: rgba(255,255,255,0.08);
    margin: 3rem 0 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 0;
}

.footer-bottom p {
    font-size: 0.8rem;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: var(--gray-400);
    font-size: 0.8rem;
}

.footer-bottom-links a:hover {
    color: var(--accent-light);
}

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

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

.back-to-top:hover {
    background: var(--navy);
    transform: translateY(-3px);
}

/* ---------- BUTTONS ---------- */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--forest));
    border: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--navy));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 139, 125, 0.3);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ---------- PROGRESS BAR OVERRIDE ---------- */
.progress-bar.bg-success {
    background: var(--primary) !important;
}

.progress-bar.bg-warning {
    background: var(--navy) !important;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1199px) {
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-padding {
        padding: 3.5rem 0;
    }

    .navbar-collapse {
        background: var(--white);
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-top: 0.5rem;
        box-shadow: var(--shadow-lg);
    }

    .cta-title {
        font-size: 1.8rem;
    }

    .brand-logo {
        height: 44px;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 4rem 0 6rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-search .input-group {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .hero-search .btn-accent {
        border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
        width: 100%;
    }

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

    .news-card.horizontal .news-img {
        width: 100%;
        height: 180px;
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .chart-bars {
        gap: 3px;
    }

    .chart-bar-group span {
        font-size: 0.55rem;
    }

    .brand-logo {
        height: 38px;
    }
}

@media (max-width: 576px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .country-stats {
        gap: 1rem;
    }

    .project-details {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
