/* ROOT VARIABLES ========================================== */
:root {
    /* Colors - Neutral & Futuristic Palette */
    --color-primary: #00a1ff; /* Bright, futuristic blue */
    --color-primary-dark: #007acc;
    --color-primary-rgb: 0, 161, 255; /* For rgba usage */

    --color-secondary: #00e5ff; /* Cyan accent */
    --color-secondary-dark: #00b8cc;

    --color-bg-page: #0d1117; /* Very dark, almost black - main page background */
    --color-bg-section-dark: #161b22; /* Dark section background (e.g., Methodology, Blog) */
    --color-bg-section-light: #0d1117; /* For sections like News, if a slight variation is needed, or same as page */
    --color-bg-neutral-light-section: #1c2128; /* For sections like External Resources, News */

    --color-bg-card: #1f242c; /* Card background - slightly lighter than section dark */
    --color-bg-input: #2a3038; /* Input field background */

    --color-text-light: #c9d1d9; /* Main text on dark backgrounds */
    --color-text-headings: #ffffff; /* Headings on dark backgrounds */
    --color-text-dark: #24292e; /* For elements on a hypothetical light overlay */
    --color-text-accent: var(--color-primary);
    --color-text-muted: #8b949e; /* Muted text, like dates or subtitles */
    --color-text-link-hover: var(--color-secondary);

    --color-border: #30363d;
    --color-border-input: #444c56;
    --color-border-focus: var(--color-primary);

    /* Fonts */
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;  /* 8px */
    --spacing-sm: 1rem;    /* 16px */
    --spacing-md: 1.5rem;  /* 24px */
    --spacing-lg: 2.5rem;  /* 40px */
    --spacing-xl: 4rem;    /* 64px */
    --section-padding-y: var(--spacing-xl);

    /* Borders */
    --border-radius-sm: 6px;
    --border-radius-md: 10px; /* Futuristic rounded corners */
    --border-radius-lg: 16px;

    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-medium: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;

    /* Header */
    --header-height: 80px;
    --header-bg: rgba(13, 17, 23, 0.8); /* Dark, slightly transparent for glassmorphism */
    --header-blur: 8px;
}

/* GLOBAL STYLES ========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    background-color: var(--color-bg-page);
    color: var(--color-text-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.main-container {
    overflow-x: hidden; /* Prevent horizontal scroll from AOS animations */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-headings);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 2.8rem; margin-bottom: var(--spacing-md); text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
h2 { font-size: 2.2rem; margin-bottom: var(--spacing-md); text-shadow: 1px 1px 2px rgba(0,0,0,0.4); }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: var(--spacing-sm);
    max-width: 75ch; /* Improve readability */
}

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

a:hover, a:focus {
    color: var(--color-text-link-hover);
    text-decoration: underline;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}

.section-padding {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-headings);
    font-weight: 800;
}
.section-intro {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--spacing-lg);
}

.bg-neutral-dark {
    background-color: var(--color-bg-section-dark);
}
.bg-neutral-light {
    background-color: var(--color-bg-neutral-light-section);
}
.bg-neutral-darker {
    background-color: var(--color-bg-page); /* Or a slightly different dark shade if needed */
}


/* BUTTONS ========================================== */
.btn, button, input[type="submit"], input[type="button"] {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 2px solid var(--color-primary);
    padding: var(--spacing-xs) var(--spacing-md); /* 0.75rem 1.5rem */
    font-size: 1rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-medium);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover, button:hover, input[type="submit"]:hover, input[type="button"]:hover,
.btn:focus, button:focus, input[type="submit"]:focus, input[type="button"]:focus {
    background-color: var(--color-primary);
    color: var(--color-text-headings);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.5);
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-headings);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-text-headings);
}

.btn-secondary {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}
.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-bg-page); /* Text color on secondary hover */
}

.btn-sm {
    padding: calc(var(--spacing-xs) * 0.8) calc(var(--spacing-md) * 0.8);
    font-size: 0.9rem;
}


/* HEADER ========================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(var(--header-blur));
    -webkit-backdrop-filter: blur(var(--header-blur));
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-xs) 0;
    transition: background-color var(--transition-medium), box-shadow var(--transition-medium);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo img {
    max-height: calc(var(--header-height) - 30px); /* 50px */
    width: auto;
}

.main-navigation .nav-list {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
}

.main-navigation .nav-link {
    font-family: var(--font-heading);
    color: var(--color-text-light);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.main-navigation .nav-link:hover,
.main-navigation .nav-link:focus,
.main-navigation .nav-link.active {
    color: var(--color-primary);
    text-decoration: none;
    background-color: rgba(var(--color-primary-rgb), 0.1);
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--color-text-headings);
    font-size: 1.8rem;
    cursor: pointer;
}
.menu-toggle .hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text-headings);
    position: relative;
    transition: all var(--transition-medium);
}
.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-text-headings);
    transition: all var(--transition-medium);
}
.menu-toggle .hamburger::before { top: -8px; }
.menu-toggle .hamburger::after { bottom: -8px; }

.menu-toggle.active .hamburger { background-color: transparent; }
.menu-toggle.active .hamburger::before { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active .hamburger::after { transform: translateY(-8px) rotate(-45deg); }


/* HERO SECTION ========================================== */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    color: var(--color-text-headings); /* Ensured by HTML inline style as well */
    padding: var(--spacing-xl) 0;
}

/* Linear gradient overlay is applied via inline style in HTML for dynamic image path */
/* .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7));
    z-index: 1;
} */

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #FFFFFF; /* Explicitly white as per requirement */
    margin-bottom: var(--spacing-sm);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #FFFFFF; /* Explicitly white as per requirement */
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}


/* CARDS (General Styling) ================================= */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center; /* Per STROGO: centers .card-image and .card-content if they are narrower than the card. */
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius-md);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    width: 100%; /* Ensure card takes up space in grid/flex parent */
    border: 1px solid var(--color-border);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 30px rgba(var(--color-primary-rgb), 0.2);
}

.card-image {
    width: 100%; /* Spans full width of .card */
    height: 220px; /* Fixed height for consistency in grids */
    overflow: hidden; /* Essential for object-fit */
}

.card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Key for covering and centering visual content */
    transition: transform var(--transition-slow);
}

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

.card-content {
    width: 100%; /* Spans full width of .card */
    padding: var(--spacing-md);
    text-align: center; /* Per STROGO: centers text and inline-block children */
    flex-grow: 1; /* Allows content to fill available vertical space */
    display: flex;
    flex-direction: column;
    /* justify-content: center;  Vertically centers content if card has a fixed height or content is short */
    align-items: center; /* Horizontally centers block-level children if they are not width:100% */
}
.card-content > *:last-child {
    margin-bottom: 0;
}

.card-title {
    color: var(--color-text-headings);
    margin-bottom: var(--spacing-sm);
}
.card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}
.card .news-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xs);
    display: block;
}

/* "Read More" link style */
.card-content .btn-secondary,
.card-content .btn-sm { /* For blog/news read more */
    margin-top: auto; /* Pushes button to bottom if card-content is flex column */
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.9rem;
}


/* VISION, SUSTAINABILITY, COMMUNITY (Sections with centered image and text) */
.vision-section .column,
.sustainability-section .column,
.community-section .column {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the image and text block */
    text-align: center;
}
.vision-section p,
.sustainability-section p,
.community-section p {
    margin-left: auto;
    margin-right: auto;
}
.bordered-image {
    border-radius: var(--border-radius-md);
    margin: var(--spacing-md) 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    border: 3px solid var(--color-border);
}


/* NEWS SECTION - Carousel */
.content-carousel {
    /* Basic styling - JS library will handle the rest */
    /* Assuming a library like Swiper or similar is used or custom JS */
    display: flex; /* If using custom simple flex-based scroller */
    overflow-x: auto; /* For simple scroller */
    gap: var(--spacing-lg);
    padding-bottom: var(--spacing-sm); /* For scrollbar visibility */
}
.content-carousel .carousel-item {
    min-width: 320px; /* Or percentage based */
    flex-shrink: 0;
}
/* Hide scrollbar for a cleaner look if desired, ensure navigation is provided */
.content-carousel::-webkit-scrollbar { display: none; }
.content-carousel { -ms-overflow-style: none; scrollbar-width: none; }


/* EXTERNAL RESOURCES SECTION */
.resources-list .resource-item.card {
    background-color: var(--color-bg-card); /* Consistent with other cards */
    text-align: left; /* Override default card text-align for resource descriptions */
}
.resources-list .resource-item.card .card-content {
    text-align: left;
    align-items: flex-start;
}
.resources-list .resource-item .resource-title {
    margin-bottom: var(--spacing-xs);
}
.resources-list .resource-item .resource-title a {
    color: var(--color-text-headings);
    font-weight: 700;
}
.resources-list .resource-item .resource-title a:hover {
    color: var(--color-primary);
}
.resources-list .resource-item .resource-description {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}


/* CONTACT FORM ========================================== */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--color-bg-section-dark);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: var(--spacing-sm);
    background-color: var(--color-bg-input);
    border: 1px solid var(--color-border-input);
    border-radius: var(--border-radius-sm);
    color: var(--color-text-light);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form input[type="tel"]::placeholder,
.contact-form textarea::placeholder {
    color: var(--color-text-muted);
    opacity: 0.7;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.3);
}

.contact-form select {
    appearance: none; /* For custom arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23c9d1d9' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--spacing-sm) center;
    background-size: 1em;
    padding-right: calc(var(--spacing-sm) * 2.5); /* Make space for arrow */
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form .form-group.text-center {
    text-align: center;
}
.contact-form button[type="submit"] {
    min-width: 200px;
    padding: var(--spacing-sm) var(--spacing-lg);
}

/* FOOTER ========================================== */
.site-footer {
    background-color: var(--color-bg-page); /* Darkest background */
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-column .footer-heading {
    font-size: 1.3rem;
    color: var(--color-text-headings);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

.footer-links, .footer-social-links {
    list-style: none;
}

.footer-links li, .footer-social-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a, .footer-social-links a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer-links a:hover, .footer-social-links a:hover,
.footer-links a:focus, .footer-social-links a:focus {
    color: var(--color-primary);
    text-decoration: none;
}
.footer-social-links a { /* Style for text-based social links */
    display: inline-block; /* Allows padding and consistent look */
    padding: 3px 0;
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: 0.9rem;
}


/* UTILITY CLASSES ======================================== */
.text-center { text-align: center; }
.img-responsive { max-width: 100%; height: auto; }

/* Simple Columns (used for .is-two-thirds in HTML) */
.columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the column block if it's narrower */
    margin-left: -var(--spacing-sm);
    margin-right: -var(--spacing-sm);
}
.column {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
    flex-basis: 100%; /* Default to full width on small screens */
    max-width: 100%;
}
@media (min-width: 769px) { /* Adjust breakpoint as needed */
    .column.is-two-thirds {
        flex-basis: 66.6666%;
        max-width: 66.6666%;
    }
}


/* RESPONSIVE DESIGN ====================================== */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero-title { font-size: 2.8rem; }
    .hero-subtitle { font-size: 1.2rem; }
}

@media (max-width: 768px) {
    .main-navigation .nav-list {
        display: none; /* Hidden by default */
        flex-direction: column;
        position: absolute;
        top: calc(var(--header-height) + 1px); /* Position below header */
        left: 0;
        width: 100%;
        background-color: var(--color-bg-section-dark); /* Solid background for mobile menu */
        padding: var(--spacing-sm) 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
        border-top: 1px solid var(--color-border);
    }
    .main-navigation .nav-list.active {
        display: flex; /* Show when active */
    }
    .main-navigation .nav-list li {
        width: 100%;
        text-align: center;
    }
    .main-navigation .nav-link {
        display: block;
        padding: var(--spacing-sm);
        width: 100%;
        border-bottom: 1px solid var(--color-border);
    }
    .main-navigation .nav-list li:last-child .nav-link {
        border-bottom: none;
    }
    .menu-toggle {
        display: block; /* Show hamburger on mobile */
    }

    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-column { margin-bottom: var(--spacing-md); }
    .footer-column .footer-heading { margin-bottom: var(--spacing-sm); }
}

@media (max-width: 576px) {
    :root {
        --section-padding-y: var(--spacing-lg);
    }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    .card-grid { grid-template-columns: 1fr; } /* Stack cards */
    .contact-form { padding: var(--spacing-md); }
}


/* SUCCESS PAGE STYLES ================================= */
body.success-page, /* Add this class to body on success.html */
.success-page-container /* Or use a dedicated container */ {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: var(--spacing-md);
}
.success-page-container h1 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}
.success-page-container p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
}


/* PRIVACY & TERMS PAGES ================================= */
body.privacy-page .main-content-area, /* Add class to body or main content wrapper */
body.terms-page .main-content-area {
    padding-top: calc(var(--header-height) + var(--spacing-lg)); /* Header height + extra space */
    padding-bottom: var(--spacing-lg);
}

.legal-page-content { /* A wrapper for the content of these pages */
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-bg-section-dark);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
}
.legal-page-content h1, .legal-page-content h2 {
    margin-top: var(--spacing-md);
}
.legal-page-content h1:first-child, .legal-page-content h2:first-child {
    margin-top: 0;
}
.legal-page-content p, .legal-page-content ul, .legal-page-content ol {
    text-align: left;
    color: var(--color-text-light);
}
.legal-page-content ul, .legal-page-content ol {
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

/* Ensure background images are covered */
[style*="background-image"] {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* AOS Animation Customization (Optional - if needed beyond defaults) */
[data-aos] {
    /* Example: Make fade-up a bit more subtle */
    /* transition-property: transform, opacity; */
}
/* [data-aos="fade-up"] {
    transform: translateY(30px);
}
[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
} */