/* --- CSS Reset & Base Styles (Minimalist Pro Theme) --- */
:root {
    --color-primary: #4a90e2; /* Soft Blue */
    --color-secondary: #f5a623; /* Warm Orange Accent */
    --color-dark: #1a1a2e; /* Deep Navy/Dark Background */
    --color-light: #ffffff;
    --color-text: #e0e0e0;
    --color-surface: #2c2c44; /* Slightly lighter dark for cards */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-dark);
    color: var(--color-text);
    line-height: 1.6;
}

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

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--color-light);
    margin-bottom: 0.5em;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

section {
    padding: 60px 0;
}

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

a:hover {
    color: var(--color-secondary);
}

/* --- Images & Content Placeholders --- */
.hero-image-placeholder, .about-image-placeholder, .team-photo {
    overflow: hidden; 
    background-color: var(--color-surface);
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    display: flex; /* Used for centering image */
    justify-content: center;
    align-items: center;
}

.content-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area */
    opacity: 0.8; /* Slight dimming for aesthetic */
    transition: opacity 0.5s ease;
}

.hero-image-placeholder .content-image, .about-image-placeholder .content-image {
    object-position: center top; /* Good default for calming scenes */
}

.team-photo .content-image {
    border-radius: 50%; 
    object-fit: cover;
    opacity: 1;
}

.feature-card:hover .resource-image, 
.bento-item:hover .resource-image {
    opacity: 1;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-light);
}

.btn-primary:hover {
    background-color: #3a78c1; /* Slightly darker primary */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-warning {
    background-color: var(--color-secondary);
    color: var(--color-dark);
}

.btn-warning:hover {
    background-color: #d48f1e;
}

/* --- Header & Navigation --- */
.main-header {
    background-color: rgba(26, 26, 46, 0.95); /* Slightly transparent dark */
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

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

.nav-link {
    color: var(--color-text);
    font-weight: 400;
    padding: 5px 10px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link.active {
    color: var(--color-primary);
    font-weight: 600;
}

.nav-link:not(.cta-link):hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transform: scaleX(1); 
    transition: transform 0.3s ease;
}

.cta-link {
    background-color: var(--color-primary);
    color: var(--color-light) !important;
    padding: 8px 18px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.cta-link:hover {
    background-color: #3a78c1;
    color: var(--color-light) !important;
}

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70vh;
    padding: 80px 0;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 55%;
    text-align: left;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 0.3em;
}

.hero p {
    font-size: 1.25rem;
    color: #a0a0b9;
    margin-bottom: 30px;
}

.hero-image-placeholder {
    flex: 1;
    min-height: 350px;
    background: linear-gradient(135deg, var(--color-surface) 0%, #3a3a55 100%);
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    /* Placeholder for a calming graphic */
}

/* --- Features Grid --- */
.features-grid {
    text-align: center;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background-color: var(--color-surface);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    border-top: 4px solid var(--color-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.3);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--color-secondary);
}

.feature-card h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
}

/* --- CTA Banner --- */
.cta-banner {
    background-color: var(--color-surface);
    padding: 80px 0;
    text-align: center;
    border-top: 1px solid rgba(74, 144, 226, 0.2);
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
}

.cta-content h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #a0a0b9;
}

/* --- Footer --- */
.main-footer {
    background-color: #121220; /* Even darker */
    padding: 40px 0 10px;
    color: #b0b0c0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #b0b0c0;
}

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

.copyright {
    text-align: center;
    padding-top: 20px;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* --- Page Specific Styles (Resources) --- */
.page-header {
    text-align: center;
    padding: 40px 0;
}

.page-header h1 {
    font-size: 3rem;
}

.bento-grid-resources {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.bento-item {
    background-color: var(--color-surface);
    padding: 25px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.bento-item h3 {
    color: var(--color-primary);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.bento-item .resource-image {
    height: 60px; 
    width: 60px; 
    float: right; 
    margin-left: 15px;
    border-radius: 50%;
    opacity: 0.6;
    transition: opacity 0.5s ease;
}

.bento-item .read-more {
    display: block;
    margin-top: 15px;
    color: var(--color-secondary);
    font-weight: 600;
    text-align: right;
}

.wide-item {
    grid-column: span 12;
    background: linear-gradient(135deg, var(--color-surface) 0%, #3a3a55 100%);
    text-align: center;
}

.wide-item h3 {
    font-size: 1.8rem;
    color: var(--color-light);
}

.wide-item p {
    max-width: 700px;
    margin: 10px auto 20px;
}

/* Specific grid layout for resources */
.resource-card {
    grid-column: span 4; 
}

.resource-card-special {
    grid-column: span 6;
    text-align: center;
}

.resource-card-special .btn-warning {
    margin-top: 15px;
}

/* Responsive adjustments for Bento Grid */
@media (max-width: 992px) {
    .resource-card, .resource-card-special {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .resource-card, .resource-card-special {
        grid-column: span 12;
    }
    .bento-grid-resources {
        gap: 15px;
    }
}

.search-section {
    padding: 50px 0 80px;
    text-align: center;
}

.search-input {
    padding: 12px 20px;
    border: 2px solid var(--color-surface);
    border-radius: 30px 0 0 30px;
    width: 60%;
    max-width: 400px;
    font-size: 1rem;
    background-color: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.search-bar-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.btn-search {
    padding: 12px 25px;
    border-radius: 0 30px 30px 0;
    background-color: var(--color-primary);
    color: var(--color-light);
    border: none;
    transition: background-color 0.3s ease;
}

.btn-search:hover {
    background-color: #3a78c1;
}

/* --- Page Specific Styles (About Us) --- */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 40px 0;
}

.grid-2-col-reverse {
    flex-direction: row-reverse;
}

.about-text {
    flex: 1;
}

.about-image-placeholder {
    flex: 1;
    min-height: 350px;
    background: linear-gradient(45deg, var(--color-surface), #3a3a55);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    min-width: 300px;
}

.mission-list {
    list-style: none;
    margin-top: 20px;
}

.mission-list li {
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.mission-list li:last-child {
    border-bottom: none;
}

.team-section {
    text-align: center;
    padding-bottom: 80px;
}

.team-grid {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-top: 40px;
}

.team-member {
    background-color: var(--color-surface);
    padding: 25px;
    border-radius: 12px;
    transition: transform 0.3s ease;
    width: 30%;
}

.team-member:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.2);
}

.team-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #3a3a55;
    margin: 0 auto 15px;
    border: 3px solid var(--color-primary);
}

.team-member h4 {
    color: var(--color-primary);
    margin-bottom: 5px;
}

/* --- Page Specific Styles (Global Impact / Timeline) --- */
.timeline-container {
    max-width: 800px;
    margin: 0 auto 60px;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(74, 144, 226, 0.3);
    transform: translateX(-50%);
}

.timeline-event {
    display: flex;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
    align-items: center;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 0 5px rgba(26, 26, 46, 0.5);
    transition: background-color 0.4s ease;
}

.timeline-dot.primary { background-color: var(--color-primary); }
.timeline-dot.secondary { background-color: var(--color-secondary); }

.timeline-content {
    padding: 15px 40px;
    background-color: var(--color-surface);
    border-radius: 8px;
    flex-grow: 1;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Alternating left/right positioning for better flow */
.timeline-event:nth-child(odd) {
    padding-right: 50%;
}
.timeline-event:nth-child(even) {
    padding-left: 50%;
}

.timeline-event:nth-child(odd) .timeline-content {
    margin-left: 20px;
}
.timeline-event:nth-child(even) .timeline-content {
    margin-right: 20px;
    order: -1; /* Push content to the left side visually */
}

.timeline-event:nth-child(even) {
    justify-content: flex-end;
    text-align: right;
}

.timeline-event h3 {
    font-size: 1.4rem;
}

.timeline-event p {
    margin-top: 5px;
    color: #a0a0b9;
}

.country-highlight {
    text-align: center;
    padding: 40px;
    background-color: var(--color-surface);
    border-radius: 12px;
    border: 2px solid var(--color-secondary);
}

.country-highlight h3 {
    font-size: 1.8rem;
    color: var(--color-secondary);
}

.country-highlight p {
    margin-bottom: 10px;
}

/* --- Responsiveness (Global Page) --- */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 30px; /* Move line to the left */
    }
    
    .timeline-event {
        padding: 0 0 0 60px; /* Make space for dot on left */
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .timeline-event:nth-child(odd), .timeline-event:nth-child(even) {
        padding-left: 60px;
        padding-right: 0;
    }

    .timeline-dot {
        left: 30px;
    }

    .timeline-event .timeline-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        order: 0 !important;
    }

    .highlight-content p strong {
        font-weight: 700;
        color: var(--color-secondary);
    }
}

/* --- Responsiveness (General) --- */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 60px 0;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .hero-image-placeholder {
        min-height: 250px;
        width: 100%;
        margin-top: 30px;
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    .nav-link { padding: 5px 5px; }

    .about-content {
        flex-direction: column;
    }
    .grid-2-col-reverse {
        flex-direction: column;
    }
    .about-image-placeholder {
        order: -1;
        min-width: 100%;
    }
    
    .team-grid {
        flex-direction: column;
        gap: 20px;
    }
    .team-member {
        width: 100%;
    }
}

@media (max-width: 600px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1rem; }

    .btn { padding: 10px 20px; }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col ul { padding: 0; }
    
    .search-input, .btn-search {
        width: 100%;
        border-radius: 20px; 
        margin-top: 10px;
    }
    .search-input {
        border-radius: 20px;
    }
    .btn-search {
        border-radius: 20px;
    }
    .search-bar-container {
        flex-direction: column;
        padding: 0 20px;
    }
}

/* --- Animations (Smooth Interactions) --- */

/* Fade In Up */
.fade-in-up { 
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

/* Fade In (General) */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Scroll Triggered Visibility (JS will add 'visible' class) */
.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* CTA Fast Pulse */
.fade-in-up-fast {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleUp 0.6s forwards;
}

@keyframes scaleUp {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Resource Card Pulse Border Animation */
@keyframes pulseBorder {
    0% { border-color: var(--color-primary); }
    50% { border-color: var(--color-secondary); }
    100% { border-color: var(--color-primary); }
}

.animate-pulse-border {
    animation: pulseBorder 4s infinite ease-in-out;
}

/* --- Services Page Specific Adjustments --- */
.pricing-grid {
    padding-bottom: 80px;
}

.pricing-grid .grid-3-col {
    max-width: 1100px; 
    margin-left: auto; 
    margin-right: auto;
}

.pricing-grid .feature-card {
    border-top: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-grid .feature-card h3 {
    color: var(--color-light);
}

.pricing-grid .feature-card:hover {
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.3);
    transform: translateY(-5px);
}

.workshops-section {
    background-color: var(--color-surface);
}

.workshops-section .bento-item {
    border-left: 5px solid var(--color-primary);
}

/* --- Policy Page Specific Adjustments --- */
.privacy-section h3 {
    color: var(--color-secondary);
    margin-top: 15px;
    margin-bottom: 10px;
}

.privacy-section .about-text p {
    margin-bottom: 15px;
}

#crisis {
    margin-top: 50px;
}

/* --- Global Page Specific Adjustments --- */
.timeline-container {
    max-width: 800px;
    margin: 0 auto 60px;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(74, 144, 226, 0.3);
    transform: translateX(-50%);
}

.timeline-event {
    display: flex;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
    align-items: center;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 0 5px rgba(26, 26, 46, 0.5);
    transition: background-color 0.4s ease;
}

.timeline-dot.primary { background-color: var(--color-primary); }
.timeline-dot.secondary { background-color: var(--color-secondary); }

.timeline-content {
    padding: 15px 40px;
    background-color: var(--color-surface);
    border-radius: 8px;
    flex-grow: 1;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Alternating left/right positioning for better flow */
.timeline-event:nth-child(odd) {
    padding-right: 50%;
}
.timeline-event:nth-child(even) {
    padding-left: 50%;
}

.timeline-event:nth-child(odd) .timeline-content {
    margin-left: 20px;
}
.timeline-event:nth-child(even) .timeline-content {
    margin-right: 20px;
    order: -1; /* Push content to the left side visually */
}

.timeline-event:nth-child(even) {
    justify-content: flex-end;
    text-align: right;
}

.timeline-event h3 {
    font-size: 1.4rem;
}

.timeline-event p {
    margin-top: 5px;
    color: #a0a0b9;
}

.country-highlight {
    text-align: center;
    padding: 40px;
    background-color: var(--color-surface);
    border-radius: 12px;
    border: 2px solid var(--color-secondary);
}

.country-highlight h3 {
    font-size: 1.8rem;
    color: var(--color-secondary);
}

.country-highlight p {
    margin-bottom: 10px;
}

/* --- Responsiveness (Global Page) --- */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 30px; /* Move line to the left */
    }
    
    .timeline-event {
        padding: 0 0 0 60px; /* Make space for dot on left */
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .timeline-event:nth-child(odd), .timeline-event:nth-child(even) {
        padding-left: 60px;
        padding-right: 0;
    }

    .timeline-dot {
        left: 30px;
    }

    .timeline-event .timeline-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        order: 0 !important;
    }

    .highlight-content p strong {
        font-weight: 700;
        color: var(--color-secondary);
    }
}

/* --- Responsiveness (General) --- */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 60px 0;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .hero-image-placeholder {
        min-height: 250px;
        width: 100%;
        margin-top: 30px;
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    .nav-link { padding: 5px 5px; }

    .about-content {
        flex-direction: column;
    }
    .grid-2-col-reverse {
        flex-direction: column;
    }
    .about-image-placeholder {
        order: -1;
        min-width: 100%;
    }
    
    .team-grid {
        flex-direction: column;
        gap: 20px;
    }
    .team-member {
        width: 100%;
    }
}

@media (max-width: 600px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1rem; }

    .btn { padding: 10px 20px; }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col ul { padding: 0; }
    
    .search-input, .btn-search {
        width: 100%;
        border-radius: 20px; 
        margin-top: 10px;
    }
    .search-input {
        border-radius: 20px;
    }
    .btn-search {
        border-radius: 20px;
    }
    .search-bar-container {
        flex-direction: column;
        padding: 0 20px;
    }
}

/* Karbon Sites Branding */

  #karbon-promo-banner {
      position: fixed;
      bottom: 10px;
      right: 10px;
      background-color: rgba(0, 0, 0, 0.8);
      color: white;
      padding: 8px 16px;
      border-radius: 8px;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
      font-size: 14px;
      z-index: 10000;
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      transition: transform 0.2s ease-in-out;
  }
  #karbon-promo-banner:hover {
      transform: scale(1.05);
  }
