/* ===========================
   DESIGN TOKENS
=========================== */
:root {
    --color-primary-teal: #1C8C87;
    --color-secondary-mint: #2FA7A0;
    --color-accent-teal: #4FC1B8;
    --color-soft-aqua: #7EDAD1;
    --color-bg-base: #F2F2F2;
    --color-bg-cards: #ffffff;
    --color-hero-dark: #0B0F19;
    --color-text-dark: #1a1a1a;
    --color-text-light: #f9f9f9;

    --font-primary: 'Lato', sans-serif;
    --font-interface: 'Inter', sans-serif;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.07);
    --border-radius: 14px;
    --navbar-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-base);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

h1, h2, h3, h4 {
    font-family: var(--font-interface);
    font-weight: 700;
}

/* ===========================
   NAVBAR
=========================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: var(--navbar-height);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Logo */
.logo-badge {
    background: white;
    padding: 8px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    height: 48px;
    flex-shrink: 0;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-badge:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 24px rgba(28, 140, 135, 0.18);
}

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

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a:not(.btn-pill) {
    color: var(--color-text-dark);
    text-decoration: none;
    font-family: var(--font-interface);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
    position: relative;
    white-space: nowrap;
}

.nav-links a:not(.btn-pill)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary-teal);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:not(.btn-pill):hover {
    opacity: 1;
    color: var(--color-primary-teal);
}

.nav-links a:not(.btn-pill):hover::after {
    width: 100%;
}

/* CTA Button in nav */
.btn-pill {
    background: var(--color-primary-teal);
    color: #fff !important;
    padding: 10px 26px !important;
    border-radius: 50px;
    font-family: var(--font-interface);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(28, 140, 135, 0.25);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    margin-left: 8px;
}

.btn-pill:hover {
    background: var(--color-secondary-mint);
    box-shadow: 0 8px 22px rgba(28, 140, 135, 0.35);
    transform: translateY(-1px);
}

/* ===========================
   HAMBURGER BUTTON
=========================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s;
    z-index: 2100;
    flex-shrink: 0;
}

.hamburger:hover {
    background: rgba(28, 140, 135, 0.08);
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text-dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1900;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.show {
    display: block;
    opacity: 1;
}

/* ===========================
   SECTION BADGE
=========================== */
.section-badge {
    background: #e6f3f2;
    color: var(--color-primary-teal);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 16px;
}

/* ===========================
   HERO
=========================== */
.hero {
    background-color: var(--color-hero-dark);
    color: var(--color-text-light);
    min-height: 95vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 120px 24px;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(11, 15, 25, 0.45) 0%, rgba(11, 15, 25, 0.75) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    max-width: 900px;
}

.hero h1 span {
    display: block;
    color: var(--color-secondary-mint);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
    display: inline-block;
    padding: 13px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-family: var(--font-interface);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary-teal);
    color: white;
    box-shadow: 0 4px 14px rgba(28, 140, 135, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-secondary-mint);
    box-shadow: 0 6px 20px rgba(28, 140, 135, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: white;
}

.btn-outline:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.07);
}

/* ===========================
   LAYOUT
=========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

/* Plans Carousel specifically for mobile */
.plans-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 18px;
    margin-top: -18px;
}

.carousel-btn {
    display: none; /* Hidden on desktop */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: white;
    color: var(--color-primary-teal);
    border: 2px solid var(--color-primary-teal);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    z-index: 100;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    font-size: 1.2rem;
    font-weight: bold;
}

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

.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }

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

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

    .plans-carousel-container {
        padding: 18px 10px 10px 10px;
        margin-top: -18px;
    }

    .carousel-btn {
        display: flex;
    }

    .carousel-track {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        padding: 10px 0;
    }

    .carousel-track::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .carousel-track .card {
        flex: 0 0 100%;
        scroll-snap-align: center;
        margin: 0;
    }
}

/* ===========================
   CARDS
=========================== */
.card {
    background: var(--color-bg-cards);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(28, 140, 135, 0.1);
}

.card-icon-top {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 20px;
    text-align: center;
}

.feature-list {
    text-align: left;
    list-style: none;
    font-size: 1rem;
    margin-bottom: 30px;
    padding: 0;
}

.feature-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #444;
}

.feature-list li i {
    font-size: 1rem;
    color: var(--color-primary-teal);
    font-style: normal;
    flex-shrink: 0;
}

/* Featured / Recommended card */
.card-featured {
    border: 2px solid var(--color-primary-teal);
    box-shadow: 0 8px 40px rgba(28, 140, 135, 0.15);
    position: relative;
    z-index: 2;
}

.card-featured::before {
    content: '⭐ Más popular';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #0B6B67;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 5px 18px;
    border-radius: 50px;
    white-space: nowrap;
    font-family: var(--font-interface);
    box-shadow: 0 4px 12px rgba(11, 107, 103, 0.35);
    z-index: 10;
}

/* ===========================
   ABOUT SECTION
=========================== */
.about-grid {
    display: flex;
    align-items: center;
    gap: 80px;
    flex-wrap: wrap;
}

.about-content {
    flex: 1.2;
    min-width: 300px;
}

.about-media {
    flex: 1;
    min-width: 280px;
    position: relative;
    overflow: visible;
}

.doctor-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background: linear-gradient(145deg, #e6f3f2 0%, #d0eeec 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(28, 140, 135, 0.1);
    box-shadow: 0 20px 60px rgba(28, 140, 135, 0.12);
}

.doctor-emoji {
    font-size: 7rem;
    line-height: 1;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.1));
    animation: float 4s ease-in-out infinite;
}

.brand-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 80px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ===========================
   FAQ
=========================== */
.faq-section {
    background: white;
    padding: 100px 5%;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.accordion-title {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-family: var(--font-interface);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-dark);
    cursor: pointer;
    text-align: left;
    padding: 22px 0;
    gap: 16px;
    transition: color 0.2s;
}

.accordion-title:hover {
    color: var(--color-primary-teal);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    font-size: 0.95rem;
    opacity: 0.75;
    line-height: 1.7;
}

.accordion-item.active .accordion-content {
    max-height: 400px;
    padding-bottom: 22px;
}

.accordion-icon {
    font-size: 0.8rem;
    color: var(--color-primary-teal);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-item.active .accordion-title {
    color: var(--color-primary-teal);
}

/* ===========================
   ANIMATIONS
=========================== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ===========================
   DASHBOARD / APP STYLES
=========================== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--color-hero-dark);
    color: white;
    padding: 40px 20px;
}

.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.nav-item {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(106, 185, 177, 0.2);
    color: var(--color-secondary-mint);
}

.module-header {
    margin-bottom: 30px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active  { background: #e6f7f5; color: #04748d; }
.status-pending { background: #fff5eb; color: #975a16; }

/* Mobile dashboard bars */
.top-bar {
    display: none;
    background: var(--color-primary-teal);
    color: white;
    padding: 12px 20px;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
}

.bottom-nav {
    display: none;
    background: var(--color-bg-cards);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 70px;
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    color: #666;
    text-decoration: none;
    gap: 4px;
}

.bottom-nav-item i { font-size: 1.4rem; }
.bottom-nav-item.active { color: var(--color-primary-teal); }

/* ===========================
   RESPONSIVE — TABLET
=========================== */
@media (max-width: 960px) {
    .hero h1 {
        font-size: 3.2rem;
    }

    .about-grid {
        gap: 48px;
    }
}

/* ===========================
   RESPONSIVE — MOBILE
=========================== */
@media (max-width: 768px) {

    /* Hamburger visible */
    .hamburger {
        display: flex;
    }

    /* Mobile Nav Drawer */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100dvh;
        width: min(320px, 85vw);
        background: white;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: calc(var(--navbar-height) + 20px) 32px 40px;
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        overflow-y: auto;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a:not(.btn-pill) {
        font-size: 1.15rem;
        opacity: 0.85;
        padding: 16px 0;
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .nav-links a:not(.btn-pill):last-of-type {
        border-bottom: none;
    }

    .nav-links .btn-pill {
        margin-left: 0;
        margin-top: 28px;
        width: 100%;
        text-align: center;
        padding: 14px 28px !important;
        font-size: 1rem;
    }

    /* Hero */
    .hero {
        min-height: 100dvh;
        padding: 80px 20px;
    }

    .hero h1 {
        font-size: 2.4rem;
        line-height: 1.2;
    }

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

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }



    /* Card featured — no transform scale on mobile */
    .card-featured {
        order: -1; /* Show recommended first */
    }

    /* About — stack vertically on mobile */
    .about-grid {
        flex-direction: column;
        gap: 40px;
        align-items: stretch;
    }

    .about-content {
        min-width: unset;
        width: 100%;
    }

    .about-media {
        min-width: unset;
        width: 100%;
        overflow: hidden; /* clip the decorative circle */
    }

    /* Hide decorative absolute circle on mobile to prevent overflow */
    .about-media > div[style*="position: absolute"] {
        display: none;
    }

    .doctor-placeholder {
        aspect-ratio: 3/2; /* wider, shorter on mobile */
        border-radius: 16px;
    }

    .doctor-emoji {
        font-size: 4.5rem;
    }

    /* Container padding */
    .container {
        padding: 60px 20px;
    }

    /* FAQ */
    .faq-section {
        padding: 70px 24px;
    }

    .accordion-title {
        font-size: 0.98rem;
        padding: 18px 0;
    }

    /* Contact section title */
    #contacto h2 {
        font-size: 2rem !important;
    }

    /* Dashboard */
    .dashboard-layout {
        flex-direction: column;
        padding-top: 50px;
        padding-bottom: 70px;
    }

    .sidebar {
        display: none;
    }

    .top-bar  { display: flex; }
    .bottom-nav { display: flex; }

    .main-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .card {
        padding: 28px 24px;
    }
}

/* ===========================
   EXTRA ANIMATIONS
=========================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

