@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --color-blue: #3498db;
    --color-yellow: #f1c40f;
    --color-green: #2ecc71;
    --color-purple: #9b59b6;
    --color-text: #2c3e50;
    --color-bg: #f9f9f9;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --lego-radius: 20px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-weight: 700;
}

/* Lego-style modular block system */
.lego-block {
    padding: 100px 5%;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.lego-block::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 10%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    z-index: 0;
}

.lego-block::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: 10%;
    width: 150px;
    height: 150px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    z-index: 0;
}

/* About Section Refactor */
.about-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    gap: 50px;
}

.about-text {
    flex: 1;
    text-align: left;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--color-text);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.polaroid-gallery {
    flex: 1;
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.polaroid-frame {
    position: absolute;
    background: var(--white);
    padding: 12px 12px 35px 12px;
    border-radius: 5px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    width: 200px;
    transition: var(--transition);
    transform: translateY(-100vh) rotate(var(--rotation));
    /* Start dynamic */
    opacity: 0;
    pointer-events: none;
}

.polaroid-frame img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 2px;
}

/* Falling Animation Triggered by JS */
.polaroid-gallery.visible .polaroid-frame {
    transform: translateY(0) rotate(var(--rotation));
    opacity: 1;
    pointer-events: auto;
    transition-delay: var(--delay);
}

.polaroid-frame:hover {
    transform: scale(1.1) rotate(0deg) !important;
    z-index: 100 !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Stacking / Offsetting */
.polaroid-frame:nth-child(1) {
    top: 10%;
    left: 10%;
}

.polaroid-frame:nth-child(2) {
    top: 20%;
    left: 30%;
    z-index: 2;
}

.polaroid-frame:nth-child(3) {
    top: 15%;
    left: 50%;
    z-index: 3;
}

.polaroid-frame:nth-child(4) {
    top: 40%;
    left: 20%;
    z-index: 4;
}

.polaroid-frame:nth-child(5) {
    top: 45%;
    left: 45%;
    z-index: 5;
}

/* Section Colors */
.bg-blue {
    background-color: var(--color-blue);
    color: var(--white);
}

.bg-yellow {
    background-color: var(--color-yellow);
    color: var(--color-text);
}

.bg-green {
    background-color: var(--color-green);
    color: var(--white);
}

.bg-purple {
    background-color: var(--color-purple);
    color: var(--white);
}

.bg-orange {
    background-color: #ff7e5f;
    color: var(--white);
}

/* LEGO Connection points (aesthetic) */
.lego-connector {
    position: absolute;
    width: 100%;
    height: 40px;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.1) 10px, transparent 11px);
    background-size: 80px 40px;
    z-index: 2;
}

.lego-connector.top {
    top: 0;
}

.lego-connector.bottom {
    bottom: 0;
}

/* Animation Classes */
.fade-in,
.fade-in-left {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.fade-in-left {
    transform: translateX(-50px) translateY(0);
}

.fade-in.visible,
.fade-in-left.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.mobile-menu-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--color-blue);
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle svg {
    width: 32px;
    height: 32px;
}

.logo img {
    height: 60px;
    transition: var(--transition);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-blue);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--color-blue);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(52, 152, 219, 0.4);
}

.btn-whatsapp {
    background: #25d366;
    color: var(--white);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(37, 211, 102, 0.4);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--color-blue);
    transform: translateY(-5px);
}

.full-width {
    width: 100%;
}

/* Form Styles */
.contact-container {
    background: var(--white);
    padding: 50px;
    border-radius: var(--lego-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 600px;
    color: var(--color-text);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    transition: var(--transition);
}

/* Statistics Strip */
.stats-strip {
    padding: 60px 5%;
    background: var(--white);
    position: relative;
    z-index: 5;
}

.stats-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
    text-align: center;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-blue);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 0.95rem;
    color: var(--color-text);
    max-width: 250px;
    line-height: 1.5;
}

/* Pedagogy Compact Styles */
.pedagogy-compact {
    min-height: 60vh !important;
    padding: 60px 5% !important;
}

.pedagogy-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1100px;
    gap: 40px;
}

.pedagogy-text {
    flex: 1.2;
    text-align: left;
}

.pedagogy-text h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

.feature-list svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.pedagogy-image {
    flex: 0.8;
}

.pedagogy-image img {
    width: 100%;
    max-width: 400px;
    border-radius: var(--lego-radius);
    box-shadow: var(--shadow);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-blue);
}

.form-row {
    display: flex;
    gap: 15px;
}

/* Hero Split Layout */
#inicio.hero-split {
    min-height: 100vh;
    padding-top: 120px;
    background-color: var(--color-blue);
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.1) 2px, transparent 2px),
        /* Dots decoration */
        linear-gradient(to right, rgba(52, 152, 219, 0.7), rgba(52, 152, 219, 0.9)),
        /* Fade overlay */
        url('../assets/hero-bg.png');
    /* Base image */
    background-size: 40px 40px, cover, cover;
    background-position: center, center, center;
    background-attachment: fixed;
    color: var(--white);
}

.hero-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    gap: 50px;
    z-index: 10;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* Glassmorphism Form */
.glass-morphism {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
    border-radius: var(--lego-radius);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    color: var(--white);
}

.glass-morphism h3 {
    margin-bottom: 25px;
    text-align: center;
}

.glass-morphism label {
    color: var(--white);
    font-size: 0.9rem;
    opacity: 0.9;
}

.glass-morphism input,
.glass-morphism textarea {
    background: var(--white);
    /* Solid field as requested */
    color: var(--color-text);
    border: none;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Grid for Activities */
.activities-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1400px;
    margin: 50px auto 0 auto;
}

.activity-card {
    background: var(--white);
    border-radius: var(--lego-radius);
    padding: 30px;
    color: var(--color-text);
    text-align: center;
    transition: var(--transition);
    border-bottom: 8px solid transparent;
    flex: 1 1 280px;
    max-width: 320px;
}

.activity-card:nth-child(1) {
    border-color: var(--color-blue);
}

.activity-card:nth-child(2) {
    border-color: var(--color-yellow);
}

.activity-card:nth-child(3) {
    border-color: var(--color-green);
}

.activity-card:nth-child(4) {
    border-color: var(--color-purple);
}

.activity-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.activity-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Contact Info Section */
.contact-info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    gap: 60px;
}

.info-content {
    flex: 1;
    text-align: left;
}

.info-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.info-content .address {
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

.info-content .address svg {
    margin-right: 10px;
    vertical-align: middle;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-link-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--white);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
}

.contact-link-item:hover {
    transform: translateX(10px);
}

.social-icons-box {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.social-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

.social-icon:hover {
    background: var(--white);
    color: #ff7e5f;
    transform: scale(1.1);
}

.map-box {
    flex: 1.2;
    box-shadow: var(--shadow);
    border-radius: var(--lego-radius);
    overflow: hidden;
}

/* Footer Refactor - Premium Style */
.main-footer {
    background: #0f172a;
    /* Deeper professional navy */
    color: #e2e8f0;
    padding: 100px 5% 40px;
    position: relative;
    z-index: 10;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1.2fr;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--color-yellow);
    border-radius: 2px;
}

.footer-logo img {
    height: 70px;
    margin-bottom: 25px;
    /* Removed filter to keep original logo colors, assuming it looks good on dark navy */
    /* If user specifically wants white logo, we can add it back */
    transition: var(--transition);
}

.footer-logo img:hover {
    transform: scale(1.05);
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #94a3b8;
    margin-bottom: 30px;
    max-width: 400px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    color: var(--white);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
    background: var(--color-yellow);
    color: #0f172a;
    transform: translateY(-5px);
    border-color: var(--color-yellow);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.footer-col ul {
    list-style: none;
}

.footer-col.links li {
    margin-bottom: 15px;
}

.footer-col.links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.footer-col.links a::before {
    content: '→';
    margin-right: 10px;
    opacity: 0;
    transition: var(--transition);
    color: var(--color-yellow);
}

.footer-col.links a:hover {
    color: var(--white);
    transform: translateX(5px);
}

.footer-col.links a:hover::before {
    opacity: 1;
}

.footer-col.contact li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
    color: #94a3b8;
    font-size: 1rem;
}

.footer-col.contact svg {
    width: 20px;
    height: 20px;
    color: var(--color-yellow);
    flex-shrink: 0;
}

.footer-bottom {
    margin-top: 80px;
    padding-top: 35px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: #64748b;
}

/* Responsive */
/* Responsive Refinements */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 60px;
        padding-top: 40px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-btns {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 5%;
    }

    .mobile-menu-toggle {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--white);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1000;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    nav a {
        font-size: 1.5rem;
        color: var(--color-text);
    }

    .lego-block {
        padding: 60px 5%;
    }

    .hero-split {
        padding-top: 100px !important;
        min-height: auto !important;
        padding-bottom: 60px !important;
    }

    .contact-container {
        padding: 25px;
        max-width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .btn {
        width: 100%;
        padding: 15px 20px;
    }

    .about-container {
        flex-direction: column;
        gap: 40px;
    }

    .about-text {
        text-align: center;
    }

    .polaroid-gallery {
        height: 480px;
        /* Increased to avoid overlap with bottom section */
        width: 100%;
        margin-top: 30px;
    }

    .stats-container {
        flex-direction: column;
        align-items: center;
        gap: 50px;
        text-align: center;
    }

    .stat-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .pedagogy-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .pedagogy-text {
        text-align: center;
    }

    .feature-list {
        grid-template-columns: 1fr;
        justify-items: center;
        display: inline-grid;
        width: 100%;
    }

    .feature-list li {
        width: fit-content;
        text-align: left;
    }

    .pedagogy-image {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    /* Contact Info Stacking */
    .contact-info-container {
        flex-direction: column;
        text-align: center;
        gap: 50px;
    }

    .info-content {
        order: 1;
        /* Text first */
    }

    .map-box {
        order: 2;
        /* Map second */
        width: 100%;
        height: 350px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-desc {
        margin: 0 auto 30px;
    }

    .footer-social,
    .footer-col.links a,
    .footer-col.contact li {
        justify-content: center;
    }

    .footer-col.contact li {
        text-align: center;
        flex-direction: column;
        align-items: center;
    }
}