:root {
    --c-01: #07152b;/*Azul Noche Profundo*/
    --c-02: #0d2344;/*Azul Marino Oscuro*/
    --c-03: #ffd43b;/*Amarillo Ámbar*/
    --c-04: #3d63b8;/*Azul Real*/
    --c-05: #f4f7fb;/*Blanco Azulado*/
    --c-06: #d6deea;/*Gris Azulado Pálido*/
    --c-07: #0a1020;/*Negro Oxford*/
    --c-08: #1b2f57;/*Azul Acero*/
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --shadow-soft: 0 18px 45px rgba(7, 21, 43, 0.14);
    --shadow-strong: 0 24px 60px rgba(7, 21, 43, 0.24);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --site-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--c-01);
    background: #eef3f8;
    line-height: 1.65;
    overflow-x: hidden;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

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

.container {
    width: min(var(--site-width), calc(100% - 2.5rem));
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 3.6vw, 3.25rem);
    line-height: 1.1;
    color: var(--c-02);
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.section-title::after {
    content: '';
    display: block;
    width: 74px;
    height: 5px;
    margin-top: 1rem;
    border-radius: 999px;
    background: var(--c-03);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-04);
    margin-bottom: 1rem;
}

header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 5%;
    background: rgba(244, 247, 251, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(13, 35, 68, 0.08);
    transition: padding 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

header.is-scrolled {
    padding: 0.7rem 5%;
    box-shadow: 0 10px 32px rgba(7, 21, 43, 0.10);
}

.brand-container {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.logo-container a,
.footer-brand {
    display: inline-flex;
    align-items: center;
}

.logo-container img,
.footer-logo {
    width: auto;
    height: 52px;
    object-fit: contain;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-02);
    white-space: nowrap;
    margin-bottom: 0.23rem;
}
.brand-footer {    
    font-size: 1.50rem !important;
    font-weight: 800;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
    white-space: nowrap;
    margin-top: 1rem;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

nav a {
    position: relative;
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-02);
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 100%;
    height: 2px;
    background: var(--c-03);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s ease;
}

nav a:hover::after,
nav a:focus-visible::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(13, 35, 68, 0.12);
    border-radius: 14px;
    background: white;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin-left: auto;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--c-02);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8.5rem 5% 4.5rem;
    background:
        linear-gradient(rgba(7, 21, 43, 0.72), rgba(7, 21, 43, 0.74)),
        url('../assets/images/hero-bg.jpg') center/cover no-repeat;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 140px;
    background: linear-gradient(180deg, rgba(7, 21, 43, 0), #eef3f8);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
}

.hero h1 {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: clamp(3rem, 6.5vw, 5.4rem);
    line-height: 0.94;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.hero h1 span {
    display: block;
}

.hero-tagline {
    margin: 0 0 1.75rem;
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2vw, 1.16rem);
    color: var(--c-03) !important;
    letter-spacing: 0.02em;
    max-width: 660px;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.92);
}

.hero strong {
    color: var(--c-03);
}

.availability {
    margin-top: 1rem;
    color: rgba(150, 150, 150, 0.923) !important;
    font-family: var(--font-main);
    font-style: italic;
    font-size: 0.95rem;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary,
.btn-sm,
.btn-card,
.btn-whatsapp,
.btn-offer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-primary,
.btn-whatsapp,
.btn-offer {
    background: var(--c-03);
    color: var(--c-01);
    box-shadow: 0 14px 30px rgba(255, 212, 59, 0.24);
}

.btn-primary,
.btn-secondary {
    padding: 1rem 1.4rem;
}

.btn-secondary,
.btn-card,
.btn-sm {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

#bienvenida-home {
    padding: 1.25rem 0 1rem;
}

.home-intro-grid {
    align-items: center;
}

.home-intro-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    object-fit: cover;
    min-height: 420px;
}

.home-intro-copy {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-intro-copy p {
    font-size: 1.08rem;
    color: #2b3c54;
    margin-bottom: 0;
}

.dark-availability {
    color: var(--c-02);
    margin-top: 0.25rem;
}

.home-text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    font-weight: 800;
    color: var(--c-04);
}

.home-text-link:hover {
    color: var(--c-02);
}

.btn-card,
.btn-sm,
.btn-offer {
    padding: 0.85rem 1.15rem;
    width: 100%;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-sm:hover,
.btn-card:hover,
.btn-whatsapp:hover,
.btn-offer:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 32px rgba(7, 21, 43, 0.16);
}

.services-carousel-section {
    padding: 6rem 0 7rem;
}

.carousel-shell {
    position: relative;
    border-radius: 36px;
    padding: 3rem clamp(1rem, 3vw, 2rem);
    background:
        linear-gradient(135deg, rgba(13, 35, 68, 0.96), rgba(61, 99, 184, 0.92)),
        url('../assets/images/nosotros-lab.jpg') center/cover no-repeat;
    min-height: 540px;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.carousel-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(7, 21, 43, 0.78), rgba(13, 35, 68, 0.30));
}

.carousel-header,
.carousel-stage,
.carousel-controls {
    position: relative;
    z-index: 1;
}

.carousel-header {
    color: white;
    margin-bottom: 2rem;
}

.carousel-header .section-title {
    color: white;
    max-width: 720px;
}

.carousel-header p {
    max-width: 760px;
    color: rgba(255,255,255,0.88);
}

.carousel-stage {
    overflow: hidden;
    padding: 1rem 0;
}

.carousel-track {
    display: flex;
    gap: 1.25rem;
    align-items: stretch;
    will-change: transform;
    touch-action: pan-y;
}

.carousel-card {
    flex: 0 0 calc((100% - 2.5rem) / 3);
    min-height: 290px;
    padding: 1.75rem;
    border-radius: 24px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.14);
    transition: transform 0.35s ease, background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.carousel-card.active {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 212, 59, 0.16);
    border-color: rgba(255, 212, 59, 0.92);
    box-shadow: 0 24px 44px rgba(255, 212, 59, 0.18);
}

.carousel-card h3 {
    font-size: 1.45rem;
    margin-bottom: 1rem;
    color: var(--c-03);
}

.carousel-card p {
    color: rgba(255,255,255,0.92);
    font-size: 0.98rem;
    margin-bottom: 1.5rem;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.carousel-status {
    color: rgba(255,255,255,0.84);
    font-family: var(--font-mono);
    font-size: 0.88rem;
}

.carousel-buttons {
    display: flex;
    gap: 0.75rem;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.24);
    background: rgba(255,255,255,0.12);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.carousel-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 212, 59, 0.18);
    border-color: rgba(255, 212, 59, 0.8);
}

#serviceBtn {
    width: 200px;
    border-radius: 24px;
}

.page-hero {
    padding: 9rem 5% 4rem;
    background: linear-gradient(135deg, var(--c-04), var(--c-02));
    color: white;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(2.6rem, 5vw, 4rem);
    color: var(--c-03);
    margin-bottom: 1rem;
}

.page-hero p {
    font-family: var(--font-mono);
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255,255,255,0.88);
}

.nosotros-hero,
.services-grid-section,
#contacto,
.fundadores {
    padding: 5rem 0;
}

.nosotros-layout,
.content-grid,
.contact-grid-mobile {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 2.5rem;
    align-items: center;
}

.nosotros-copy p {
    font-size: 1.05rem;
    color: #2b3c54;
    margin-bottom: 1.35rem;
}

.nosotros-image {
    position: relative;
}

.nosotros-image::after {
    content: '';
    position: absolute;
    inset: auto -14px -14px 14px;
    border-radius: 20px;
    background: var(--c-04);
    z-index: 0;
}

.nosotros-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    object-fit: cover;
    min-height: 420px;
}

.fundadores-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.fundador-card,
.subject-card,
.offer-card,
.contact-info,
.contact-form,
.consult-card {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.fundador-card {
    padding: 2rem;
    text-align: center;
    border-top: 4px solid var(--c-03);
}

.fundador-img-placeholder {
    width: 132px;
    height: 132px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(61,99,184,0.14), rgba(255,212,59,0.30));
    border: 1px dashed rgba(13,35,68,0.14);
}

.fundador-card h3 {
    font-size: 1.4rem;
    color: var(--c-02);
    margin-bottom: 0.5rem;
}

.fundador-card p:first-of-type {
    font-weight: 700;
    color: var(--c-04);
    margin-bottom: 0.4rem;
}

.services-grid-section .container {
    display: grid;
    gap: 2rem;
}

.service-category {
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(13,35,68,0.06);
    border-radius: 28px;
    padding: 2rem;
}

.category-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.category-title {
    font-size: 2rem;
    color: var(--c-02);
    font-weight: 800;
}

.category-subtitle {
    color: #52657f;
    max-width: 660px;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}

.subject-card {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    border: 1px solid rgba(13,35,68,0.05);
}

.subject-card h3 {
    font-size: 1.18rem;
    color: var(--c-02);
}

.subject-card p {
    color: #52657f;
}

.price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--c-04);
}

.old-price {
    margin-right: 0.35rem;
    font-size: 1rem;
    color: #8896aa;
    text-decoration: line-through;
}

.highlight-category {
    background: linear-gradient(135deg, rgba(61,99,184,0.10), rgba(255,212,59,0.12));
    border: 1px solid rgba(255,212,59,0.28);
}

.offers-container {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 24px;
    background: rgba(7,21,43,0.04);
    border: 1px dashed rgba(13,35,68,0.15);
}

.offers-container h3 {
    color: var(--c-02);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.offers-container > p {
    color: #52657f;
    margin-bottom: 1.2rem;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.offer-card {
    padding: 1.5rem;
    border: 1px solid rgba(13,35,68,0.06);
}

.offer-card.featured {
    border: 2px solid rgba(255,212,59,0.92);
    transform: scale(1.02);
}

.offer-card h4 {
    color: var(--c-02);
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.duration,
.note,
.payment-note {
    color: #52657f;
    font-size: 0.95rem;
}

.offer-price {
    margin: 1rem 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--c-04);
}

.discount {
    margin-left: 0.45rem;
    display: inline-block;
    padding: 0.18rem 0.48rem;
    border-radius: 999px;
    background: rgba(255,212,59,0.2);
    color: var(--c-02);
    font-size: 0.9rem;
    font-weight: 800;
}

.consult-card {
    padding: 1.75rem;
    background: linear-gradient(135deg, var(--c-02), var(--c-04));
    color: white;
}

.consult-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

.consult-card p {
    color: rgba(255,255,255,0.88);
    margin-bottom: 1rem;
}

.contact-info,
.contact-form {
    padding: 2.2rem;
}

.contact-info {
    background: linear-gradient(160deg, var(--c-04), #5376be);
    color: white;
}

.contact-info h2 {
    font-size: 2rem;
    color: var(--c-03);
    margin-bottom: 1.4rem;
}

.contact-item-block + .contact-item-block {
    margin-top: 1.15rem;
}

.contact-label {
    font-weight: 800;
    color: var(--c-03);
    margin-bottom: 0.35rem;
}

.contact-value,
.contact-value a {
    color: white;
}

.contact-value a:hover {
    text-decoration: underline;
}

.contact-form .section-title {
    margin-bottom: 1.5rem;
}

.form-field {
    margin-bottom: 1.1rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--c-02);
    text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(13,35,68,0.12);
    background: #f8fafc;
    color: var(--c-01);
}

.form-field textarea {
    min-height: 140px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: rgba(61,99,184,0.52);
    box-shadow: 0 0 0 4px rgba(61,99,184,0.12);
}

.btn-whatsapp {
    width: 100%;
    padding: 1rem 1.2rem;
    font-size: 1rem;
}

footer {
    background: var(--c-01);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    width: min(var(--site-width), calc(100% - 2.5rem));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1px 0.8fr 1px 0.8fr;
    gap: 1.6rem;
    align-items: stretch;
}

.footer-section {
    min-width: 0;
}

.footer-brand {
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.footer-brand h3 {
    color: var(--c-03);
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    min-height: 52px;
}

.footer-section h3 {
    color: var(--c-03);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p,
.social-links a {
    color: rgba(255,255,255,0.88);
}

.footer-section p + p,
.social-links a + a {
    margin-top: 0.55rem;
}

.footer-line {
    width: 1px;
    height: 100%;
    background: rgba(255,255,255,0.14);
}

.social-links a:hover,
.footer-section a:hover,
.footer-brand:hover h3 {
    color: var(--c-03);
}

.footer-bottom {
    width: min(var(--site-width), calc(100% - 2.5rem));
    margin: 2rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.92rem;
}

#background_top {
    position: relative;
    width: 100%;
    overflow: hidden;
    
    background-image: 
        linear-gradient(rgba(10, 45, 115, 0.85), rgba(10, 45, 115, 0.85)), 
        url('../assets/images/background_top.webp');
    background-repeat: repeat-x;
    background-position: var(--pos-x, 0px) center;
    background-size: auto 100%; 
    will-change: background-position;
}

@media (max-width: 1080px) {
    .subjects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .offers-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-line {
        width: 100%;
        height: 1px;
    }
}

@media (max-width: 920px) {
    .nosotros-layout,
    .content-grid,
    .contact-grid-mobile {
        grid-template-columns: 1fr;
    }

    .carousel-card {
        flex-basis: calc((100% - 1.25rem) / 2);
    }
}

@media (max-width: 768px) {
    header {
        gap: 0.75rem;
        padding: 0.85rem 4%;
    }

    header.is-scrolled {
        padding: 0.65rem 4%;
    }

    .brand-container {
        gap: 0.7rem;
        flex: 1;
    }

    .logo-container img {
        height: 44px;
    }

    .brand-name {
        font-size: 0.96rem;
        letter-spacing: 0.06em;
    }

    .menu-toggle {
        display: inline-flex;
        margin-right: 0.15rem;
    }

    nav {
        position: relative;
    }

    nav ul {
        position: absolute;
        top: calc(100% + 0.85rem);
        right: 0.35rem;
        min-width: 220px;
        padding: 1rem;
        border-radius: 18px;
        background: rgba(255,255,255,0.98);
        box-shadow: 0 22px 44px rgba(7, 21, 43, 0.16);
        border: 1px solid rgba(13,35,68,0.08);
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    nav ul.active {
        display: flex;
    }

    .hero {
        padding: 7.8rem 4% 4rem;
        min-height: 92vh;
    }

    .hero h1 {
        font-size: clamp(2.55rem, 10vw, 3.8rem);
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-tagline {
        font-size: 0.98rem;
        margin-bottom: 1.35rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .services-carousel-section,
    .nosotros-hero,
    .services-grid-section,
    #contacto,
    .fundadores {
        padding: 4rem 0;
    }

    .carousel-shell {
        min-height: auto;
        padding: 2.1rem 1rem;
        border-radius: 28px;
    }

    .carousel-card {
        flex-basis: 100%;
        min-height: 260px;
    }

    .carousel-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .carousel-buttons {
        justify-content: flex-end;
    }

    .subjects-grid,
    .fundadores-grid {
        grid-template-columns: 1fr;
    }

    .service-category,
    .contact-info,
    .contact-form,
    .fundador-card,
    .consult-card {
        padding: 1.5rem;
    }

    .contact-form .section-title,
    .contact-info h2 {
        font-size: 2rem;
    }

    #bienvenida-home {
        padding-top: 0;
    }

    .home-intro-image img {
        min-height: 280px;
    }
}

@media (max-width: 540px) {
    .container,
    .footer-content,
    .footer-bottom {
        width: min(var(--site-width), calc(100% - 1.4rem));
    }

    .brand-name {
        font-size: 0.88rem;
    }

    .logo-container img,
    .footer-logo {
        height: 44px;
    }

    .footer-brand h3 {
        font-size: 1.35rem;
        min-height: 44px;
    }

    .section-title {
        font-size: 2rem;
    }
}
