/* =========================================================
   BIOSCAN - DISEÑO PRINCIPAL
   ========================================================= */

/* =========================================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================================= */
:root {
    --azul: #123b82;
    --azul-oscuro: #0b2859;
    --azul-claro: #eaf2fb;
    --morado: #5b3b91;
    --blanco: #ffffff;
    --gris-claro: #f5f7fa;
    --gris: #667085;
    --gris-oscuro: #263238;
    --borde: #e1e6ed;
    --sombra: 0 10px 30px rgba(20, 45, 80, 0.10);
    --radio: 16px;
    --ancho: 1180px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--blanco);
    color: var(--gris-oscuro);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

button {
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.container {
    width: min(92%, var(--ancho));
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   2. HEADER Y NAVEGACIÓN
   ========================================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--borde);
}

.header-content {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    display: block;
    width: auto;
    height: 58px;
    max-width: 180px;
    object-fit: contain;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex: 1;
}

.nav a {
    font-size: 14px;
    font-weight: 600;
    color: var(--gris-oscuro);
    transition: color 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: var(--azul-claro);
    color: var(--azul);
    font-size: 24px;
    cursor: pointer;
}


/* =========================================================
   3. BOTONES (CTAS)
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--azul);
    color: var(--blanco);
    box-shadow: 0 8px 20px rgba(18, 59, 130, 0.20);
}

.btn-primary:hover {
    background: var(--azul-oscuro);
}

.btn-secondary {
    background: var(--blanco);
    color: var(--azul);
    border-color: var(--azul);
}

.btn-secondary:hover {
    background: var(--azul-claro);
}

.btn-light {
    background: var(--blanco);
    color: var(--azul);
}

.btn-light:hover {
    background: var(--azul-claro);
}


/* =========================================================
   4. HERO Y SLIDER
   ========================================================= */
.hero {
    min-height: 610px;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(9, 38, 82, 0.98), rgba(18, 59, 130, 0.88));
}

.hero-content {
    padding-top: 75px;
    padding-bottom: 75px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 60px;
}

.hero-text {
    max-width: 680px;
    color: var(--blanco);
}

.hero .eyebrow {
    color: #d9e7ff;
}

.hero h1 {
    margin-bottom: 24px;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.05;
    letter-spacing: -2px;
}

.hero h1 span {
    display: block;
    color: #bcd4ff;
}

.hero p {
    max-width: 600px;
    margin-bottom: 32px;
    font-size: 20px;
    color: #edf4ff;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-image {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(18, 59, 130, 0.10), rgba(91, 59, 145, 0.18));
    pointer-events: none;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 22px;
}

.hero-slide {
    display: none;
    width: 100%;
    height: auto;
    aspect-ratio: 1920 / 900;
    object-fit: contain !important;
}

.hero-slide.active {
    display: block !important;
}

.hero-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin: 14px 0 18px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid #1f6f8b;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active,
.hero-dot:hover {
    background: #1f6f8b;
    transform: scale(1.2);
}

/* Hero Location (Puebla u otras sucursales) */
.hero-location {
    min-height: 390px;
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff, #eaf2fb);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    box-sizing: border-box;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

.hero-location-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #123b82;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(18, 59, 130, 0.25);
}

.hero-location strong {
    display: block;
    color: #123b82;
    font-size: 30px;
    margin-bottom: 8px;
}

.hero-location > span:last-child {
    color: #52657d;
    font-size: 16px;
}

.branch-hero-photo {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.branch-hero-photo img {
    display: block;
    width: 100%;
    height: 390px;
    object-fit: cover;
}


/* =========================================================
   5. SECCIONES GENERALES
   ========================================================= */
.section {
    padding: 100px 0;
}

.section-light {
    background: var(--gris-claro);
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}

.section-light .container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

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

.section-heading .eyebrow {
    color: var(--azul);
}

.section-heading h2 {
    margin-bottom: 16px;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.15;
    color: var(--azul-oscuro);
}

.section-heading p {
    color: var(--gris);
    font-size: 17px;
}


/* =========================================================
   6. SERVICIOS
   ========================================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--blanco);
    border: 1px solid #d7e2f0;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 28px rgba(18, 59, 130, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 38px rgba(18, 59, 130, 0.18);
    border-color: #123b82;
}

.service-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border-radius: 14px;
    background: #dce9f8;
    color: #123b82;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

.service-category {
    display: block;
    margin-bottom: 8px;
    color: var(--morado);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.service-card h3 {
    margin-top: 14px;
    margin-bottom: 12px;
    font-size: 1.25rem;
    color: var(--azul-oscuro);
}

.service-card p {
    color: var(--gris);
    font-size: 15px;
    line-height: 1.7;
}

.service-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--azul);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.service-link:hover {
    color: var(--morado);
    transform: translateX(3px);
}


/* =========================================================
   7. SUCURSALES Y MAPAS
   ========================================================= */
.branches-grid,
.branch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.branch-card {
    background: var(--blanco);
    border: 1px solid #d7e2f0;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 10px 28px rgba(18, 59, 130, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.branch-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 38px rgba(18, 59, 130, 0.18);
    border-color: #123b82;
}

.branch-card h3 {
    margin-bottom: 14px;
    color: var(--azul-oscuro);
    font-size: 22px;
}

.branch-card p {
    min-height: 48px;
    margin-bottom: 20px;
    color: var(--gris);
    line-height: 1.7;
}

.branch-card strong {
    color: #123b82;
}

.branch-link {
    display: inline-block;
    color: var(--azul);
    font-weight: 700;
    transition: color 0.2s ease;
}

.branch-link:hover {
    color: var(--morado);
}

.branch-map {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.branch-map iframe {
    width: 100%;
    max-width: 900px;
    height: 450px;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   8. NOSOTROS (ABOUT)
   ========================================================= */
.about {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
}

.about-content {
    max-width: 760px;
}

.about-content .eyebrow {
    color: var(--azul);
}

.about-content h2 {
    margin-bottom: 20px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
    color: var(--azul-oscuro);
}

.about-content p {
    margin-bottom: 30px;
    color: var(--gris);
    font-size: 18px;
}

.about-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}


/* =========================================================
   9. SECCIÓN CTA (LLAMADO A LA ACCIÓN)
   ========================================================= */
.cta-section {
    padding: 65px 20px;
}

.cta {
    padding: 90px 0;
    background: linear-gradient(135deg, var(--azul), var(--morado));
    color: var(--blanco);
}

.cta-content {
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    background: #eaf2fb;
    border: 1px solid #d5e2f0;
    border-radius: 24px;
    padding: 45px 35px;
    box-shadow: 0 12px 32px rgba(18, 59, 130, 0.10);
}

.cta-content > .eyebrow {
    color: #123b82 !important;
    opacity: 1 !important;
}

.cta-content h2 {
    color: #123b82;
    margin-bottom: 14px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
}

.cta-content p {
    color: #4d5f75;
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
    font-size: 18px;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
    justify-content: center;
}

.cta-buttons .btn {
    min-width: 210px;
}

.cta-buttons .btn-outline-light {
    background: #123b82 !important;
    color: #ffffff !important;
    border: 2px solid #123b82 !important;
}

.cta-buttons .btn-outline-light:hover {
    background: #0b2859 !important;
    border-color: #0b2859 !important;
}


/* =========================================================
   10. FOOTER
   ========================================================= */
.footer {
    margin-top: 0;
    background: #0b2859;
    color: var(--blanco);
    padding-top: 55px;
    padding-bottom: 0;
}

.footer-content {
    padding-bottom: 45px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.footer-brand {
    max-width: 420px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    width: auto;
    max-width: 180px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.footer-logo img {
    display: block;
    width: auto;
    height: 58px;
    max-width: 180px;
    object-fit: contain;
}

.footer-brand p,
.footer p {
    color: #dbe7f5;
    line-height: 1.7;
}

.footer-text {
    max-width: 280px;
    margin-top: 8px;
    color: #b9c9df;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column h3 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 8px;
}

.footer-column a {
    display: block;
    margin-bottom: 9px;
    color: #dbe7f5;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-column a:hover {
    color: #ffffff;
    padding-left: 5px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
}

.footer-links a {
    color: #dce5f2;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--blanco);
}

.footer-bottom {
    margin-top: 45px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: #bfcde0;
    font-size: 0.9rem;
}


/* =========================================================
   11. DISEÑO RESPONSIVO (MEDIA QUERIES)
   ========================================================= */

/* Tablets (hasta 900px) */
@media (max-width: 900px) {
    .header-content {
        flex-wrap: wrap;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .nav {
        order: 3;
        width: 100%;
        flex-basis: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    .services-grid,
    .branches-grid,
    .branch-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        min-height: 540px;
    }
}

/* Celulares (hasta 768px y 600px) */
@media (max-width: 768px) {
    .branch-grid,
    .branches-grid {
        gap: 18px;
    }

    .branch-card {
        padding: 22px;
        border-radius: 16px;
    }

    .footer {
        margin-top: 50px;
        padding-top: 40px;
    }

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

    .footer-brand {
        max-width: none;
    }

    .footer-bottom {
        margin-top: 30px;
        text-align: center;
    }

    .cta-section {
        padding: 45px 15px;
    }

    .cta-content {
        padding: 32px 22px;
        border-radius: 18px;
    }

    .cta-buttons {
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
        min-width: 0;
    }

    .branch-hero-photo {
        border-radius: 18px;
    }

    .branch-hero-photo img {
        height: 280px;
    }

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

@media (max-width: 600px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-cta {
        display: none;
    }

    .nav {
        display: none;
        order: 4;
        width: 100%;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 0;
        overflow: visible;
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        padding: 12px 8px;
        border-bottom: 1px solid var(--borde);
        font-size: 13px;
    }

    .container {
        width: min(92%, 100%);
    }

    .header-content {
        gap: 16px;
    }

    .logo {
        font-size: 24px;
    }

    .header .btn {
        min-height: 40px;
        padding: 0 16px;
        font-size: 12px;
    }

    .hero-content {
        padding-top: 60px;
        padding-bottom: 60px;
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-image img,
    .hero-slide {
        height: 280px;
    }

    .hero h1 {
        font-size: 43px;
        letter-spacing: -1.5px;
    }

    .hero p {
        font-size: 17px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section {
        padding: 70px 0;
    }

    .services-grid,
    .branches-grid,
    .branch-grid {
        grid-template-columns: 1fr;
    }

    .service-card,
    .branch-card {
        padding: 25px;
    }

    .footer-links {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}