/* --- Variables --- */
:root {
    --bg-color: #fcfbf7;
    --text-color: #2c2420;
    --primary: #e07a5f;
    --secondary: #81b29a;
    --accent: #f2cc8f;
    --dark: #3d405b;
    --light-glass: rgba(255, 255, 255, 0.7);
    --border-radius: 24px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- Reset & Base --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Typography --- */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.1;
}

h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    margin-bottom: 0.5em;
    color: var(--text-color);
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Loader --- */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader-content {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
}

.loader-content span {
    color: var(--primary);
}

body:not(.is-loading) .loader {
    opacity: 0;
    visibility: hidden;
}

/* --- Blobs (Background) --- */
.blobs-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--secondary);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--primary);
    opacity: 0.4;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 30vw;
    height: 30vw;
    background: var(--accent);
    opacity: 0.5;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

/* --- Nav --- */
.floating-nav {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: top 0.3s;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* --- Hero --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-top: 6rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    width: 100%;
    align-items: center;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 2rem;
    font-weight: 300;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(224, 122, 95, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 2px solid #eee;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.hero-image-mask {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: morph 8s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes morph {

    0%,
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
}

.hero-visual {
    position: relative;
}

.floating-badge {
    position: absolute;
    top: 10%;
    right: 0;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    font-weight: 700;
    transform: rotate(10deg);
    z-index: 2;
    animation: float 6s infinite ease-in-out;
}

/* --- Marquee --- */
.marquee-strip {
    background: var(--dark);
    color: white;
    padding: 1rem 0;
    overflow: hidden;
    transform: rotate(-2deg) scale(1.05);
    margin: 2rem 0 4rem 0;
}

.marquee-content {
    display: flex;
    gap: 4rem;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* --- Section Utils --- */
.section {
    padding: 6rem 2rem;
    position: relative;
}

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

.container-narrow {
    max-width: 800px;
}

.text-center {
    text-align: center;
}

.mb-large {
    margin-bottom: 4rem;
}

.mt-medium {
    margin-top: 3rem;
}

/* --- Cards (Flip) --- */
/* --- Program Filters --- */
.section-header {
    margin-bottom: 2rem;
}

.pill-filters {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.pill {
    background: transparent;
    border: 1px solid #ddd;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

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

.program-section {
    overflow: visible;
}

.cards-scroller {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 1rem;
    scrollbar-width: none;
    scroll-behavior: smooth;
    justify-content: center;
    flex-wrap: wrap;
}

.program-card {
    background-color: transparent;
    width: 300px;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
}

.program-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.card-back {
    background-color: var(--primary);
    color: white;
    transform: rotateY(180deg);
}

.icon-circle {
    font-size: 4rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.5);
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

/* --- Contact Form --- */
.contact-section {
    padding-bottom: 0;
}

.contact-wrapper {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.1);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* --- Masonry --- */
.masonry-grid {
    column-count: 1;
    column-gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.masonry-item img {
    width: 100%;
    height: auto;
    transition: transform 0.5s;
    display: block;
}

.masonry-item:hover img {
    transform: scale(1.05);
}

/* --- Footer --- */
.playful-footer {
    color: #fff;
    position: relative;
    margin-top: 6rem;
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: auto;
}

.footer-content {
    padding: 4rem 2rem;
    background: #333;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 0;
}

.footer-nav a {
    color: #ccc;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--primary);
}

.contact-links {
    margin: 2rem 0;
    font-size: 1.2rem;
}

.contact-links a:hover {
    text-decoration: underline;
    color: var(--accent);
}

/* --- Responsive --- */
@media (min-width: 600px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 900px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-group {
        justify-content: center;
    }

    h1 {
        font-size: 3.5rem;
    }

    .floating-nav {
        top: 1rem;
        width: 90%;
        padding: 0.8rem 1rem;
    }

    .nav-content {
        justify-content: space-between;
        gap: 0;
        width: 100%;
    }

    .nav-links {
        display: none;
    }

    /* Simplified mobile handling */
    .menu-toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--text-color);
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 2rem;
        gap: 1.5rem;
        text-align: center;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
    }
}

/* Desktop hide toggle */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}

/* --- Info Page Specifics --- */
.page-header {
    padding-top: 10rem;
    padding-bottom: 4rem;
    text-align: center;
    background: radial-gradient(circle at 50% 50%, rgba(214, 100, 72, 0.05) 0%, transparent 60%);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 3rem;
}

.info-table th,
.info-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.info-table th {
    width: 35%;
    background: rgba(107, 144, 128, 0.05);
    font-weight: 600;
    color: #333;
}

.info-table tr:last-child td,
.info-table tr:last-child th {
    border-bottom: none;
}

.document-list {
    margin-top: 1rem;
}

.document-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    gap: 1rem;
    transition: all 0.3s;
}

.document-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.doc-icon {
    color: var(--primary);
    font-size: 1.4rem;
    width: 2rem;
    text-align: center;
}