@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Outfit:wght@400;600;700&display=swap');

:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --primary-color: #0056b3;
    --primary-gradient: linear-gradient(135deg, #0056b3 0%, #007bff 100%);
    --accent-color: #f8f9fa;
    --border-color: #e0e0e0;
    --card-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.9);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --fixed-light: #f8fafc;

    /* Araña Config */
    --spider-color: #000000;
    --spider-mask-dir: to left;
}

.logo-right {
    border-radius: 8px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}

/* Imágenes responsivas globales */
img {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
h4,
.font-alt {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-color);
}

.item-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    color: var(--text-color);
}

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

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-right {
    order: 2;
    display: flex;
    align-items: center;
}

.logo-right img {
    height: 45px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.course-title {
    order: 1;
    font-size: 1.25rem;
    color: var(--primary-color);
}

/* Banner Hero */
.hero {
    padding-top: 120px;
    padding-bottom: 60px;
    background: var(--accent-color);
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: var(--primary-gradient);
    opacity: 0.05;
    border-radius: 50%;
    z-index: 0;
}

/* Spider Logo Component (Internal to Hero Content) */
.spider-wrapper-internal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    width: 100%;
    gap: 1.5rem;
    text-align: left;
}

.spider-text-side {
    flex: 1;
}

.spider-visual-side {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spider-logo {
    width: 250px;
    height: 280px;
    background-color: var(--spider-color);
    
    /* Forma del SVG como m├íscara */
    -webkit-mask-image: url('../img/spider.svg');
    mask-image: url('../img/spider.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    
    transition: background-color 0.4s ease;
    z-index: 2;
}

.spider-gradient-wrapper {
    display: inline-block;
    -webkit-mask-image: linear-gradient(var(--spider-mask-dir), transparent, black);
    mask-image: linear-gradient(var(--spider-mask-dir), transparent, black);
}

/* Hero Layout Overrides */
.hero-content {
    max-width: 900px !important;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

@media (max-width: 991px) {
    .spider-wrapper-internal {
        flex-direction: column;
        text-align: center;
    }
    
    .spider-visual-side {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .spider-logo {
        width: 200px;
        height: 220px;
    }
}

/* --- OPTIMIZACIONES RESPONSIVAS --- */

/* 2. Ajuste Hero en Tablets (pantallas de 768px a 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .hero {
        padding-top: 80px !important;
        min-height: auto !important;
    }
}

/* 3. Responsive de la Araña en Celulares (pantallas de < 768px) */
@media (max-width: 767px) {
    .spider-logo {
        width: 100px !important;
        height: 110px !important;
    }
}

/* 4. Fallback de máscara CSS para la Araña en navegadores móviles antiguos */
@supports not ((-webkit-mask-image: url('../img/spider.svg')) or (mask-image: url('../img/spider.svg'))) {
    .spider-logo {
        background-image: url('../img/spider.svg') !important;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-color: transparent !important;
    }
}

/* UTN Dynamic Icon Utility */
.utn-icon-mask {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: #000000; /* Siempre negro por consistencia */
    -webkit-mask-image: url('../img/favicon.svg');
    mask-image: url('../img/favicon.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transition: var(--transition);
    vertical-align: middle;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    padding-bottom: 50px;
}

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

.section-title::before {
    content: '';
    position: absolute;
    bottom: -23px; /* Ajustado para el nuevo tama├▒o */
    left: 50%;
    transform: translateX(-50%);
    width: 48px; /* Doble del tama├▒o anterior */
    height: 48px;
    background-color: var(--bg-color);
    background-image: url('../img/favicon.svg');
    background-size: 32px;
    background-repeat: no-repeat;
    background-position: center;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: 2;
    transition: var(--transition);
}


/* Conversion Buttons */
.cta-group {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Info Blocks */
.info-section {
    padding: 80px 0;
    scroll-margin-top: 90px;
}

.badge-modality {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.pricing-card:hover {
    transform: scale(1.02);
}

/* Original Styles Reclaimed */

/* Requisitos & Temario Grid */
.requisitos-previos {
    background-color: var(--accent-color);
}

.temario {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.item-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.item-grid>* {
    flex: 1 1 300px;
    max-width: calc(33.33% - 1.4rem);
    /* Fuerza 3 columnas en desktop preservando el gap */
}

@media (max-width: 992px) {
    .item-grid>* {
        max-width: calc(50% - 1rem);
        /* 2 columnas en tablets */
    }
}

@media (max-width: 768px) {
    .item-grid>* {
        max-width: 100%;
        /* 1 columna en m├│vil */
    }
}

.item-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
    padding: 1rem;
}

.item-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    background: var(--card-bg);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.item-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.item-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Certificacion */
.certificacion {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0;
    color: white;
    text-align: center;
}

.cert-overlay {
    background: rgba(0, 86, 179, 0.85);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

/* Preinscripcion Split */
.preinscribite {
    padding: 80px 0;
    background: var(--bg-color);
    scroll-margin-top: 90px;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

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

.form-control {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
    line-height: 1.5;
}

select.form-control {
    height: auto !important;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

/* Footer & Redes */
.footer-main {
    background: #111;
    color: white;
    padding: 20px 0;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Navigation Menu */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: capitalize;
    transition: var(--transition);
}

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

/* Image Sizing */
.mp-logo {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 1rem auto;
    transition: var(--transition);
}


/* Map */
.mapa-container {
    width: 50%;
    margin: 2rem auto;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.mapa-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Docentes Section Fixed Contrast */
#docentes {
    background: #1e293b !important;
    color: var(--fixed-light) !important;
}

#docentes .section-title,
#docentes h4 {
    color: var(--fixed-light) !important;
}

#docentes .profesion-text {
    color: #38bdf8 !important;
    font-weight: 600;
}

#docentes .aptitudes-text {
    color: #94a3b8 !important;
}

/* Teachers Carousel Overrides for Bootstrap */
.carousel-item {
    padding: 2rem;
}

.profesion-text {
    color: var(--primary-color);
    font-weight: 600;
}

.aptitudes-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .mapa-container {
        width: 100%;
    }
}

/* Turn Cards & Modalidad Expansion */
.turn-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.turn-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    flex: 1 1 300px;
    max-width: calc(33.33% - 10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
}

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

.turn-icon {
    font-size: 2rem;
    color: #f59e0b;
    margin-bottom: 1rem;
}

.turn-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.btn-fab {
    margin-top: auto;
    width: 100%;
    padding: 12px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-fab:hover {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.05);
    text-decoration: none;
}

.pricing-info-cta {
    max-width: 600px;
    margin: 0 auto;
}

.pricing-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .turn-card {
        max-width: 100%;
    }
}

/* iOS Safari: background-attachment: fixed no soportado en mobile */
@media (max-width: 768px) {
    .certificacion {
        background-attachment: scroll;
    }
}

/* Botón hamburguesa mobile */
.mobile-menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: var(--card-bg);
    color: var(--primary-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding: 0;
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ============================================================
   DENSIDAD DESKTOP — Compactación del 20% en pantallas ≥1200px
   Reemplaza el zoom: 0.8 con valores CSS reales y cross-browser
   Mobile y tablet NO se ven afectados.
   ============================================================ */
@media (min-width: 1200px) {

    /* Header más compacto */
    header { padding: 0.75rem 0; }
    .logo-right img { height: 36px; }

    /* Hero menos alto */
    .hero {
        padding-top: 96px;
        padding-bottom: 48px;
        min-height: 72vh;
    }
    .hero::after {
        width: 640px;
        height: 640px;
    }

    /* Spider logo más chico */
    .spider-logo {
        width: 200px;
        height: 224px;
    }
    .spider-wrapper-internal { gap: 1.6rem; }

    /* Títulos de sección menos espaciados */
    .section-title {
        margin-bottom: 2.8rem;
        padding-bottom: 40px;
    }

    /* Secciones de contenido */
    .info-section   { padding: 64px 0; }
    .preinscribite  { padding: 64px 0; }
    .certificacion  { padding: 80px 0; }

    /* Split form */
    .split-layout { gap: 3.2rem; }
    .cert-overlay { padding: 2.4rem; }

    /* Pricing card */
    .pricing-card { padding: 2rem; }

    /* Íconos de temario/requisitos */
    .item-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    .item-box { padding: 0.8rem; gap: 1.2rem; }
}

/* ── Desktop scale: 20% reduction ── */
@media (min-width: 992px) {
    html {
        zoom: 0.8;
    }
}
