/* ============================================================
   CENTRO EDUCATIVO PIAGET — INSTITUTIONAL PORTAL v4.0
   Modern, High-End Educational Platform
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600;1,700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ── DESIGN TOKENS ── */
:root {
    /* Prestigious Piaget Royal Blue & Crimson Red Palette */
    --primary: #0D47A1;
    --primary-light: #1565C0;
    --primary-dark: #0A1929;
    --primary-glow: rgba(21, 101, 192, 0.12);

    --secondary: #D32F2F;
    --secondary-light: #EF5350;
    --secondary-accent: #FF8A80;
    --secondary-glow: rgba(211, 47, 47, 0.18);

    /* Backgrounds & Textures */
    --bg: #FFFFFF;
    --bg-alt: #F8FAFC;
    --bg-dark: #0A1929;
    --text: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --border: #E2E8F0;

    /* Accents */
    --success: #10B981;
    --error: #EF4444;
    --purple: #8B5CF6;
    --teal: #0D9488;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', sans-serif;

    /* Geometry & Shadow */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 24px 60px rgba(9, 25, 44, 0.18);

    --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--bg);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: all var(--transition); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── HEADER & NAVIGATION ── */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all var(--transition);
}

header.scrolled {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.98);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img { height: 52px; width: 52px; object-fit: contain; border-radius: 50%; background: #fff; padding: 3px; box-shadow: 0 2px 10px rgba(0,0,0,0.12); }

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.18rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

header nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

header nav > a,
header nav > .dropdown > a {
    padding: 9px 18px;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

header nav > a:hover,
header nav > .dropdown:hover > a,
header nav > a.active {
    color: var(--primary-light);
    background: var(--primary-glow);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.dropdown-menu a:hover {
    background: var(--primary-glow);
    color: var(--primary-light);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    border: none;
    background: none;
    font-size: 1.8rem;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

/* ── HERO SECTION ── */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 30%, #1565C0 0%, #0D47A1 60%, #0A1929 100%);
    color: white;
    padding-top: 76px;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 40%, rgba(21, 101, 192, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 20%, rgba(211, 47, 47, 0.22) 0%, transparent 55%);
    z-index: 1;
}

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

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 22px;
    color: #FFFFFF;
    letter-spacing: -0.5px;
}

.hero-content h1 span {
    background: linear-gradient(135deg, #FF8A80 0%, #EF5350 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 36px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── BUTTONS (PUBLIC) ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 30px;
    font-family: var(--font-heading);
    font-size: 0.94rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn i { font-size: 1.2rem; }

.btn-primary {
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(21, 101, 192, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #EF5350 0%, #D32F2F 100%);
    color: #FFFFFF;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(211, 47, 47, 0.35);
}

.btn-secondary:hover {
    box-shadow: 0 8px 24px rgba(211, 47, 47, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #FFFFFF;
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #FFFFFF;
    transform: translateY(-2px);
}

.btn-sm { padding: 8px 20px; font-size: 0.82rem; }
.btn-block { width: 100%; }

/* ── SECTIONS ── */
section {
    padding: 85px 0;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 55px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.2;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.8;
}

.section-header .subtitle-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #1565C0, #D32F2F);
    border-radius: 2px;
    margin: 18px auto 0;
}

/* ── CARDS & FEATURE GRIDS ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 34px 30px;
    transition: all var(--transition);
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
    border-color: #CBD5E1;
}

.card .icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 20px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563EB;
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.22rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.7;
}

.section-alt {
    background-color: var(--bg-alt);
}

/* ── PAGE BANNER ── */
.page-banner {
    padding: 140px 0 65px;
    background: radial-gradient(circle at 50% 30%, #1565C0 0%, #0D47A1 60%, #0A1929 100%);
    color: white;
    text-align: center;
}

.page-banner h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.page-banner p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ── NEWS CARDS ── */
.news-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.news-body {
    padding: 24px;
}

.news-body h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.news-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

/* ── EVENT CARDS ── */
.event-card {
    display: flex;
    gap: 24px;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition);
}

.event-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: #93C5FD;
    transform: translateY(-2px);
}

.event-date-box {
    min-width: 75px;
    text-align: center;
    padding: 14px;
    background: rgba(21, 101, 192, 0.08);
    border-radius: var(--radius-md);
}

.event-date-box .day {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-light);
    line-height: 1;
}

.event-date-box .month {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    margin-top: 4px;
}

/* ── CTA SECTION ── */
.cta-section {
    background: radial-gradient(circle at 50% 30%, #1565C0 0%, #0D47A1 60%, #0A1929 100%);
    color: white;
    text-align: center;
    padding: 85px 24px;
}

.cta-section h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.7rem);
    margin-bottom: 16px;
}

.cta-section p {
    opacity: 0.88;
    max-width: 550px;
    margin: 0 auto 34px;
    font-size: 1.05rem;
}

/* ── CONTACT CARDS ── */
.contact-info-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 22px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.contact-info-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #93C5FD;
}

.contact-info-card .icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* ── FORMS (PUBLIC) ── */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    transition: all var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ── FOOTER ── */
footer {
    background: var(--bg-dark);
    color: #94A3B8;
    padding: 70px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 45px;
}

.footer-widget h3 {
    font-family: var(--font-heading);
    color: #FFFFFF;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 3px;
    background: var(--secondary-light);
    border-radius: 2px;
}

.footer-widget p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #94A3B8;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 0.9rem;
    color: #94A3B8;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-accent);
    transform: translateX(5px);
}

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #CBD5E1;
    transition: all var(--transition);
}

.footer-socials a:hover {
    background: var(--primary-light);
    color: #FFFFFF;
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 24px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.86rem;
    color: #94A3B8;
}

.footer-bottom .dev-badge {
    background: rgba(255, 255, 255, 0.07);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #E2E8F0;
    font-size: 0.84rem;
}

.footer-bottom .dev-badge strong {
    color: #38BDF8;
    font-weight: 800;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* ── WHATSAPP BUTTON ── */
.whatsapp-chat-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 900;
}

.whatsapp-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    font-size: 1.85rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
    transition: all var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.55);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .header-container { height: 65px; }
    .logo-img { height: 42px; width: 42px; }
    .logo-text { font-size: 1.05rem; }

    header nav { display: none; }
    .mobile-menu-btn { display: flex; }

    header nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #FFFFFF;
        padding: 24px;
        gap: 6px;
        overflow-y: auto;
        z-index: 999;
    }

    header nav.open > a,
    header nav.open > .dropdown > a {
        padding: 14px 18px;
        font-size: 1rem;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }

    header nav.open .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        padding: 0 0 0 20px;
    }

    section { padding: 60px 0; }
    .hero-section { min-height: 82vh; }
    .hero-content h1 { font-size: 2.2rem; }
    .cards-grid { grid-template-columns: 1fr; }
    .event-card { flex-direction: column; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 35px; }
}
