:root {
    --dark-blue: #003d5b;
    --chuv-green: #006144;
    --chuv-purple: #4f349d;
    --chuv-purple-light: #7b68b8;
    --bubble-bg: #fef3cb;
    --white: #FFFFFF;
    --heading-font: 'Poppins', 'Inter', sans-serif;
}

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

body {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f5f7fa;
    min-height: 100vh;
}

/* Header */
header {
    background: #ffffff;
    color: #2c3e50;
    padding: 1rem 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 3000;
    border-bottom: 3px solid var(--chuv-purple);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.logo-with-icon {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.zest-logo-header {
    height: 90px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

.header-contact a {
    color: var(--chuv-purple);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.header-contact a:hover {
    opacity: 0.7;
}

@media (max-width: 767px) {
    header {
        padding: 0.8rem 1rem;
    }
    
    .zest-logo-header {
        height: 75px;
    }
    
    .header-contact {
        display: none;
    }
    
    .header-content {
        justify-content: center;
    }
}

/* Navigation Menu - Boxy Style like CHUV */
.main-nav {
    background: var(--chuv-purple);
    border-bottom: 3px solid var(--chuv-purple-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 88px;
    z-index: 2000;
    transition: all 0.3s ease;
    overflow: visible;
}

/* When scrolled, nav collapses to thin bar */
.main-nav.collapsed {
    border-bottom-width: 0;
}

.main-nav.collapsed .nav-container {
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* On hover, expand the nav fully */
.main-nav.collapsed:hover,
.main-nav.collapsed:hover .nav-container {
    opacity: 1;
    height: auto;
    overflow: visible;
}

@media (max-width: 768px) {
    .main-nav {
        top: 70px;
        position: relative;
    }
    
    .main-nav.collapsed {
        border-bottom-width: 3px;
    }
    
    .main-nav.collapsed .nav-container {
        opacity: 1;
        height: auto;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    gap: 0;
    transition: all 0.3s ease;
}

/* Main navigation links */
.nav-container > a,
.nav-container > .nav-item-with-dropdown > a {
    color: #ffffff;
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    background-color: var(--chuv-purple);
    border-right: 1px solid rgba(255,255,255,0.2);
    transition: background-color 0.3s ease;
    position: relative;
    white-space: nowrap;
    display: block;
}

.nav-container > a:hover,
.nav-container > .nav-item-with-dropdown > a:hover,
.nav-container > .nav-item-with-dropdown:hover > a {
    background-color: rgba(255,255,255,0.1);
}

.nav-container > a.active,
.nav-container > .nav-item-with-dropdown > a.active {
    background-color: var(--chuv-purple-light);
    font-weight: 600;
}

.nav-container > a.active::after,
.nav-container > .nav-item-with-dropdown > a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #FFD700;
}

/* Dropdown container */
.nav-item-with-dropdown {
    position: relative;
}

.nav-item-with-dropdown:hover .nav-dropdown {
    display: block;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    border-radius: 0;
    overflow: visible;
    z-index: 3000;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown a {
    display: block;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    background: #ffffff;
    border-right: none;
}

.nav-dropdown a:last-child {
    border-bottom: none;
}

.nav-dropdown a:hover {
    background: var(--chuv-purple);
    color: #ffffff;
    padding-left: 2rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--chuv-purple);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 52, 157, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--chuv-purple-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(79, 52, 157, 0.5);
}

.back-to-top:active {
    transform: translateY(-1px);
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
}

/* Floating scroll button - appears when scrolling on mobile only */
.floating-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .floating-menu-btn {
        position: fixed;
        top: 1rem;
        right: 1rem;
        width: 55px;
        height: 55px;
        border-radius: 50%;
        background: var(--chuv-purple);
        color: #ffffff;
        border: none;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(79, 52, 157, 0.5);
        z-index: 3001;
        transition: all 0.3s ease;
        opacity: 0;
        transform: scale(0.8);
    }

    .floating-menu-btn.visible {
        display: flex;
        opacity: 1;
        transform: scale(1);
    }

    .floating-menu-btn:active {
        transform: scale(0.9);
    }

    .mobile-nav-toggle {
        display: block;
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        margin: 0 auto;
    }
    
    .main-nav {
        position: relative;
    }

    .nav-container {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--chuv-purple);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        z-index: 2999;
    }
    
    /* When opened from floating button, position from top */
    .nav-container.active.from-floating {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 3000;
        padding-top: 80px;
    }

    .nav-container.active {
        display: flex;
    }

    .nav-container a {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        white-space: normal;
        padding: 1.2rem 1.5rem;
        text-align: center;
    }
    
    .nav-container a:last-child {
        border-bottom: none;
    }
}

/* Desktop - hide mobile elements */
@media (min-width: 769px) {
    .mobile-nav-toggle {
        display: none !important;
    }
    
    .floating-menu-btn {
        display: none !important;
    }
    
    .nav-container {
        display: flex !important;
        position: relative;
    }
    
    /* Dropdown menu styling */
    .nav-item-with-dropdown {
        position: relative;
    }
    
    .nav-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 280px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
        border-radius: 0;
        overflow: hidden;
        z-index: 2000;
        margin-top: 0;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-item-with-dropdown:hover .nav-dropdown {
        display: block;
    }
    
    .nav-dropdown a {
        display: block;
        padding: 1rem 1.5rem;
        color: #333;
        text-decoration: none;
        font-size: 0.95rem;
        border-bottom: 1px solid #f0f0f0;
        border-right: none;
        transition: all 0.2s ease;
        text-align: left;
        font-weight: 400;
    }
    
    .nav-dropdown a:last-child {
        border-bottom: none;
    }
    
    .nav-dropdown a:hover {
        background: var(--chuv-purple);
        color: #ffffff;
        padding-left: 2rem;
        transform: translateX(5px);
    }
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem 1.5rem;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--chuv-purple-light), var(--chuv-purple));
    color: #ffffff;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--heading-font);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

@media (max-width: 768px) {
    .main-nav {
        top: 0;
        margin: 0;
    }
    
    .container {
        padding: 1rem 1.5rem;
    }
    
    .hero {
        border-radius: 0;
        margin-bottom: 2rem;
        padding: 3rem 1.5rem;
        min-height: 250px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
}

/* Speech Bubble Sections */
section:not(.hero) {
    margin-bottom: 2.5rem;
    padding: 3rem 2.5rem;
    background-color: var(--bubble-bg);
    border-radius: 60px 60px 60px 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    position: relative;
}

section h2 {
    color: var(--chuv-purple);
    font-size: 1.7rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-family: var(--heading-font);
}

section h3 {
    color: var(--chuv-purple);
    font-size: 1.2rem;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-family: var(--heading-font);
}

section h3:first-child {
    margin-top: 0;
}

section p {
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1.2rem;
}

section ul, section ol {
    margin-left: 1.5rem;
    margin-top: 0.8rem;
    margin-bottom: 1.2rem;
}

section li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

section strong {
    font-weight: 600;
    color: #1a202c;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .two-column {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

/* Content with Image Side by Side */
.content-with-image {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 992px) {
    .content-with-image {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 3rem;
    }
    
    .content-with-image.reverse {
        grid-template-columns: 0.8fr 1.2fr;
    }
    
    .content-with-image .image-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* Contact Info Box */
.contact-box {
    background: #ffffff;
    border: 2px solid var(--chuv-purple);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.contact-box h3 {
    margin-top: 0;
}

.contact-box p {
    margin-bottom: 0.5rem;
}

/* Info Box (light blue) */
.info-box {
    background-color: #e8f4f8;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.info-box p {
    color: #2c3e50;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.info-box strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Contact Boxes */
.contact-box {
    background: #ffffff;
    border: 2px solid var(--chuv-purple);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.contact-box h3 {
    color: var(--chuv-purple);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-box p {
    margin: 0.5rem 0;
    line-height: 1.8;
}

.contact-box strong {
    color: var(--chuv-purple);
    display: block;
    margin-top: 0.8rem;
}

@media (max-width: 768px) {
    .contact-box p {
        line-height: 2;
    }
}

/* Images */
img.illustration {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 0 1.5rem 0;
}

.footer-sources {
    background: var(--chuv-green);
    color: #ffffff;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 100, 68, 0.15);
}

.footer-sources-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .footer-sources-content {
        grid-template-columns: 1fr auto;
        gap: 3rem;
    }
}

.footer-sources h2 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    font-family: var(--heading-font);
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.footer-sources p {
    color: #ffffff;
    opacity: 0.95;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.footer-sources-btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border: 2px solid #ffffff;
    border-radius: 50px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.footer-sources-btn:hover {
    background: #ffffff;
    color: var(--chuv-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

.footer-main {
    background: var(--chuv-purple);
    color: #ffffff;
    padding: 2.5rem 1.5rem 1.5rem;
    margin: 0 -1.5rem;
}

.footer-main-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.footer-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    color: #ffffff;
    font-weight: 600;
}

.footer-info p {
    margin: 0.2rem 0;
    opacity: 0.95;
    font-size: 0.9rem;
}

.footer-map {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
    border: 3px solid rgba(255,255,255,0.2);
}

.footer-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 1rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.9;
}

.footer-bottom p {
    margin: 0.2rem 0;
}

/* Floating Background Elements */
.floater {
    position: fixed;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

.floater.depth-1 {
    opacity: 0.04;
}

.floater.depth-2 {
    opacity: 0.03;
}

.floater.depth-3 {
    opacity: 0.02;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(5deg);
    }
    50% {
        transform: translateY(-40px) translateX(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-20px) translateX(10px) rotate(3deg);
    }
}

/* Hide floaters on mobile */
@media (max-width: 768px) {
    .floater {
        display: none;
    }
}

/* Hide floaters when near footer */
@media (min-width: 769px) {
    footer ~ .floater,
    body > .floater:last-of-type {
        bottom: auto !important;
        top: 20% !important;
    }
}

/* Container positioning context */
.container {
    position: relative;
    z-index: 1;
}

/* Ensure sections are above floaters */
section {
    position: relative;
    z-index: 2;
}

/* Ensure footer is above floaters */
footer {
    position: relative;
    z-index: 10;
}
