/* ========================================
   CLIMATOLOGY LAB - MAIN STYLESHEET
   Preserving original design and color scheme
   ======================================== */

/* CSS Variables - Original Color Scheme */
:root {
    --primary-blue: #4A90E2;
    --dark-blue: #1E3A5F;
    --light-blue: #B8D4F1;
    --red: #E74C3C;
    --yellow: #F1C40F;
    --green: #2ECC71;
    --black: #000000;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --gray: #CCCCCC;
    --text-dark: #333333;
    --text-light: #666666;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    background-color: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    flex-shrink: 0;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 100%;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 40px;
}

.nav-menu a {
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-menu a:hover {
    color: var(--primary-blue);
}

.header-logos {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-logos img {
    height: 45px;
    max-width: 100%;
    object-fit: contain;
}

/* Top Banner - "Built on WIX STUDIO" */
.top-banner {
    background-color: var(--white);
    text-align: center;
    padding: 8px;
    font-size: 11px;
    color: var(--text-light);
    border-bottom: 1px solid #f0f0f0;
}

/* Hero Section */
.hero {
    background-color: var(--light-gray);
    padding: 60px 20px;
}

.welcome-text {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-dark);
    font-size: clamp(14px, 2vw, 15px);
    line-height: 1.8;
}

.welcome-text strong {
    font-weight: 600;
}

/* Stats Section */
.stats-section {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 80px;
    padding: 60px 20px;
    margin: 0 auto;
    max-width: 1000px;
}

.stat-item {
    text-align: center;
    flex: 1 1 200px;
    background: white;
    /* ensure stats dont overlap transparently */
    padding: 20px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    /* For mobile stack */
    max-width: 300px;
}

.stat-number {
    font-size: var(--font-size-h1);
    font-weight: 300;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.stat-label {
    display: inline-block;
    padding: 8px 24px;
    border: 2px solid var(--primary-blue);
    border-radius: 25px;
    color: var(--primary-blue);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Notice Board */
.notice-board {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    /* Prevent carousel bleed */
}

.notice-board h2 {
    font-size: var(--font-size-h2);
    font-weight: 300;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.workshops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px;
    /* Safe area for shadows */
}

.workshop-card {
    background-color: var(--white);
    border: 1px solid #e0e0e0;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.workshop-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.workshop-date {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.workshop-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.workshop-title {
    font-size: 13px;
    color: var(--text-dark);
    margin-top: 10px;
    line-height: 1.4;
}

/* Contact Section */
.contact-header {
    background-color: var(--black);
    padding: clamp(40px, 8vw, 80px) 20px;
    text-align: center;
    word-wrap: break-word;
}

.contact-header h1 {
    font-size: var(--font-size-h1);
    font-weight: 300;
    color: var(--white);
    margin-bottom: 5px;
    line-height: 1.2;
}

.contact-header .subtitle {
    font-size: var(--font-size-h1);
    font-weight: 300;
    color: var(--primary-blue);
    line-height: 1.2;
}

/* Footer */
.footer {
    background-color: #0d3b66;
    color: var(--white);
    width: 100%;
}

.footer-main {
    padding: 50px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 60px);
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-heading {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-logos {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logos img {
    height: 70px;
    max-width: 100%;
    object-fit: contain;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.link-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-column a {
    color: var(--white);
    font-size: 13px;
    transition: color 0.3s ease;
    white-space: normal;
    /* allow wrapping on extreme small screens */
}

.link-column a:hover {
    color: #64b5f6;
}

.footer-right {
    padding-left: 10px;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.form-group {
    position: relative;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid #64b5f6;
}

.required {
    color: #ff5252;
}

.submit-btn {
    background-color: #2ecc71;
    color: var(--white);
    border: none;
    padding: 16px 60px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: center;
    width: 100%;
    letter-spacing: 1.5px;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #27AE60;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 204, 113, 0.4);
}

/* Footer Info */
.footer-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.footer-info p {
    margin: 0;
    line-height: 1.6;
}

/* Footer Bottom Bar */
.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

/* Content Sections */
.content-section {
    padding: clamp(40px, 8vw, 80px) 20px;
}

.section-title {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 300;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: var(--font-size-h3);
    font-weight: 300;
    color: var(--light-blue);
    line-height: 1.4;
    margin-bottom: 40px;
}

/* Research Section */
.research-hero {
    padding: clamp(30px, 6vw, 80px) 20px;
    word-wrap: break-word;
}

.research-hero h1 {
    font-size: clamp(30px, 8vw, 64px);
    font-weight: 700;
    color: var(--red);
    margin-bottom: 5px;
    text-transform: uppercase;
    line-height: 1.1;
}

.research-hero h2 {
    font-size: clamp(30px, 8vw, 64px);
    font-weight: 700;
    color: var(--yellow);
    margin-bottom: 5px;
    text-transform: uppercase;
    line-height: 1.1;
}

.research-hero h3 {
    font-size: clamp(30px, 8vw, 64px);
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 30px;
    text-transform: uppercase;
    line-height: 1.1;
}

.research-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(30px, 5vw, 60px);
    align-items: center;
}

.research-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.research-images img {
    border-radius: 8px;
    max-width: 100%;
}

/* Project Cards */
.project-item {
    background-color: var(--light-gray);
    padding: clamp(20px, 4vw, 40px);
    margin-bottom: 40px;
    border-left: 4px solid var(--primary-blue);
}

.project-item h3 {
    font-size: clamp(20px, 4vw, 24px);
    margin-bottom: 15px;
    color: var(--text-dark);
}

.project-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.project-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Responsive Design Overrides via Media Queries */
@media (max-width: 968px) {
    .header-content {
        padding: 0 20px;
    }

    .stats-section {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .footer-right {
        padding-left: 0;
    }

    .research-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 15px;
    }

    .workshops-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }

    .footer-links {
        flex-direction: column;
        gap: 20px;
    }

    .footer-logos {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mt-40 {
    margin-top: 40px;
}

/* Shared Card Hover Effect */
.card-hover-effect {
    transition: all 0.2s ease;
}

.card-hover-effect:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-left-color: #E74C3C !important;
    border-color: #e0e0e0;
}

/* =====================================================
   GLOBAL FIX: Remove excessive min-heights on content 
   sections. The flex layout on body/main handles
   filling the remaining viewport space instead.
   This fixes the white gap on ALL non-home pages.
   ===================================================== */
.projects-grid-section,
.our-people-section,
.filter-section+section {
    min-height: unset !important;
}