/* ==========================================================================
   IMPACT DEALS - Design System v1.0
   Premium Dark Theme with Imagery
   ========================================================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0f1a;
    --bg-darker: #050810;
    --bg-card: #111827;
    --bg-card-hover: #1f2937;
    --teal: #14b8a6;
    --teal-light: #2dd4bf;
    --teal-dark: #0d9488;
    --teal-glow: rgba(20, 184, 166, 0.2);
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --gold: #f59e0b;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gradient-teal: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    --gradient-hero: linear-gradient(135deg, #14b8a6 0%, #3b82f6 50%, #8b5cf6 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px var(--teal-glow);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(32px, 4vw, 48px); }
h3 { font-size: clamp(24px, 3vw, 32px); }
h4 { font-size: 20px; }

p {
    color: var(--gray-400);
    line-height: 1.7;
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--teal-light);
}

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

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
}

nav.scrolled .logo img {
    height: 35px;
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
}

.nav-links a {
    color: var(--gray-300);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    display: flex;
    gap: 12px;
}

/* Mobile menu toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-teal);
    color: var(--white);
    box-shadow: 0 4px 20px var(--teal-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--teal-glow);
    color: var(--white);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--white);
    border: 1px solid var(--gray-600);
}

.btn-secondary:hover {
    border-color: var(--teal);
    color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-300);
    border: 1px solid var(--gray-600);
}

.btn-ghost:hover {
    border-color: var(--teal);
    color: var(--white);
}

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

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--teal-dark);
}

.btn-large {
    padding: 16px 36px;
    font-size: 16px;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero.hero-short {
    min-height: 60vh;
    padding: 140px 40px 100px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(20, 184, 166, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
}

.hero-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,15,26,0.5) 0%, var(--bg-dark) 100%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content.center {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--teal-light);
    margin-bottom: 25px;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--teal);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero h1 {
    margin-bottom: 25px;
}

.hero h1 .gradient-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(18px, 2vw, 22px);
    color: var(--gray-400);
    margin-bottom: 35px;
    line-height: 1.7;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-ctas.center {
    justify-content: center;
}

/* Page Hero (shorter) */
.page-hero {
    padding: 160px 40px 80px;
    position: relative;
    overflow: hidden;
}

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

.page-hero h1 {
    margin-bottom: 20px;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--gray-400);
}

.breadcrumb span {
    color: var(--teal);
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

section {
    padding: 100px 40px;
    position: relative;
}

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

.container-lg {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 15px;
}

.section-title {
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto;
}

/* Alternating backgrounds */
.bg-dark { background: var(--bg-dark); }
.bg-darker { background: var(--bg-darker); }
.bg-gradient { background: linear-gradient(180deg, var(--bg-dark) 0%, #0f1629 100%); }
.bg-teal { background: var(--gradient-teal); }

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

.card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 35px;
    transition: all 0.4s ease;
}

.card:hover {
    border-color: rgba(20, 184, 166, 0.3);
    transform: translateY(-5px);
}

.card-highlight {
    position: relative;
    overflow: hidden;
}

.card-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-hero);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.card h3, .card h4 {
    margin-bottom: 12px;
}

.card p {
    margin-bottom: 20px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--teal);
    font-weight: 600;
    font-size: 14px;
}

.card-link:hover {
    gap: 12px;
}

/* Image Cards */
.card-image {
    overflow: hidden;
    padding: 0;
}

.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.card-image .card-body {
    padding: 30px;
}

/* ==========================================================================
   GRIDS
   ========================================================================== */

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

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

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* ==========================================================================
   STATS
   ========================================================================== */

.stats-row {
    display: flex;
    gap: 60px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 48px;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Stats Bar */
.stats-bar {
    background: var(--bg-darker);
    padding: 50px 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ==========================================================================
   CONTENT BLOCKS
   ========================================================================== */

.content-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.content-block.reverse {
    direction: rtl;
}

.content-block.reverse > * {
    direction: ltr;
}

.content-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.content-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.content-text h2 {
    margin-bottom: 20px;
}

.content-text p {
    margin-bottom: 20px;
}

.content-text ul {
    list-style: none;
    margin-bottom: 30px;
}

.content-text li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--gray-300);
}

.content-text li::before {
    content: '✓';
    color: var(--teal);
    font-weight: bold;
    flex-shrink: 0;
}

/* ==========================================================================
   SDG BADGES
   ========================================================================== */

.sdg-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--teal);
}

/* ==========================================================================
   CTA SECTIONS
   ========================================================================== */

.cta-section {
    background: var(--gradient-teal);
    text-align: center;
    padding: 100px 40px;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    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.05'%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");
}

.cta-section > * {
    position: relative;
    z-index: 1;
}

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

.cta-section p {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
    background: var(--bg-darker);
    padding: 80px 40px 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand {
    padding-right: 40px;
}

.footer-brand img {
    height: 35px;
    margin-bottom: 20px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    color: var(--gray-300);
}

.footer-col a {
    display: block;
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--teal);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: var(--gray-600);
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--gray-500);
    font-size: 13px;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-teal { color: var(--teal); }
.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-60 { margin-bottom: 60px; }

.mt-40 { margin-top: 40px; }
.mt-60 { margin-top: 60px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .grid-3, .grid-4, .grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-block {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .content-block.reverse {
        direction: ltr;
    }

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

@media (max-width: 768px) {
    section {
        padding: 70px 20px;
    }

    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero {
        padding: 120px 20px 80px;
    }

    .page-hero {
        padding: 120px 20px 60px;
    }

    .grid-2, .grid-3, .grid-4, .grid-5 {
        grid-template-columns: 1fr;
    }

    .stats-row {
        gap: 30px;
    }

    .stat-value {
        font-size: 36px;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-ctas .btn {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-600);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--teal);
}

/* Selection */
::selection {
    background: var(--teal);
    color: var(--white);
}
