/* ==========================================================================
   CSS de Características - Mi Agenda Clínica
   Diseño Premium, Moderno y Responsivo con Soporte de Temas Claro/Oscuro
   ========================================================================== */

@font-face {
    font-family: 'Material Icons Round';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('../fonts/material-icons-round.woff2') format('woff2');
}

.material-icons-round {
    font-family: 'Material Icons Round';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga', 'rlig';
}

/* ─── Variables de Diseño ─── */
:root {
    /* Tema Claro (Default) */
    --primary: #008ACA;
    --primary-hover: #0076DB;
    --accent: #00E1D9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    
    /* Sombras y Radios */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    
    /* Degradados */
    --gradient-hero: linear-gradient(135deg, #008ACA 0%, #005cbf 100%);
    --gradient-glow: radial-gradient(circle, rgba(0, 138, 202, 0.15) 0%, rgba(0, 138, 202, 0) 70%);
}

/* Tema Oscuro */
body.dark {
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --bg-main: #0b111e;
    --bg-card: #151f32;
    --border-color: #1e293b;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --gradient-glow: radial-gradient(circle, rgba(0, 138, 202, 0.25) 0%, rgba(0, 138, 202, 0) 70%);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

/* ─── Configuración General ─── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-secondary);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    font-weight: 700;
}

p {
    line-height: 1.6;
}

/* ─── Layout & Contenedores ─── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 80px 0;
    position: relative;
}

/* ─── Botones ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 138, 202, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 138, 202, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

/* ─── Header de Navegación ─── */
.header-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: background-color 0.3s, border-color 0.3s;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo svg {
    width: 40px;
    height: 40px;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.footer-brand .logo img {
    height: 36px;
}

.logo span {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Switch de Modo Oscuro */
.theme-switch {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.theme-switch:hover {
    background-color: var(--border-color);
    color: var(--primary);
}

.theme-switch .sun-icon { display: none; }
.theme-switch .moon-icon { display: block; }
body.dark .theme-switch .sun-icon { display: block; }
body.dark .theme-switch .moon-icon { display: none; }

/* ─── Hero Section ─── */
.hero {
    overflow: hidden;
    padding-top: 100px;
    padding-bottom: 80px;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: var(--gradient-glow);
    top: -10%;
    right: -10%;
    pointer-events: none;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 48px;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-content h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 36px;
}

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

.hero-visual {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-mockup-wrapper {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 100%;
    width: 500px;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.hero-mockup-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-mockup-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
}

/* ─── Sección de Características (Tabs) ─── */
.features-section {
    background-color: var(--bg-card);
    transition: background-color 0.3s;
}

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

.section-header h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Barra de pestañas */
.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 138, 202, 0.2);
}

/* Contenido de pestañas */
.tab-content {
    display: none;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.tab-content.active {
    display: grid;
    animation: fadeInUp 0.4s ease forwards;
}

.tab-text-content h3 {
    font-size: 28px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-text-content h3 span.icon {
    color: var(--primary);
}

.tab-text-content p {
    font-size: 15px;
    margin-bottom: 24px;
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.feature-list li span.material-icons-round {
    color: var(--primary);
    font-size: 20px;
    margin-top: 1px;
}

.feature-list li span.desc {
    font-weight: normal;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
    font-size: 13px;
}

.tab-visual-content {
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 16px;
    box-shadow: var(--shadow-lg);
}

.tab-visual-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    display: block;
}

/* ─── Sección de Cumplimiento Legal (Chile) ─── */
.compliance-section {
    background: var(--bg-main);
}

.compliance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.compliance-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.compliance-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
}

.compliance-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.compliance-card .card-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 138, 202, 0.1);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.compliance-card .card-icon span {
    font-size: 28px;
}

.compliance-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.compliance-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
}

.compliance-badge {
    background: #ef4444;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
}

/* ─── Sección de Chat & Colaboración ─── */
.chat-section {
    background: var(--bg-card);
}

.chat-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: center;
}

/* Chat Widget Mockup */
.chat-widget-mockup {
    width: 100%;
    max-width: 400px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    margin: 0 auto;
}

.chat-widget-header {
    background: var(--primary);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-title h4 {
    color: white;
    font-size: 14px;
    margin: 0;
}

.chat-title span {
    font-size: 11px;
    opacity: 0.8;
}

.chat-body {
    padding: 16px;
    height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.4;
}

.chat-msg.received {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
}

.chat-msg.sent {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-msg .time {
    display: block;
    font-size: 9px;
    text-align: right;
    margin-top: 4px;
    opacity: 0.6;
}

.chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input-area input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    outline: none;
    background: var(--bg-main);
    color: var(--text-primary);
}

.chat-input-area button {
    background: var(--primary);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.chat-input-area button:hover {
    background: var(--primary-hover);
}

/* ─── Sección de FAQ (Preguntas Frecuentes) ─── */
.faq-section {
    background: var(--bg-main);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 24px;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.faq-question span.material-icons-round {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.faq-item.active {
    border-color: var(--primary);
}

.faq-item.active .faq-question span.material-icons-round {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-inner {
    padding: 0 24px 24px 24px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ─── Call to Action (CTA) Final ─── */
.cta-section {
    background: var(--gradient-hero);
    color: white;
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-section h2 {
    color: white;
    font-size: 40px;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.cta-buttons .btn-secondary {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.cta-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cta-buttons .btn-light {
    background: white;
    color: var(--primary);
}

.cta-buttons .btn-light:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* ─── Footer ─── */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    transition: background-color 0.3s;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand p {
    font-size: 13.5px;
    margin-top: 16px;
    color: var(--text-secondary);
    max-width: 250px;
}

.footer-col h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 16px;
}

/* ─── Animaciones ─── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Responsividad (Media Queries) ─── */
@media (max-width: 992px) {
    section {
        padding: 60px 0;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 38px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-mockup-wrapper {
        transform: none;
    }
    
    .hero-mockup-wrapper:hover {
        transform: scale(1.02);
    }
    
    .tab-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .compliance-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .chat-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .tabs-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 4px 4px 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .tabs-nav::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    .tab-btn {
        flex-shrink: 0;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn,
    .hero-buttons button.btn {
        width: 100%;
    }
    
    .tab-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ─── Modal de Registro Demo ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    padding: 36px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.modal-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    background: var(--bg-main);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 138, 202, 0.1);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Spinner animado */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Banner Traspaso + Prueba ─── */
.migration-banner {
    background: linear-gradient(135deg, #0c4a6e 0%, #008ACA 55%, #00a8e8 100%);
    color: white;
    padding: 48px 0;
}

.migration-banner-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
}

.migration-banner h2 {
    color: white;
    font-size: 34px;
    line-height: 1.2;
    margin-bottom: 14px;
}

.migration-banner h2 span {
    color: #fde047;
}

.migration-banner .lead {
    font-size: 17px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 24px;
}

.trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(253, 224, 71, 0.2);
    border: 1px solid rgba(253, 224, 71, 0.5);
    color: #fef9c3;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.migration-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

/* Carrusel superior Traspaso ↔ Hero */
.top-carousel {
    position: relative;
}

.top-carousel-viewport {
    overflow: hidden;
}

.top-carousel-track {
    display: flex;
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
}

.top-carousel .hero {
    padding-top: 100px;
    padding-bottom: 80px;
}

.top-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px 24px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.top-carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.top-carousel-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.top-carousel-dots {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.top-carousel-dot {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}

.top-carousel-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.top-carousel-dot:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

/* Carrusel de software (Dentalink, CIMADent…) */
.software-carousel-label {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.software-carousel {
    position: relative;
    height: 44px;
    overflow: hidden;
}

.software-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #fde047;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.software-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.migration-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 14px;
}

.migration-item .material-icons-round {
    font-size: 20px;
    color: #fde047;
    flex-shrink: 0;
}

.migration-banner .btn-trial {
    background: #fde047;
    color: #0c4a6e;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.migration-banner .btn-trial:hover {
    background: #facc15;
    transform: translateY(-2px);
}

.migration-free-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
}

.migration-free-card .big-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(253, 224, 71, 0.25);
    color: #fde047;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.migration-free-card h3 {
    color: white;
    font-size: 22px;
    margin-bottom: 8px;
}

.migration-free-card p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

@media (max-width: 992px) {
    .migration-banner-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .migration-items {
        grid-template-columns: 1fr;
    }

    .migration-banner h2 {
        font-size: 28px;
    }
}

/* ─── Sección de Precios ─── */
.pricing-section {
    padding: 64px 0;
    background: var(--bg-main);
}

.pricing-wrapper {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 40px 36px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.pricing-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #00a8e8 50%, #fde047 100%);
}

.pricing-launch-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 28px;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.pricing-launch-ribbon .material-icons-round {
    font-size: 18px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 32px;
}

.pricing-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.pricing-amount {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    line-height: 1;
    margin-bottom: 16px;
}

.pricing-amount .currency {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 10px;
}

.pricing-amount .price {
    font-family: 'Outfit', sans-serif;
    font-size: 64px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -2px;
}

.pricing-amount .period {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    align-self: flex-end;
    margin-bottom: 10px;
    margin-left: 4px;
}

.pricing-sub {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 420px;
}

.pricing-cta {
    padding: 14px 28px;
    font-size: 15px;
}

.pricing-highlight {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid rgba(0, 138, 202, 0.2);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
}

.pricing-highlight-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(0, 138, 202, 0.25);
}

.pricing-highlight h3 {
    font-size: 22px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.pricing-highlight h3 span {
    color: var(--primary);
}

.pricing-highlight p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.pricing-doctors-visual {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.doctor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #bae6fd;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.doctor-avatar .material-icons-round {
    font-size: 20px;
}

.doctor-avatar.featured {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 138, 202, 0.35);
}

.doctors-caption {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: white;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #bae6fd;
}

.pricing-perks {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
}

.pricing-perks li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pricing-perks .material-icons-round {
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ─── Grid de Módulos ─── */
.modules-section {
    background: var(--bg-main);
}

/* Filtro de Módulos */
.modules-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13.5px;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 138, 202, 0.25);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 138, 202, 0.3);
}

.module-card .module-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.module-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.module-card p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
    flex: 1;
}

.module-card .module-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    width: fit-content;
}

.module-tag.live {
    background: #dcfce7;
    color: #15803d;
}

.module-tag.legal {
    background: #ede9fe;
    color: #6d28d9;
}

/* ─── Flujo de Cobro ─── */
.flow-section {
    background: var(--bg-card);
}

.flow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.flow-step {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    position: relative;
}

.flow-step .num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 800;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.flow-step strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.flow-step span {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* ─── Tecnología ─── */
.tech-section {
    background: var(--bg-main);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    gap: 18px;
}

.tech-card .tech-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(0, 138, 202, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tech-card h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

.tech-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.tech-card ul {
    list-style: none;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tech-card ul li {
    font-size: 12.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tech-card ul li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/* ─── Menú Móvil ─── */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.mobile-menu-btn:hover {
    background: var(--border-color);
}

.mobile-nav {
    display: none;
    position: fixed;
    inset: 70px 0 0 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    z-index: 99;
    padding: 24px;
    flex-direction: column;
    gap: 8px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.mobile-nav.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.mobile-nav a:hover {
    background: var(--bg-main);
    color: var(--primary);
}

/* ─── Animación al scroll ─── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive final (después de estilos de precios y menú móvil) ─── */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .pricing-perks {
        grid-template-columns: 1fr;
    }

    .pricing-amount .price {
        font-size: 52px;
    }

    .pricing-wrapper {
        padding: 36px 24px 28px;
    }
}

@media (max-width: 576px) {
    .pricing-amount .price {
        font-size: 42px;
    }

    .pricing-cta {
        display: block;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .header-actions .btn {
        display: none;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

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

/* ─── Landing compartido (nav CTA, pricing cards, hero, trial) ─── */
.nav-register-link {
    background: linear-gradient(135deg, #008ACA, #0076DB);
    color: #fff !important;
    padding: 7px 16px !important;
    border-radius: 20px;
    font-weight: 700 !important;
    font-size: 13px;
    letter-spacing: 0.01em;
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
}
.nav-register-link:hover { opacity: 0.9; transform: scale(1.03); }
.pricing-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 768px) { .pricing-dual-grid { grid-template-columns: 1fr; } }
.pricing-plan-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.pricing-plan-card.featured {
    border-color: #008ACA;
    box-shadow: 0 12px 32px rgba(0, 138, 202, 0.15);
}
.pricing-plan-card .plan-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #008ACA;
    background: #e0f2fe;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.pricing-plan-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}
.pricing-plan-card .amount-block { margin: 4px 0 0; }
.pricing-plan-card .amount-was {
    font-size: 16px;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: line-through;
    line-height: 1.2;
    margin-bottom: 6px;
}
.pricing-plan-card .amount-discount {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    white-space: nowrap;
}
.pricing-plan-card .amount { font-size: 40px; font-weight: 800; color: #0076DB; line-height: 1; }
.pricing-plan-card .amount small { font-size: 16px; font-weight: 600; color: #64748b; }
.pricing-plan-card p { color: #64748b; font-size: 14px; line-height: 1.5; margin: 12px 0 20px; }
.landing-hero {
    padding: 72px 0 48px;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 70%);
    position: relative;
    overflow: hidden;
}
.landing-hero .hero-content { max-width: 720px; margin: 0 auto; text-align: center; }
.landing-hero h1 {
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    margin: 0 0 16px;
}
.landing-hero h1 span { color: #0076DB; }
.landing-hero .lead {
    font-size: 17px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 28px;
}
.landing-hero .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.landing-trial {
    padding: 48px 0 72px;
    background: #fff;
}
.landing-trial-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 36px 28px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
}
.landing-trial-card h2 {
    font-family: Outfit, Inter, sans-serif;
    font-size: 24px;
    margin: 0 0 12px;
    color: #0f172a;
}
.landing-trial-card p { color: #475569; line-height: 1.6; margin: 0 0 20px; }
.page-main { padding-top: 24px; }
