/* ==========================================================================
   1. RESET, RAÍZ Y VARIABLES GLOBALES (Sistema de Diseño Cracknear)
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-azul-hero: #0060a9;
    --color-azul-oscuro: #004077;
    --color-azul-footer: #002d55;
    --color-verde-boton: #8cc63f;
    --color-texto-oscuro: #1a252c;
    --color-texto-gris: #5c6b73;
    --color-blanco: #ffffff;
    --color-fondo-form: #0b3a66; 
    --font-main: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-texto-oscuro);
    background-color: var(--color-blanco);
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4%;
}

.menu-checkbox {
    display: none;
}

/* ==========================================================================
   2. TRANSICIÓN DE ENTRADA CON EL SCROLL (Efecto UI Automático)
   ========================================================================== */
.transition-scroll {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUpScroll auto forwards;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
}

@keyframes fadeInUpScroll {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@supports not (animation-timeline: view()) {
    .transition-scroll {
        opacity: 1;
        transform: translateY(0);
        transition: transform 0.6s ease, opacity 0.6s ease;
    }
}

/* ==========================================================================
   3. COMPONENTE COMPARTIDO: HEADER / NAVEGACIÓN
   ========================================================================== */
.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 0 0 20px 0;
}

.header__wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.header__logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header__logo-img {
    display: block;
    max-width: 100%;
    height: auto;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header__link {
    color: var(--color-blanco);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 700;
    position: relative;
    transition: color 0.3s ease;
}

.header__link:not(.header__link--highlighted)::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-verde-boton);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.header__link:not(.header__link--highlighted):hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.header__link--highlighted {
    border: 2px solid var(--color-blanco);
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.header__link--highlighted:hover {
    background-color: var(--color-blanco);
    color: var(--color-azul-hero);
    transform: translateY(-2px);
}

.header__btn {
    background-color: var(--color-verde-boton);
    color: var(--color-blanco);
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(140, 198, 63, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background-color 0.3s ease;
}

.header__btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 20px rgba(140, 198, 63, 0.5);
    background-color: #7bb333;
}

/* ==========================================================================
   4. VISTAS ESPECÍFICAS: INICIO (index.html)
   ========================================================================== */

/* Hero Section (Reglas estrictas Cracknear: 45%/45% y h1 de 50px) */
.hero {
    background-color: var(--color-azul-hero);
    padding: 140px 0 120px 0; 
    color: var(--color-blanco);
    position: relative;
    overflow: hidden;
}

.hero__wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10%;
}

.hero__content {
    flex: 0 0 45%; 
    position: relative;
    z-index: 5;
}

.hero__media {
    flex: 0 0 45%; 
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 5;
}

.hero__title {
    font-size: 50px; 
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.hero__actions {
    display: flex;
    gap: 16px;
}

.hero__btn {
    padding: 12px 28px;
    border: 2px solid var(--color-blanco);
    border-radius: 25px;
    color: var(--color-blanco);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.hero__btn:hover {
    background-color: var(--color-blanco);
    color: var(--color-azul-hero);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
    transform: translateY(-4px) scale(1.03);
}

.hero__avatar-wrapper {
    width: 340px;
    height: 340px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 2;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Iconos Médicos Orbitando */
.hero__medical-shape { position: absolute; z-index: 3; }
.hero__medical-shape--stethoscope { width: 50px; height: 50px; top: 10%; left: -5%; animation: medicalOrbit1 14s infinite linear; }
.steth-earpiece { width: 24px; height: 14px; border: 3px solid var(--color-blanco); border-bottom: none; border-radius: 12px 12px 0 0; margin: 0 auto; }
.steth-tubing { width: 30px; height: 25px; border: 3px solid var(--color-verde-boton); border-top: none; border-radius: 0 0 15px 15px; margin: -2px auto 0 auto; }
.steth-chestpiece { width: 14px; height: 14px; background-color: var(--color-blanco); border: 2px solid var(--color-azul-oscuro); border-radius: 50%; margin: -4px auto 0 auto; }

.hero__medical-shape--cross {
    width: 40px;
    height: 40px;
    background-color: var(--color-blanco);
    top: 72%;
    right: -5%;
    position: absolute;
    animation: medicalOrbit2 18s infinite linear;
    clip-path: polygon(33% 0%, 66% 0%, 66% 33%, 100% 33%, 100% 66%, 66% 66%, 66% 100%, 33% 100%, 33% 66%, 0% 66%, 0% 33%, 33% 33%);
}

.hero__medical-shape--pill { width: 22px; height: 46px; top: 40%; left: 95%; animation: medicalOrbit3 11s infinite linear; }
.pill-top { width: 100%; height: 50%; background-color: var(--color-verde-boton); border-radius: 15px 15px 0 0; }
.pill-bottom { width: 100%; height: 50%; background-color: var(--color-blanco); border-radius: 0 0 15px 15px; }

@keyframes medicalOrbit1 {
    0% { transform: rotate(0deg) translate(55px) rotate(0deg) scale(0.9); }
    50% { transform: rotate(180deg) translate(55px) rotate(-180deg) scale(1.15); }
    100% { transform: rotate(360deg) translate(55px) rotate(-360deg) scale(0.9); }
}
@keyframes medicalOrbit2 {
    0% { transform: rotate(360deg) translate(65px) rotate(0deg); }
    100% { transform: rotate(0deg) translate(65px) rotate(-360deg); }
}
@keyframes medicalOrbit3 {
    0% { transform: scale(0.95) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
    100% { transform: scale(0.95) rotate(360deg); }
}

/* Tarjetas de Especialidades */
.specialties { padding: 100px 0; background-color: var(--color-blanco); text-align: center; }
.specialties__title { font-size: 28px; font-weight: 700; margin-bottom: 50px; }
.specialties__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.specialties__card { background: var(--color-blanco); border-radius: 12px; padding: 24px; border: 1px solid #e2e8f0; text-align: left; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; cursor: pointer; }
.specialties__card:hover { transform: translateY(-8px); box-shadow: 0 12px 24px rgba(0, 96, 169, 0.08); border-color: var(--color-azul-hero); }

.specialties__card--banner { background-color: var(--color-azul-hero); color: var(--color-blanco); justify-content: center; align-items: center; text-align: center; border: none; gap: 20px; }
.specialties__card--banner:hover { background-color: var(--color-azul-oscuro); transform: translateY(-8px) scale(1.02); box-shadow: 0 15px 30px rgba(0, 64, 119, 0.3); }
.specialties__img-holder { width: 100%; height: 140px; border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.specialties__img { width: 100%; height: 100%; object-fit: cover; }
.specialties__card-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; color: var(--color-texto-oscuro); }
.specialties__card-title--white { color: var(--color-blanco) !important; font-size: 18px; line-height: 1.4; }
.specialties__card-text { font-size: 13px; color: var(--color-texto-gris); margin-bottom: 16px; flex-grow: 1; }
.specialties__card-link-text { background-color: var(--color-azul-hero); color: var(--color-blanco); padding: 8px 18px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; align-self: flex-start; transition: all 0.3s ease; }
.specialties__card:hover .specialties__card-link-text { background-color: var(--color-verde-boton); transform: scale(1.02); }
.specialties__banner-arrow { font-size: 24px; font-weight: 900; color: var(--color-blanco); transition: transform 0.3s ease; }
.specialties__card--banner:hover .specialties__banner-arrow { transform: translateX(6px); }

/* Certificación y Beneficios */
.cert { padding: 40px 0; border-top: 1px solid #edf2f7; border-bottom: 1px solid #edf2f7; }
.cert__wrapper { display: flex; justify-content: center; align-items: center; gap: 40px; }
.cert__doctor { height: 400px; object-fit: contain; }
.cert__logo { height: 60px; object-fit: contain; }

.features { background-color: var(--color-azul-hero); color: var(--color-blanco); padding: 80px 0; text-align: center; }
.features__title { font-size: 28px; font-weight: 700; margin-bottom: 50px; }
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.features__item { display: flex; flex-direction: column; align-items: center; }
.features__icon { font-size: 32px; margin-bottom: 16px; }
.features__item-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.features__item-text { font-size: 14px; color: rgba(255, 255, 255, 0.8); max-width: 300px; }

/* Aliados en Salud (Distribución exacta 45% / 45%) */
.partners { padding: 100px 0; background-color: var(--color-blanco); }
.partners__wrapper { display: flex; align-items: center; justify-content: space-between; gap: 10%; }
.partners__content { flex: 0 0 45%; }
.partners__media { flex: 0 0 45%; }
.partners__title { font-size: 36px; font-weight: 900; color: var(--color-azul-hero); line-height: 1.2; margin-bottom: 20px; }
.partners__text { font-size: 16px; color: var(--color-texto-gris); }
.partners__video-box { position: relative; width: 100%; aspect-ratio: 16 / 9; background-color: #eee; border-radius: 12px; overflow: hidden; }
.partners__video-thumb { width: 100%; height: 100%; object-fit: cover; }
.partners__play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background-color: rgba(255,255,255,0.9); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 24px; cursor: pointer; transition: transform 0.3s; }
.partners__video-box:hover .partners__play-btn { transform: translate(-50%, -50%) scale(1.15); background-color: var(--color-verde-boton); color: white; }

/* ==========================================================================
   5. COMPONENTE: CARRUSEL DE TESTIMONIOS (CSS Automático)
   ========================================================================== */
.testimonial { display: flex; background-color: var(--color-azul-hero); min-height: 380px; }
.testimonial__quote-side { flex: 0 0 50%; background-color: var(--color-azul-oscuro); color: var(--color-blanco); display: flex; flex-direction: column; justify-content: center; padding: 60px 8%; position: relative; overflow: hidden; }
.testimonial__image-side { flex: 0 0 50%; background-image: url('https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?auto=format&fit=crop&w=800&q=80'); background-size: cover; background-position: center; }

.slider-css { position: relative; width: 100%; overflow: hidden; }
.slider-css__track { display: flex; width: 400%; animation: autoSlideTestimonial 16s infinite cubic-bezier(0.77, 0, 0.175, 1); }
.slider-css:hover .slider-css__track { animation-play-state: paused; }
.slider-css__item { width: 25%; flex-shrink: 0; text-align: center; padding: 0 20px; }
.testimonial__icon { font-size: 50px; margin-bottom: 10px; opacity: 0.25; display: block; }
.testimonial__text { font-size: 16px; font-style: italic; margin-bottom: 24px; line-height: 1.6; }
.testimonial__author { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--color-verde-boton); }

@keyframes autoSlideTestimonial {
    0%, 28%   { transform: translateX(0%); }
    33%, 61%  { transform: translateX(-25%); }
    66%, 94%  { transform: translateX(-50%); }
    100%      { transform: translateX(-75%); }
}

/* ==========================================================================
   6. COMPONENTE: CARRUSEL DE CONVENIOS (8 Logos de 4 en 4)
   ========================================================================== */
.brands { padding: 80px 0; background-color: var(--color-blanco); text-align: center; } 
.brands__title { font-size: 24px; font-weight: 700; color: var(--color-azul-oscuro); margin-bottom: 40px; }
.brands__slider { position: relative; width: 100%; overflow: hidden; }
.brands__track { display: flex; width: 300%; animation: autoSlideBrands 12s infinite cubic-bezier(0.77, 0, 0.175, 1); }
.brands__slider:hover .brands__track { animation-play-state: paused; }
.brands__block { width: 33.333%; display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 0 10px; }
.brands__logo { height: 90px; max-width: 160px; object-fit: contain; filter: grayscale(100%); opacity: 0.45; transition: all 0.3s ease; }
.brands__logo:hover { filter: grayscale(0%); opacity: 1; }

@keyframes autoSlideBrands {
    0%, 45%   { transform: translateX(0%); }
    50%, 95%  { transform: translateX(-33.333%); }
    100%      { transform: translateX(-66.666%); }
}

/* ==========================================================================
   7. HERO COMPARTIDO PARA PÁGINAS INTERNAS (Base: Nosotros)
   ========================================================================== */
.internal-hero {
    position: relative;
    /* Imagen médica de fondo para Nosotros (Frame 10) */
    background-image: url('https://images.unsplash.com/photo-1551076805-e1869033e561?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center 30%;
    padding: 180px 0 100px 0;
    text-align: center;
    color: var(--color-blanco);
}

/* Imagen diferente exclusiva para las vistas de Blog */
.internal-hero--blog {
    background-image: url('https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?auto=format&fit=crop&w=1600&q=80');
    background-position: center 40%;
}

.internal-hero__overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(0, 96, 169, 0.88) 0%, rgba(0, 64, 119, 0.75) 100%); backdrop-filter: blur(3px); z-index: 1; }
.internal-hero__wrapper { position: relative; z-index: 2; }
.internal-hero__title { font-size: 42px; font-weight: 900; letter-spacing: -0.5px; }

/* ==========================================================================
   8. PÁGINA INTERNA: NOSOTROS (Basado en Frame 10.jpg)
   ========================================================================== */
.about-experience { padding: 90px 0; background-color: var(--color-blanco); text-align: center; }
.about-experience__title { font-size: 30px; font-weight: 700; color: var(--color-texto-oscuro); max-width: 800px; margin: 0 auto 35px auto; line-height: 1.3; }
.about-experience__lead { font-size: 15px; color: var(--color-texto-gris); max-width: 780px; margin: 0 auto 40px auto; line-height: 1.7; }
.about-experience__video-wrapper { position: relative; width: 280px; height: 280px; margin: 0 auto 45px auto; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.about-experience__avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.about-experience__play-btn { position: absolute; bottom: 10px; background-color: var(--color-azul-hero); color: var(--color-blanco); border: none; padding: 10px 24px; border-radius: 20px; font-family: var(--font-main); font-size: 12px; font-weight: 700; letter-spacing: 0.5px; cursor: pointer; box-shadow: 0 4px 15px rgba(0, 96, 169, 0.3); transition: all 0.3s ease; }
.about-experience__play-btn:hover { background-color: var(--color-verde-boton); transform: scale(1.05); box-shadow: 0 6px 20px rgba(140, 198, 63, 0.4); }
.about-experience__footer-text { font-size: 14px; color: var(--color-texto-gris); max-width: 820px; margin: 0 auto; line-height: 1.7; }

.about-expectations { padding: 80px 0 100px 0; background-color: #f8fafc; }
.about-expectations__wrapper { display: flex; align-items: center; justify-content: space-between; gap: 8%; }
.about-expectations__media { flex: 0 0 45%; }
.about-expectations__img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 12px 35px rgba(0,0,0,0.06); display: block; }
.about-expectations__content { flex: 0 0 45%; }
.about-expectations__title { font-size: 32px; font-weight: 700; color: var(--color-azul-oscuro); margin-bottom: 24px; line-height: 1.25; }
.about-expectations__text { font-size: 15px; color: var(--color-texto-gris); line-height: 1.7; }

/* ==========================================================================
   9. PÁGINA INTERNA: LISTADO DE BLOG (Basado en Frame 632680.jpg)
   ========================================================================== */
.blog-grid-section {
    padding: 90px 0;
    background-color: #f8fafc;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: linear-gradient(180deg, var(--color-azul-hero) 0%, var(--color-azul-oscuro) 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 64, 119, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 64, 119, 0.25);
}

.blog-card__image-wrapper {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
}

.blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__img {
    transform: scale(1.06);
}

.blog-card__content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    color: var(--color-blanco);
}

.blog-card__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.blog-card__excerpt {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 25px;
    line-height: 1.6;
    flex-grow: 1;
}

.blog-card__btn {
    background-color: var(--color-blanco);
    color: var(--color-azul-oscuro);
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.blog-card__btn:hover {
    background-color: var(--color-verde-boton);
    color: var(--color-blanco);
    transform: scale(1.02);
}

/* ==========================================================================
   10. PÁGINA INTERNA: DETALLE DEL ARTÍCULO (blog-detalle.html)
   ========================================================================== */
.internal-hero--post { padding: 16px 0 80px 0; }
.post-meta { font-size: 13px; font-weight: 600; text-transform: uppercase; color: var(--color-verde-boton); margin-bottom: 15px; letter-spacing: 1px; }

.post-container { display: flex; gap: 40px; padding: 60px 4%; background-color: var(--color-blanco); }
.post-main { flex: 0 0 68%; }
.post-main__featured-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 16px; margin-bottom: 35px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.post-main__body { font-size: 16px; color: var(--color-texto-gris); line-height: 1.8; }
.post-main__body p { margin-bottom: 24px; }
.post-main__body h2 { font-size: 24px; color: var(--color-azul-oscuro); margin: 40px 0 20px 0; font-weight: 700; }
.post-main__body blockquote { border-left: 4px solid var(--color-verde-boton); padding-left: 20px; font-style: italic; font-size: 18px; color: var(--color-azul-hero); margin: 30px 0; }
.post-main__footer { margin-top: 50px; border-top: 1px solid #edf2f7; padding-top: 25px; }
.post-main__back-btn { color: var(--color-azul-hero); text-decoration: none; font-weight: 700; font-size: 14px; transition: color 0.3s; }
.post-main__back-btn:hover { color: var(--color-verde-boton); }

/* Barra Lateral de Sugerencias */
.post-sidebar { flex: 0 0 28%; }
.post-sidebar__box { background-color: #f8fafc; padding: 30px; border-radius: 12px; position: sticky; top: 30px; }
.post-sidebar__title { font-size: 16px; color: var(--color-texto-oscuro); margin-bottom: 25px; font-weight: 700; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; }
.post-sidebar__item { display: flex; gap: 15px; text-decoration: none; margin-bottom: 20px; align-items: center; }
.post-sidebar__item:last-child { margin-bottom: 0; }
.post-sidebar__item-img { width: 65px; height: 65px; object-fit: cover; border-radius: 8px; }
.post-sidebar__item-info h4 { font-size: 13px; color: var(--color-texto-oscuro); font-weight: 700; line-height: 1.4; margin-bottom: 5px; }
.post-sidebar__item-info span { font-size: 11px; color: var(--color-texto-gris); }
.post-sidebar__item:hover h4 { color: var(--color-azul-hero); }


/* ==========================================================================
   12. MEDIA QUERIES CONSOLIDADAS Y GLOBAL RESPONSIVE
   ========================================================================== */
.burger-button { display: none; }

@media (max-width: 992px) {
    /* Menú Desplegable Móvil Lateral */
    .header { padding: 0 0 20px 0; } 
    .header__wrapper { justify-content: center; }
    .header__logo-link { display: flex; justify-content: center; margin: 0 auto; }
    .header__logo-img { max-width: 180px; }

    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--color-azul-oscuro);
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        padding: 40px;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.25);
        z-index: 998;
    }
    .header__link--highlighted { border: none; padding: 0; }
    .header__link--highlighted:hover { background-color: transparent; color: var(--color-verde-boton); transform: none; }

    /* Hamburguesa Flotante Inferior */
    .burger-button {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: fixed;
        bottom: 30px;
        right: 16px;
        width: 60px;
        height: 60px;
        background-color: var(--color-verde-boton);
        padding: 18px;
        border-radius: 50%;
        box-shadow: 0 8px 25px rgba(140, 198, 63, 0.5);
        cursor: pointer;
        z-index: 999;
        transition: all 0.3s ease;
    }
    .burger-button__line { display: block; width: 100%; height: 3px; background-color: var(--color-blanco); border-radius: 2px; transition: all 0.3s ease; transform-origin: left center; }
    
    /* Estado Abierto del Menú Móvil */
    .menu-checkbox:checked ~ .header .header__nav { right: 0; }
    .menu-checkbox:checked ~ .burger-button { background-color: #af4fd9; transform: rotate(360deg); box-shadow: 0 8px 25px rgba(217, 83, 79, 0.4); }
    .menu-checkbox:checked ~ .burger-button .burger-button__line:nth-child(1) { transform: rotate(45deg) translate(2px, -1px); }
    .menu-checkbox:checked ~ .burger-button .burger-button__line:nth-child(2) { opacity: 0; transform: scale(0); }
    .menu-checkbox:checked ~ .burger-button .burger-button__line:nth-child(3) { transform: rotate(-45deg) translate(2px, 1px); }

    /* Elementos Flex a Bloques de 1 Columna */
    .hero__wrapper, .partners__wrapper, .about-expectations__wrapper { flex-direction: column-reverse; gap: 50px; text-align: center; }
    .hero__content, .hero__media, .partners__content, .partners__media, .about-expectations__media, .about-expectations__content { flex: 0 0 100%; width: 100%; }
    
    .hero__title { font-size: 36px; }
    .hero__actions { justify-content: center; }
    
    /* Rejillas del Listado y Post de Blog */
    .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .post-container { flex-direction: column; }
    .post-main, .post-sidebar { flex: 0 0 100%; width: 100%; }
    
    .specialties__grid { grid-template-columns: repeat(2, 1fr); }
    .features__grid, .footer__grid { grid-template-columns: 1fr; }
    
    /* Ajustes menores de tipografías internas */
    .internal-hero { padding: 140px 0 70px 0; }
    .internal-hero__title { font-size: 32px; }
    .about-experience__title { font-size: 24px; }
    .about-expectations__title { font-size: 26px; }

    /* Testimonios y Marcas */
    .testimonial { flex-direction: column; }
    .testimonial__quote-side, .testimonial__image-side { flex: 0 0 100%; min-height: 320px; }
    .slider-css__track { animation-duration: 12s; }
    .brands__block { gap: 15px; }
    .brands__logo { height: 40px; max-width: 120px; }
    
    .footer__bottom-wrapper { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 600px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-card__image-wrapper { height: 200px; }
}

@media (max-width: 480px) {
    .specialties__grid { grid-template-columns: 1fr; }
    .hero__avatar-wrapper { width: 260px; height: 260px; }
    .brands__block { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; justify-items: center; }
    .brands__logo { height: 35px; max-width: 100px; }
}
/* Corrección de solapamiento para páginas internas (como detalle-blog.php) */
.internal-hero {
    padding-top: 180px !important; /* Aumenta este valor si aún se ve muy arriba */
    position: relative;
    width: 100%;
}

/* Asegurar que el contenido interno no se superponga */
.internal-hero__wrapper {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   11. COMPONENTE FOOTER
   ========================================================================== */
.footer {
    background-color: var(--color-azul-footer);
    color: var(--color-blanco);
    padding: 60px 0 20px 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer__title {
    font-size: 18px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer__list {
    list-style: none;
}

.footer__item {
    margin-bottom: 12px;
    font-size: 14px;
    opacity: 0.85;
}

/* Estilos para los campos del formulario */
.footer__input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: none;
}

.footer__btn {
    background-color: var(--color-verde-boton);
    color: var(--color-blanco);
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
}

.footer__bottom-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-blanco);
}



/*ESPECIALIDADES-----------------------*/

/* Corrección de capas para el Menú Móvil */
@media (max-width: 992px) {
    .header__nav { z-index: 2000 !important; }
    .burger-button { z-index: 2001 !important; }
}

/* Componente Acordeón de Especialidades */
.specialties-section { padding: 80px 0; background-color: #f9f9f9; }
.accordion { display: flex; flex-direction: column; gap: 15px; max-width: 900px; margin: 0 auto; }
.accordion__item { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #fff; transition: all 0.3s ease; }
.accordion__input { display: none; }
.accordion__label { display: flex; justify-content: space-between; align-items: center; padding: 24px; font-weight: 800; cursor: pointer; background: #fff; }
.accordion__label span { font-weight: 400; color: var(--color-texto-gris); font-size: 14px; margin-left: 10px; }
.accordion__label::after { content: '+'; font-size: 20px; color: var(--color-azul-hero); }
.accordion__content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-in-out; padding: 0 24px; color: var(--color-texto-gris); line-height: 1.7; }
.accordion__input:checked ~ .accordion__content { max-height: 500px; padding: 20px 24px; }
.accordion__input:checked ~ .accordion__label::after { content: '-'; }

/* Estilo del botón dentro de cada acordeón */
.accordion__btn-cita {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 25px;
    background-color: var(--color-azul-hero);
    color: var(--color-blanco);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid var(--color-azul-hero);
}

.accordion__btn-cita:hover {
    background-color: var(--color-blanco);
    color: var(--color-azul-hero);
}

/* Ajuste de formato para el contenido del acordeón */
.accordion__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}













/* ==========================================================================
   X. COMPONENTE: CARRUSEL FOTOGRÁFICO DE ALIADOS (Bucle Matemático Perfecto)
   ========================================================================== */
:root {
    /* Definimos variables para calcular el movimiento exacto sin fallas de píxeles */
    --gallery-item-width: 340px;
    --gallery-item-height: 520px;
    --gallery-gap: 24px;
    --gallery-items-count: 4; /* Cambia este número si pones más o menos imágenes originales */
}

.partners-gallery {
    padding: 0 0 70px 0;
    background-color: var(--color-blanco);
    width: 100%;
    overflow: hidden;
}

.partners-gallery__slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.partners-gallery__track {
    display: flex;
    width: max-content;
    gap: var(--gallery-gap);
    /* Forzamos renderizado por hardware para eliminar micro-tirones */
    will-change: transform;
    transform: translate3d(0, 0, 0);
    animation: perfectInfinitePan 30s linear infinite;
}

/* Pausa fluida al pasar el mouse por encima */
.partners-gallery__slider:hover .partners-gallery__track {
    animation-play-state: paused;
}

.partners-gallery__item {
    width: var(--gallery-item-width);       
    height: var(--gallery-item-height);
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f4f6f8;
}

.partners-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;   
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.partners-gallery__item:hover img {
    transform: scale(1.04);
}

/* ANIMACIÓN MATEMÁTICA DEFINITIVA */
@keyframes perfectInfinitePan {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        /* Se desplaza el ancho exacto de las imágenes originales más sus respectivos gaps */
        transform: translate3d(calc(-1 * (var(--gallery-item-width) + var(--gallery-gap)) * var(--gallery-items-count)), 0, 0);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN (Ajustes de escala proporcionales)
   ========================================================================== */
@media (max-width: 992px) {
    :root {
        --gallery-item-width: 280px;
        --gallery-item-height: 420px;
        --gallery-gap: 16px;
    }
}

@media (max-width: 768px) {
    :root {
        --gallery-item-width: 210px;
        --gallery-item-height: 320px;
        --gallery-gap: 12px;
    }
    .partners-gallery__track {
        animation-duration: 20s; /* Más rápido en móviles porque hay menos distancia que recorrer */
    }
}
