/* style.css */

/* ---------------------------------- */
/*      1. CSS Variables & Root       */
/* ---------------------------------- */
:root {
    /* Bright Color Palette */
    --color-primary: #FF6B6B; /* Vibrant Coral */
    --color-secondary: #4ECDC4; /* Fresh Teal */
    --color-accent: #FFE66D; /* Sunny Yellow */
    --color-dark: #222831; /* Dark Charcoal */
    --color-light: #F7F7F7; /* Off-White */
    --color-white: #FFFFFF;
    --color-text-light: #EEEEEE;
    --color-text-dark: #333333;

    /* Fonts */
    --font-header: 'Oswald', sans-serif;
    --font-body: 'Nunito', sans-serif;

    /* Spacing & Sizing */
    --header-height: 80px;
    --border-radius: 8px;
    --card-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    --text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition-fast: all 0.3s ease-in-out;
}

/* ---------------------------------- */
/*      2. Global Styles & Resets     */
/* ---------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-light);
    line-height: 1.7;
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-header);
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; text-shadow: var(--text-shadow); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 1rem;
}

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

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

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

ul {
    list-style: none;
}

/* ---------------------------------- */
/*      3. Utility Classes            */
/* ---------------------------------- */
.section-padding {
    padding: 60px 0;
}

.section-padding-dark {
    padding: 60px 0;
    background-color: var(--color-dark);
    color: var(--color-text-light);
}

.section-padding-dark h2,
.section-padding-dark h3,
.section-padding-dark h4 {
    color: var(--color-white);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.8rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--color-primary);
}

.section-subtitle {
    text-align: center;
    max-width: 800px;
    margin: -30px auto 40px;
    font-size: 1.1rem;
    color: #666;
}

.section-padding-dark .section-subtitle {
    color: var(--color-text-light);
}

/* Animation on scroll helper */
.animate-on-scroll {
    opacity: 1;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ---------------------------------- */
/*      4. Header & Navigation        */
/* ---------------------------------- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition-fast);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-header);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-dark);
    text-decoration: none;
}
.logo:hover {
    color: var(--color-primary);
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-family: var(--font-header);
    font-size: 1rem;
    color: var(--color-text-dark);
    text-transform: uppercase;
    padding: 5px 0;
    position: relative;
    text-decoration: none;
}

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

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

.burger-menu {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-dark);
    margin: 5px 0;
    transition: var(--transition-fast);
}

/* ---------------------------------- */
/*      5. Buttons                    */
/* ---------------------------------- */
.btn, button[type="submit"] {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-fast);
    text-decoration: none;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}


/* ---------------------------------- */
/*      6. Hero Section               */
/* ---------------------------------- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
}

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

.hero-title {
    font-size: 4rem;
    color: var(--color-white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* ---------------------------------- */
/*      7. Services Section           */
/* ---------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    text-align: center; /* Center text */
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 200px; /* Fixed height for image container */
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the container without distortion */
    transition: transform 0.4s ease;
}

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

.card-content {
    padding: 30px;
}

.card-content h3 {
    margin-bottom: 15px;
    color: var(--color-dark);
}

/* ---------------------------------- */
/*      8. Projects Section (Carousel)*/
/* ---------------------------------- */
.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    box-sizing: border-box;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}

.carousel-btn {
    pointer-events: all;
    background: rgba(255, 255, 255, 0.7);
    color: var(--color-dark);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.carousel-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ---------------------------------- */
/*      9. Research Section (Timeline)*/
/* ---------------------------------- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 50px;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--color-secondary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
}
.timeline-item:nth-child(even) {
    left: 50%;
}
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--color-white);
    border: 4px solid var(--color-secondary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even)::after {
    left: -10px;
}
.timeline-content {
    padding: 20px 30px;
    background-color: var(--color-white);
    position: relative;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}
.timeline-content h4 {
    color: var(--color-primary);
}

.progress-indicators {
    max-width: 800px;
    margin: 0 auto;
}
.progress-item {
    margin-bottom: 20px;
}
.progress-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.progress-bar {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
}
.progress {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 5px 10px;
    text-align: right;
    border-radius: 20px;
}

/* ---------------------------------- */
/*      10. News Section              */
/* ---------------------------------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.news-date {
    display: block;
    font-size: 0.9rem;
    color: var(--color-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}
.news-grid .card {
    text-align: left;
    align-items: stretch;
}

/* ---------------------------------- */
/*      11. Resources Section         */
/* ---------------------------------- */
.resources-list .resource-item {
    background: var(--color-white);
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid var(--color-primary);
    box-shadow: var(--card-shadow);
    transition: var(--transition-fast);
}
.resources-list .resource-item:hover {
    transform: translateX(10px);
}
.resources-list h4 a {
    text-decoration: none;
    color: var(--color-dark);
}
.resources-list h4 a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}


/* ---------------------------------- */
/*      12. Contact Section           */
/* ---------------------------------- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}
.contact-info ul { margin-top: 20px; }
.contact-info li { margin-bottom: 10px; }
.form-group {
    position: relative;
    margin-bottom: 30px;
}
.contact-form-wrapper input,
.contact-form-wrapper textarea {
    width: 100%;
    padding: 15px 0;
    font-family: var(--font-body);
    font-size: 1rem;
    border: none;
    background: transparent;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--color-white);
    outline: none;
    transition: border-color 0.3s;
}
.contact-form-wrapper textarea {
    resize: vertical;
}
.contact-form-wrapper label {
    position: absolute;
    top: 15px;
    left: 0;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
    pointer-events: none;
}
.contact-form-wrapper input:focus,
.contact-form-wrapper textarea:focus {
    border-bottom-color: var(--color-primary);
}
.contact-form-wrapper input:focus + label,
.contact-form-wrapper textarea:focus + label,
.contact-form-wrapper input:not(:placeholder-shown) + label,
.contact-form-wrapper textarea:not(:placeholder-shown) + label {
    top: -10px;
    font-size: 0.8rem;
    color: var(--color-primary);
}
.contact-form-wrapper button {
    width: 100%;
}

/* ---------------------------------- */
/*      13. Footer Section            */
/* ---------------------------------- */
.main-footer {
    background-color: var(--color-dark);
    color: var(--color-text-light);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}
.footer-col h4 {
    color: var(--color-white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--color-primary);
}
.footer-col ul li {
    margin-bottom: 10px;
}
.footer-col a {
    color: var(--color-text-light);
    text-decoration: none;
}
.footer-col a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---------------------------------- */
/*   14. Special Pages (Success, etc) */
/* ---------------------------------- */
.success-page,
.static-page {
    display: flex;
    flex-direction: column;
    padding-top: var(--header-height);
}

.success-page .content,
.static-page .content {
    flex-grow: 1;
}

.success-page .container {
    min-height: calc(100vh - var(--header-height) - 100px); /* 100px is footer rough height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.static-page .container {
    padding-top: 50px;
    padding-bottom: 50px;
}

/* ---------------------------------- */
/*      15. Media Queries             */
/* ---------------------------------- */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-item::after {
        left: 21px;
    }
}

@media (max-width: 768px) {
    h1, .hero-title { font-size: 2.5rem; }
    h2, .section-title { font-size: 2rem; }

    .main-nav ul {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--color-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
    }
    .main-nav ul.active {
        display: flex;
        transform: translateX(0);
    }
    .burger-menu {
        display: block;
        z-index: 1001;
    }
    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-section {
        background-attachment: scroll; /* Disable parallax on mobile for performance */
    }
}