/* ===================================
   IWMI Solar Suitability Dashboard
   Water-Inspired Design System
   =================================== */

/* ===== Font Declarations ===== */
@font-face {
    font-family: 'National';
    src: url('fonts/National-Book.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'National';
    src: url('fonts/National-BookItalic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'National';
    src: url('fonts/National-Regular.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'National';
    src: url('fonts/National-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ===== CSS Variables (Color Palette) ===== */
:root {
    /* IWMI Primary Colors */
    --primary-dark-blue: #28537D;    /* PMS 2945 */
    --primary-light-blue: #5088C6;   /* PMS 2381 */
    --primary-sky-blue: #46BBD4;     /* PMS 2985 */

    /* IWMI Secondary Colors */
    --secondary-teal: #0297A6;       /* PMS 7712 */
    --secondary-green: #22AD7A;      /* PMS 2416 */
    --secondary-orange: #E86933;     /* PMS 166 */
    --secondary-yellow: #DD9103;     /* PMS 129 U / 130 C */
    --secondary-light-grey: #E8E7E7; /* PMS 649 */

    /* Legacy Variable Mappings (for compatibility) */
    --primary-blue: #5088C6;
    --primary-teal: #0297A6;
    --primary-dark: #28537D;
    --secondary-gold: #DD9103;

    /* Accent Colors */
    --accent-light-blue: #46BBD4;
    --accent-cyan: #5088C6;
    --accent-orange: #E86933;

    /* Neutral Colors */
    --white: #FFFFFF;
    --light-gray: #E8E7E7;
    --medium-gray: #E8E7E7;
    --dark-gray: #28537D;
    --almost-black: #28537D;

    /* Gradients - Using Official IWMI Colors */
    --gradient-water: linear-gradient(135deg, var(--secondary-teal) 0%, var(--primary-light-blue) 100%);
    --gradient-nature: linear-gradient(135deg, var(--primary-teal) 0%, var(--secondary-teal) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(40, 83, 125, 0.95) 0%, rgba(80, 136, 198, 0.9) 50%, rgba(2, 151, 166, 0.85) 100%);

    /* Typography - Official IWMI Fonts */
    --font-display: 'DM Serif Text', serif;  /* IWMI Display/Heading Font */
    --font-body: 'National', 'Inter', sans-serif;  /* IWMI Body Font with fallback */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== Typography System ===== */
/* Standardized Font Sizes:
   - H1: 2.5rem (40px) - Page titles
   - H2: 2rem (32px) - Section titles
   - H3: 1.5rem (24px) - Card titles
   - H4: 1.25rem (20px) - Subsection titles
   - Body Large: 1.125rem (18px) - Emphasis text
   - Body: 1rem (16px) - Standard text
   - Body Small: 0.875rem (14px) - Secondary text
   - Caption: 0.75rem (12px) - Small labels
*/

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--almost-black);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 2.5rem;
    font-weight: 900;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-teal);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-size: 1rem;
}

.btn i {
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--gradient-water);
    color: var(--white);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 102, 161, 0.3);
}

.btn-primary span,
.btn-primary i {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* ===== Top Header ===== */
.top-header {
    width: 100%;
    display: block;
    line-height: 0;
    overflow: hidden;
    max-height: 250px;
}

.header-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
}

/* ===== Navigation ===== */
.navbar {
    background: var(--primary-dark-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.3rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    border-bottom: 3px solid var(--primary-teal);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.main-logos {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding-right: var(--spacing-xl);
    position: relative;
}

.main-logos::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 50px;
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.nav-logo-main {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-logo-cgiar {
    height: 50px;
}

.logo-separator {
    color: var(--primary-sky-blue);
    font-size: 3rem;
    font-weight: 300;
    line-height: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0 0.25rem;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.nav-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
}

.nav-tagline {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.3px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    text-decoration: none;
    border: 1px solid transparent;
}

.nav-links a i {
    font-size: 1.125rem;
    transition: transform var(--transition-normal);
}

.nav-links a:hover {
    color: var(--primary-teal);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(34, 173, 122, 0.3);
}

.nav-links a:hover i {
    transform: translateX(2px);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: var(--spacing-lg);
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    width: 100%;
    background: var(--white);
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hero-image-carousel {
    position: relative;
    width: 100%;
    display: block;
    line-height: 0;
    margin-bottom: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

.hero-slide:first-child {
    position: relative;
    visibility: visible;
    margin: 0;
    padding: 0;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
    margin: 0;
    padding: 0;
}

/* Carousel Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    opacity: 0.6;
}

.carousel-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: var(--spacing-lg);
}

.carousel-nav.next {
    right: var(--spacing-lg);
}

.carousel-nav i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

/* ===== Section Styles ===== */
section {
    padding: var(--spacing-2xl) 0;
}

section.hero {
    padding: 0;
}

section:first-of-type {
    margin-top: 0;
    padding-top: 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--dark-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== About Section ===== */
.about {
    background: linear-gradient(135deg, rgba(70, 187, 212, 0.08) 0%, rgba(34, 173, 122, 0.12) 100%);
    position: relative;
    margin-top: 0;
    padding: var(--spacing-2xl) 0;
    overflow: hidden;
    border-bottom: 2px solid rgba(34, 173, 122, 0.2);
}

.about .container {
    position: relative;
    z-index: 2;
}

/* About Header */
.about-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.about-title {
    font-size: 2rem;
    color: var(--primary-dark-blue);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.about-tagline {
    font-size: 1.125rem;
    color: var(--primary-teal);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* About Content Wrapper - Two Column Layout */
.about-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-2xl);
    align-items: start;
}

.about-main-content {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-sky-blue);
    min-height: 600px;
}

.intro-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-lg);
    text-align: justify;
}

.intro-text p:last-child {
    margin-bottom: 0;
}

.read-more-link {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--light-gray);
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--primary-teal);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition-normal);
    padding: 0.5rem 0;
}

.btn-read-more i {
    font-size: 1rem;
    transition: transform var(--transition-normal);
}

.btn-read-more:hover {
    color: var(--secondary-teal);
    gap: var(--spacing-sm);
}

.btn-read-more:hover i {
    transform: translateX(4px);
}

/* About Sidebar - Feature Cards */
.about-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: sticky;
    top: calc(var(--spacing-2xl) + 80px);
}

.feature-card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary-teal);
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateX(-4px);
    box-shadow: 0 6px 25px rgba(34, 173, 122, 0.2);
    border-left-width: 6px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-teal), var(--secondary-teal));
    border-radius: 50%;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--white);
    transition: transform var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.25rem;
    color: var(--primary-dark-blue);
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.feature-card p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--dark-gray);
    flex-grow: 1;
}

.about-link-section {
    margin-top: var(--spacing-xl);
    text-align: center;
    padding: var(--spacing-lg);
    background: rgba(0, 155, 140, 0.05);
    border-radius: var(--radius-lg);
}

.about-link-section p {
    font-size: 1.125rem;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

/* ===== Features Section ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.feature-item {
    padding: var(--spacing-md);
    text-align: center;
    transition: transform var(--transition-normal);
}

.feature-item:hover {
    transform: scale(1.05);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-blue);
}

.feature-icon i {
    display: block;
}

/* ===== Dashboard Section ===== */
.dashboard-section {
    background: var(--white);
    padding: var(--spacing-2xl) 0;
    position: relative;
    border-bottom: 2px solid rgba(80, 136, 198, 0.2);
}

.dashboard-section .container {
    position: relative;
    z-index: 2;
}

/* Countries Grid */
.countries-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.country-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--medium-gray);
    position: relative;
    min-height: 180px;
    gap: var(--spacing-lg);
}

.country-card.active {
    border-color: var(--primary-teal);
    border-width: 2px;
}

.country-card.active:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.country-card.coming-soon {
    background: var(--light-gray);
}

.country-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--primary-dark);
    font-weight: 600;
}

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--medium-gray);
    border-radius: var(--radius-md);
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    min-height: 600px;
    border: 2px solid rgba(0, 155, 140, 0.1);
    transition: all var(--transition-normal);
}

.dashboard-container:hover {
    box-shadow: 0 25px 50px rgba(0, 102, 161, 0.15);
    border-color: rgba(0, 155, 140, 0.3);
}

.dashboard-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    background:
        linear-gradient(135deg, rgba(0, 102, 161, 0.05) 0%, rgba(0, 155, 140, 0.05) 100%),
        radial-gradient(circle at 30% 40%, rgba(79, 195, 247, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(0, 188, 212, 0.06) 0%, transparent 60%);
    position: relative;
    overflow: hidden;
}

.dashboard-placeholder::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
        transparent 40%,
        rgba(0, 155, 140, 0.03) 50%,
        transparent 60%);
    animation: dashboardShimmer 8s linear infinite;
}

@keyframes dashboardShimmer {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.placeholder-content {
    text-align: center;
    padding: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.loading-icon {
    font-size: 4rem;
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: var(--spacing-md);
    color: var(--primary-teal);
    position: relative;
}

.loading-icon i {
    display: block;
    animation: spinSlow 4s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.dashboard-container iframe {
    width: 100%;
    height: 800px;
    border: none;
}

/* ===== Data Categories ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.category-card {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-teal);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 155, 140, 0.05), transparent);
    transition: left 0.5s ease;
}

.category-card:hover::after {
    left: 100%;
}

.category-card:hover {
    box-shadow: var(--shadow-lg);
    border-left-width: 6px;
    border-left-color: var(--primary-teal);
    transform: translateX(5px);
}

.category-card h3 {
    color: var(--primary-blue);
    margin-bottom: var(--spacing-md);
}

.category-card ul {
    list-style: none;
    padding-left: 0;
}

.category-card li {
    padding: var(--spacing-xs) 0;
    padding-left: var(--spacing-md);
    position: relative;
}

.category-card li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-teal);
    font-weight: 700;
}

.category-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-teal);
}

.category-icon i {
    display: block;
}

/* ===== Contact Section ===== */
.contact {
    background: linear-gradient(135deg, rgba(2, 151, 166, 0.08) 0%, rgba(34, 173, 122, 0.1) 100%);
    padding: var(--spacing-2xl) 0;
}

.contact-card {
    max-width: 1100px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    color: var(--dark-gray);
    text-align: center;
}

.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--white);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-teal);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-normal);
}

.contact-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(2, 151, 166, 0.1);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.25rem;
    color: var(--primary-teal);
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.contact-content span {
    font-size: 0.875rem;
    color: var(--dark-gray);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.contact-content a {
    font-size: 1rem;
    color: var(--primary-dark-blue);
    text-decoration: none;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.contact-content a:hover {
    color: var(--primary-teal);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    max-width: 1100px;
    margin: 0 auto;
}

.contact-column {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.contact-column h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-dark);
    border-bottom: 2px solid var(--primary-teal);
    padding-bottom: var(--spacing-sm);
}

.contact-column p {
    line-height: 1.7;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-md);
}

.contact-column a {
    color: var(--primary-teal);
    text-decoration: none;
    font-weight: 500;
}

.contact-column a:hover {
    text-decoration: underline;
}

.team-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.team-member {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.team-member strong {
    color: var(--primary-dark);
    font-size: 1rem;
}

.team-member a {
    color: var(--primary-teal);
    text-decoration: none;
    font-size: 0.9rem;
}

.team-member a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-form input,
.contact-form textarea {
    padding: var(--spacing-sm);
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-teal);
}

/* ===== Footer ===== */
.footer {
    background: var(--primary-teal);
    color: var(--white);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    align-items: start;
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.footer-logo {
    height: 60px;
    margin-bottom: 0;
}

.footer-section h4 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary-light-blue);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    color: rgba(255, 255, 255, 0.8);
}

.social-icon i {
    font-size: 1.25rem;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 var(--spacing-md);
    }

    .nav-brand {
        gap: var(--spacing-sm);
        flex: 1;
        min-width: 0;
    }

    .main-logos {
        padding-right: var(--spacing-sm);
        gap: var(--spacing-xs);
    }

    .main-logos::after {
        height: 30px;
    }

    .nav-logo-main {
        height: 32px;
    }

    .nav-logo-cgiar {
        height: 40px;
    }

    .nav-title {
        font-size: 1.25rem;
        letter-spacing: 0.5px;
    }

    .nav-tagline {
        font-size: 0.6rem;
    }

    .logo-separator {
        font-size: 2.5rem;
        line-height: 38px;
        height: 38px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-blue);
        flex-direction: column;
        padding: var(--spacing-md) 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        padding: var(--spacing-md) var(--spacing-lg);
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
        position: static;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
        opacity: 0.5;
    }

    .carousel-nav.prev {
        left: var(--spacing-sm);
    }

    .carousel-nav.next {
        right: var(--spacing-sm);
    }

    .carousel-nav i {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    .about-grid,
    .features-grid,
    .categories-grid,
    .contact-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .countries-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .about-sidebar {
        position: static;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 var(--spacing-sm);
    }

    .nav-logo-main {
        height: 32px;
    }

    .nav-logo-cgiar {
        height: 42px;
    }

    .logo-separator {
        font-size: 2rem;
        line-height: 32px;
        height: 32px;
    }

    .nav-title {
        font-size: 1.1rem;
    }

    .nav-tagline {
        display: none;
    }

    .carousel-nav {
        width: 35px;
        height: 35px;
    }

    .carousel-nav i {
        font-size: 1.125rem;
    }

    .countries-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
