/* ==========================================================================
   VARIABLES Y CONFIGURACIÓN GENERAL
   ========================================================================== */
:root {
    --bg-header: #0F5132;
    --bg-footer: #083822;
    --color-accent: #198754;
    --color-accent-hover: #146C43;
    --color-accent-light: #20C997;
    --color-mint-soft: #E8F5E9;
    --bg-light: #F4F9F6;
    --bg-light-alt: #EDF5F0;
    --text-dark: #152520;
    --text-muted: #52605B;
    --border-color: #E2ECE6;
    --white: #FFFFFF;
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 2px 8px rgba(15, 81, 50, 0.05);
    --shadow-md: 0 10px 30px rgba(15, 81, 50, 0.08);
    --shadow-lg: 0 18px 45px rgba(15, 81, 50, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

section[id] {
    scroll-margin-top: 90px;
}

/* ==========================================================================
   TOP BAR & NAVBAR (RESPONSIVE)
   ========================================================================== */
.top-bar {
    background-color: #0B3C25;
    color: var(--white);
    font-size: clamp(0.55rem, 2.5vw, 0.78rem);
    text-align: center;
    padding: 7px 10px;
    font-weight: 600;
    letter-spacing: -0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.navbar {
    background-color: var(--bg-header);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo:hover {
    transform: translateY(-1px);
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    transition: height 0.3s ease;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.doctor-name {
    color: var(--white);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.doctor-spec {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.5px;
    margin-top: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    transition: opacity 0.2s, transform 0.2s;
    display: inline-block;
}

.nav-links a:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--white);
    align-items: center;
    justify-content: center;
}

.menu-toggle svg {
    width: 28px;
    height: 28px;
    stroke: var(--white);
}

.icon-close {
    display: none;
}

.menu-toggle.active .icon-hamburger {
    display: none;
}

.menu-toggle.active .icon-close {
    display: block;
}

/* ==========================================================================
   BOTONES Y COMPONENTES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.5px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    cursor: pointer;
}

.btn:active {
    transform: scale(0.98) !important;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.25);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(25, 135, 84, 0.35);
}

.btn-primary-nav {
    background-color: var(--color-accent-light);
    color: var(--bg-header);
    padding: 9px 18px;
    box-shadow: 0 2px 8px rgba(32, 201, 151, 0.2);
}

.btn-primary-nav:hover {
    background-color: #1baa80;
    transform: translateY(-2px);
    color: #072e1c;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 1.5px solid #CED4DA;
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
}

.full-width {
    width: 100%;
}

.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent-light);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: 70px 0 80px;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--white) 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(25, 135, 84, 0.12);
    color: var(--color-accent);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.badge-pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-accent);
}

.hero h1 {
    font-size: 2.6rem;
    color: var(--bg-header);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 18px;
}

.hero h1 span {
    color: var(--color-accent);
}

.hero-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.trust-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.84rem;
    color: var(--text-dark);
    font-weight: 600;
}

.trust-pill-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    letter-spacing: 0.2px;
}

.interactive-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.interactive-card:hover {
    transform: translateY(-6px);
}

.interactive-card:hover .hero-img {
    box-shadow: var(--shadow-lg);
}

.interactive-card:hover .hero-credential {
    border-left-color: var(--color-accent-light);
    background-color: #FAFFFC;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px 12px 0 0;
    box-shadow: var(--shadow-md);
    object-fit: cover;
    transition: box-shadow 0.3s ease;
}

.hero-credential {
    background: var(--white);
    padding: 14px 18px;
    border-radius: 0 0 12px 12px;
    border-left: 4px solid var(--color-accent);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    transition: all 0.3s ease;
}

.hero-credential strong {
    color: var(--bg-header);
    font-size: 0.95rem;
}

.hero-credential span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   SECCIONES GENERALES
   ========================================================================== */
.section {
    padding: 70px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-light-alt {
    background-color: var(--bg-light-alt);
}

.section-title {
    text-align: center;
    margin-bottom: 45px;
}

.section-title h2 {
    font-size: 2.1rem;
    color: var(--bg-header);
    font-weight: 800;
}

.section-title p {
    color: var(--text-muted);
}

.about-info-card {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.about-info-card h2 {
    font-size: 2rem;
    color: var(--bg-header);
    margin: 10px 0 20px;
    font-weight: 800;
}

.about-info-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.credentials-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.credential-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background-color: var(--bg-light);
    padding: 18px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.cred-icon {
    font-size: 1.5rem;
}

.credential-item strong {
    color: var(--bg-header);
    font-size: 0.95rem;
    display: block;
}

.credential-item p {
    font-size: 0.85rem;
    margin-bottom: 0;
    color: var(--text-muted);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.align-center {
    align-items: stretch;
}

/* ==========================================================================
   TARJETAS BENEFICIOS & CÓMO FUNCIONA
   ========================================================================== */
.card-feature, .step-card {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.card-header-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.icon-wrapper {
    font-size: 1.75rem;
    line-height: 1;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.step-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-accent-light);
    line-height: 1;
    flex-shrink: 0;
}

.card-feature h3, .step-card h3 {
    font-size: 1.15rem;
    color: var(--bg-header);
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.card-feature p, .step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   TARIFAS Y MEDIOS DE PAGO
   ========================================================================== */
.pricing-card {
    background: var(--white);
    padding: 35px 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pricing-card.highlighted {
    border: 2px solid var(--color-accent);
}

.pricing-card h3 {
    font-size: 1.3rem;
    color: var(--bg-header);
    margin-bottom: 10px;
}

.price-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: -8px;
    margin-bottom: 8px;
}

.price {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--color-accent);
    margin: 15px 0;
}

.price span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pricing-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.payment-box {
    margin-top: 25px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 20px 25px;
    border-radius: 10px;
    text-align: center;
}

.payment-box h4 {
    color: var(--bg-header);
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.payment-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   FAQ & CALENDARIO
   ========================================================================== */
.faq-heading {
    font-size: 2.3rem;
    color: #0d4229;
    font-weight: 800;
    margin-bottom: 8px;
}

.faq-subheading {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.faq-accordion {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid #E2ECE6;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    overflow: hidden;
    transition: all 0.25s ease;
}

.faq-item:hover {
    border-color: #B2D8C6;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 22px 28px;
    text-align: left;
    font-size: 1.08rem;
    font-weight: 700;
    color: #0D4229;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: var(--font-family);
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background-color: rgba(232, 245, 233, 0.3);
}

.faq-toggle-icon {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0D4229;
    line-height: 1;
    margin-left: 15px;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, padding 0.25s ease;
    padding: 0 28px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 28px 22px 28px;
}

.faq-answer p {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

.calendar-embed-container {
    width: 100%;
    min-height: 700px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: var(--bg-footer);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 50px;
    margin-bottom: 30px;
}

.footer-brand h3 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.footer-subtitle {
    color: var(--color-accent-light);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.disclaimer {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

.disclaimer strong {
    color: var(--white);
}

.footer-nav h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--white);
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-nav a:hover {
    color: var(--color-accent-light);
    transform: translateX(4px);
}

.footer-copy {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 20px;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   BOTONES FLOTANTES (DESKTOP)
   ========================================================================== */
.floating-btn {
    position: fixed;
    right: 25px;
    color: #FFF;
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.floating-btn:hover {
    transform: translateY(-3px) scale(1.03);
}

.whatsapp-float {
    bottom: 25px;
    background-color: #25D366;
}

.whatsapp-float:hover {
    background-color: #20ba5a;
}

.turnos-float {
    bottom: 85px;
    background-color: var(--bg-header);
    border: 1.5px solid var(--color-accent-light);
}

.turnos-float:hover {
    background-color: #0b3c25;
}

.whatsapp-text, .turnos-text {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (OPTIMIZADO PARA MOBILE & IPHONE SE)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-content {
        text-align: center;
    }

    .badge-pill {
        margin: 0 auto 14px auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .trust-pills {
        justify-content: center;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    section[id] {
        scroll-margin-top: 65px;
    }

    /* Top Bar fluida sin cortes */
    .top-bar {
        font-size: clamp(0.58rem, 2.2vw, 0.72rem);
        padding: 6px 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        letter-spacing: -0.2px;
    }

    .nav-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    /* Logo y encabezado alineados al centro en mobile */
    .brand-logo {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin: 0 auto;
    }

    .logo-img {
        height: 36px;
    }

    .logo-text {
        align-items: center;
        text-align: center;
    }

    .doctor-name {
        font-size: 0.95rem;
        letter-spacing: 0.3px;
        text-align: center;
    }

    .doctor-spec {
        font-size: 0.62rem;
        letter-spacing: 0.4px;
        text-align: center;
        margin-top: 1px;
    }

    .menu-toggle {
        display: flex;
        position: absolute;
        right: 0;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #0B3C25;
        flex-direction: column;
        padding: 14px 16px;
        gap: 10px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 6px 0;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
    }

    /* Compactación vertical de secciones */
    .hero {
        padding: 20px 0 25px;
    }

    .hero h1 {
        font-size: 1.75rem;
        margin-bottom: 10px;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 0.98rem;
        margin-bottom: 16px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 16px;
    }

    .hero-actions .btn {
        width: 100%;
        padding: 10px 16px;
    }

    .section {
        padding: 24px 0;
    }

    .section-title {
        margin-bottom: 16px;
    }

    .section-title h2, 
    .about-info-card h2, 
    .faq-heading {
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-feature, .step-card {
        padding: 16px 14px;
    }

    .card-header-inline {
        gap: 8px;
        margin-bottom: 6px;
    }

    .about-info-card {
        padding: 18px 14px;
    }

    .payment-box {
        margin-top: 14px;
        padding: 14px;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 0.92rem;
    }

    .faq-answer {
        padding: 0 16px;
    }

    .faq-item.active .faq-answer {
        padding: 0 16px 14px 16px;
    }

    .calendar-embed-container {
        min-height: 520px;
    }

    .footer {
        padding: 24px 0 12px;
    }

    .footer-grid {
        gap: 16px;
        margin-bottom: 14px;
    }

    .footer-copy {
        padding-top: 12px;
        font-size: 0.72rem;
    }

    /* REDISEÑO DE BOTONES FLOTANTES EN MOBILE */
    .whatsapp-text, .turnos-text {
        display: none;
    }

    .floating-btn {
        width: 48px;
        height: 48px;
        padding: 0;
        border-radius: 50%;
        right: 16px;
        justify-content: center;
        align-items: center;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    }

    .whatsapp-float {
        bottom: 20px;
    }

    .turnos-float {
        bottom: 80px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        font-size: clamp(0.52rem, 2.7vw, 0.68rem);
        padding: 5px 4px;
        letter-spacing: -0.3px;
    }

    .doctor-name {
        font-size: 0.88rem;
    }

    .doctor-spec {
        font-size: 0.58rem;
    }

    .hero h1 {
        font-size: 1.55rem;
    }

    .trust-pills {
        gap: 8px;
    }

    .trust-pill-item {
        padding: 4px 10px;
        font-size: 0.78rem;
    }

    .pricing-card {
        padding: 18px 14px;
    }

    .price {
        font-size: 1.8rem;
        margin: 8px 0;
    }

    .floating-btn {
        width: 46px;
        height: 46px;
        right: 14px;
    }

    .turnos-float {
        bottom: 74px;
    }
}