/* ==========================================================================
   CSS Variables & Tokens
   ========================================================================== */
:root {
    /* Colors */
    --primary-500: #506CF8;
    --primary-400: #65A8FB;
    --primary-600: #3D93FF;
    --primary-700: #1678F2;

    --neutral-900: #000000;
    --neutral-700: #4F555A;
    --neutral-400: #8A8585;
    --neutral-200: #D9D9D9;

    --bg-light: #F3F3FD;
    --bg-white: #FFFFFF;

    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Typography */
    --font-main: 'Inter', sans-serif;

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px -3px rgba(80, 108, 248, 0.1), 0 4px 6px -2px rgba(80, 108, 248, 0.05);
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--neutral-700);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--neutral-900);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--primary-500);
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--bg-light);
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-500);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-500);
    border-color: var(--primary-500);
}

.btn-outline:hover {
    background-color: var(--primary-500);
    color: var(--bg-white);
}

.btn-text {
    background: none;
    padding: 0;
    color: var(--primary-500);
}

.btn-text:hover {
    color: var(--primary-700);
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--neutral-200);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

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

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

.logo-img {
    height: 65px;
    /* fallback style if img is missing */
    background-color: #f0f0f0;
    border-radius: 4px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-500);
    display: none;
    /* Show only if image fails via JS or just hidden initially */
}

/* Triggered by JS if img fails */
.logo-img.error {
    display: none;
}

.logo-img.error+.logo-text {
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-list {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    color: var(--neutral-700);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-500);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.lang-selector {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--neutral-400);
    cursor: pointer;
    user-select: none;
}

.lang.active {
    color: var(--primary-500);
}

.separator {
    margin: 0 4px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--neutral-900);
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding-top: 120px;
    /* Account for fixed header */
    padding-bottom: var(--space-xl);
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(80, 108, 248, 0.1);
    color: var(--primary-500);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: var(--space-md);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--neutral-700);
    margin-bottom: var(--space-lg);
    max-width: 90%;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
}

/* Dashboard Mockup (HTML/CSS visual) */
.hero-visual {
    position: relative;
}

.dashboard-mockup {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: var(--transition);
}

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

.mockup-header {
    background-color: #FAFAFA;
    padding: 1rem;
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
}

.mockup-dots {
    display: flex;
    gap: 6px;
    margin-right: 1rem;
}

.mockup-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-dots span:nth-child(1) {
    background-color: #FF5F56;
}

.mockup-dots span:nth-child(2) {
    background-color: #FFBD2E;
}

.mockup-dots span:nth-child(3) {
    background-color: #27C93F;
}

.mockup-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neutral-400);
}

.mockup-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: #FAFCFF;
}

.mockup-card {
    background: var(--bg-white);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(80, 108, 248, 0.1);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-icon {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.fatigue-icon {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.card-info h4 {
    font-size: 0.9rem;
    color: var(--neutral-400);
    margin-bottom: 0.25rem;
}

.status-high {
    color: var(--danger);
    font-weight: 600;
    font-size: 1.1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--neutral-200);
    border-radius: 10px;
    margin: 6px 0;
}

.progress-fill {
    height: 100%;
    background-color: var(--warning);
    border-radius: 10px;
}

.status-text {
    font-size: 0.8rem;
    font-weight: 500;
}

.stats-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-500);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--neutral-400);
}

/* ==========================================================================
   Sections General
   ========================================================================== */
.section {
    padding: var(--space-2xl) 0;
}

.section-header {
    margin-bottom: var(--space-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--neutral-700);
}

/* ==========================================================================
   Funcionalidades
   ========================================================================== */
/* ==========================================================================
   Funcionalidades
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.feature-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--bg-white) 0%, rgba(243, 243, 253, 0.4) 100%);
    padding: 2rem 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(80, 108, 248, 0.1);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(80, 108, 248, 0.12);
    border-color: rgba(80, 108, 248, 0.25);
}

.feature-header-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.feature-card .feature-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(80, 108, 248, 0.08);
    color: var(--primary-500);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 0;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background-color: var(--primary-500);
    color: var(--bg-white);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(80, 108, 248, 0.3);
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 0;
    font-weight: 700;
}

.feature-desc {
    color: var(--neutral-700);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Mockup Container */
.feature-mockup {
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px solid rgba(80, 108, 248, 0.15);
    overflow: hidden;
    margin-top: auto;
    font-family: var(--font-main);
    font-size: 0.8rem;
    color: #4a5568;
    box-shadow: 0 4px 12px rgba(80, 108, 248, 0.03);
    transition: var(--transition);
}

.feature-card:hover .feature-mockup {
    border-color: rgba(80, 108, 248, 0.35);
    box-shadow: 0 6px 16px rgba(80, 108, 248, 0.08);
    background-color: #ffffff;
}

/* Mockup Header Bar */
.mockup-header-bar {
    background-color: rgba(80, 108, 248, 0.05);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(80, 108, 248, 0.1);
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.mockup-dot-red, .mockup-dot-yellow, .mockup-dot-green {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.mockup-dot-red { background-color: #ef4444; }
.mockup-dot-yellow { background-color: #f59e0b; }
.mockup-dot-green { background-color: #10b981; }

.mockup-label {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #4a5568;
}

/* Mockup Body Content */
.mockup-body-content {
    padding: 1rem;
}

/* --- ECG Animation (Clinical) --- */
.ecg-container {
    height: 35px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
}

.ecg-svg {
    width: 100%;
    height: 100%;
}

.ecg-path {
    stroke: #10b981;
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.feature-card:hover .ecg-path {
    animation: ecgSweep 2s linear infinite;
}

@keyframes ecgSweep {
    to {
        stroke-dashoffset: 0;
    }
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.metric-box {
    background-color: #ffffff;
    border: 1px solid rgba(80, 108, 248, 0.08);
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(80, 108, 248, 0.02);
}

.metric-lbl {
    font-size: 0.6rem;
    color: #718096;
    text-transform: uppercase;
}

.metric-val {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--neutral-900);
}

.metric-val small {
    font-size: 0.6rem;
    font-weight: normal;
    color: #718096;
}

.text-pulse {
    transition: color 0.3s;
}

.feature-card:hover .text-pulse {
    color: #10b981;
    animation: textFlicker 1.5s infinite alternate;
}

@keyframes textFlicker {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.sensor-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50px;
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    width: fit-content;
}

.sensor-pill.connected {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
}

.feature-card:hover .pulse-dot {
    animation: pulseDotGlow 1s infinite alternate;
}

@keyframes pulseDotGlow {
    0% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    100% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 6px 2px rgba(16, 185, 129, 0.4); }
}

/* --- Risk Levels (Risk Management) --- */
.risk-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.risk-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(80, 108, 248, 0.08);
}

.risk-name {
    font-size: 0.75rem;
    color: var(--neutral-900);
}

.risk-status {
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-critical {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-medium {
    background-color: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-stable {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.feature-card:hover .badge-critical {
    animation: flashCritical 1s infinite alternate;
}

@keyframes flashCritical {
    0% { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
}

/* --- Alerts Mockup (Smart Alerts) --- */
.alert-box {
    background-color: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 8px;
    padding: 0.6rem;
    transition: var(--transition);
}

.feature-card:hover .alert-box {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

.alert-box-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.2rem;
}

.alert-warning-icon {
    font-size: 0.85rem;
}

.alert-box-title {
    font-weight: bold;
    color: #f87171;
    font-size: 0.75rem;
}

.alert-box-desc {
    font-size: 0.7rem;
    color: #4a5568;
    margin-bottom: 0.4rem;
}

.alert-box-actions {
    display: flex;
    gap: 6px;
}

.alert-btn {
    font-size: 0.6rem;
    font-weight: bold;
    padding: 2.5px 6px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-notify {
    background-color: #506cf8;
    color: #fff;
    border: 1px solid #506cf8;
}

.btn-dismiss {
    background-color: #edf2f7;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.feature-card:hover .bell-icon {
    animation: shakeBell 0.5s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes shakeBell {
    0% { transform: rotate(0); }
    15% { transform: rotate(8deg); }
    30% { transform: rotate(-8deg); }
    45% { transform: rotate(4deg); }
    60% { transform: rotate(-4deg); }
    75% { transform: rotate(2deg); }
    90% { transform: rotate(-2deg); }
    100% { transform: rotate(0); }
}

/* --- Shift Mockup (Medical Shifts) --- */
.shift-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shift-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shift-role {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--neutral-900);
}

.shift-badge-active {
    font-size: 0.6rem;
    background-color: rgba(80, 108, 248, 0.08);
    color: #506cf8;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(80, 108, 248, 0.15);
}

.shift-progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shift-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: #718096;
}

.shift-progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(80, 108, 248, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.shift-progress-fill {
    width: 0%;
    height: 100%;
    background-color: #506cf8;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.feature-card:hover .shift-progress-fill {
    width: 78%;
}

.shift-footer-stats {
    font-size: 0.65rem;
    color: #718096;
}

/* --- Recovery Mockup (Staff Recovery) --- */
.recovery-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.breath-container {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breath-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    box-sizing: border-box;
}

.feature-card:hover .breath-ring {
    animation: breathGuide 3s ease-in-out infinite alternate;
}

@keyframes breathGuide {
    0% { transform: scale(0.9); border-color: rgba(16, 185, 129, 0.2); box-shadow: 0 0 0 rgba(16, 185, 129, 0); }
    100% { transform: scale(1.25); border-color: rgba(16, 185, 129, 0.6); box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
}

.breath-icon {
    font-size: 1.1rem;
}

.recovery-text {
    display: flex;
    flex-direction: column;
}

.recovery-sugg {
    font-size: 0.65rem;
    color: #718096;
}

.recovery-action {
    font-size: 0.8rem;
    font-weight: bold;
    color: #059669;
}

/* --- Admin Mockup (Hospital Admin) --- */
.admin-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(80, 108, 248, 0.06);
    padding-bottom: 0.3rem;
}

.admin-stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.admin-stat-lbl {
    font-size: 0.7rem;
    color: #4a5568;
}

.admin-stat-val {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--neutral-900);
}

.badge-ok {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.65rem;
}

.feature-card:hover .badge-ok {
    animation: flashGreen 1.5s infinite alternate;
}

@keyframes flashGreen {
    0% { background-color: rgba(16, 185, 129, 0.15); }
    100% { background-color: rgba(16, 185, 129, 0.35); }
}

/* ==========================================================================
   Beneficios
   ========================================================================== */
.benefits-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.benefit-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.benefit-tag {
    display: inline-block;
    color: var(--primary-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.benefit-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.benefit-desc {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.benefit-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.benefit-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-500);
    font-weight: bold;
}

.placeholder-img {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Planes de Suscripción
   ========================================================================== */
/* ==========================================================================
   Tabla de Comparación de Planes
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-top: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-white);
    position: relative;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}
.table-responsive::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.table-responsive::-webkit-scrollbar-thumb {
    background: var(--primary-400);
    border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--primary-500);
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    min-width: 950px;
}

.comparison-table th,
.comparison-table td {
    padding: 1.25rem var(--space-md);
    border-bottom: 1px solid rgba(80, 108, 248, 0.08);
    text-align: center;
    vertical-align: middle;
    transition: var(--transition);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
    padding-left: var(--space-lg);
    font-weight: 600;
    color: var(--neutral-900);
    position: sticky;
    left: 0;
    background-color: var(--bg-white);
    z-index: 10;
    border-right: 1px solid rgba(80, 108, 248, 0.08);
    min-width: 280px;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.02);
}

.comparison-table th:first-child {
    z-index: 20;
    background-color: var(--bg-white);
}

.comparison-table tbody tr:nth-child(even) td {
    background-color: rgba(243, 243, 253, 0.25);
}

.comparison-table tbody tr:nth-child(even) td:first-child {
    background-color: var(--bg-white);
}

.comparison-table tbody tr:not(.category-row):not(.action-row):hover td {
    background-color: rgba(80, 108, 248, 0.04) !important;
}

.comparison-table tbody tr:not(.category-row):not(.action-row):hover td:first-child {
    background-color: var(--bg-light) !important;
}

.comparison-table .category-row td {
    background-color: var(--bg-light) !important;
    color: var(--primary-700);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-align: left;
    padding: 0.75rem var(--space-lg);
    border-bottom: 2px solid rgba(80, 108, 248, 0.15);
    border-top: 1px solid rgba(80, 108, 248, 0.08);
}

.comparison-table .popular-col {
    background-color: rgba(80, 108, 248, 0.025);
    border-left: 1px dashed rgba(80, 108, 248, 0.2);
    border-right: 1px dashed rgba(80, 108, 248, 0.2);
}

.comparison-table th.popular-col {
    background-color: rgba(80, 108, 248, 0.04);
    border-top: 2px solid var(--primary-500);
    position: relative;
}

.comparison-table tr:hover td.popular-col {
    background-color: rgba(80, 108, 248, 0.06) !important;
}

.table-plan-header {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.table-plan-header .plan-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--neutral-900);
}

.table-plan-header .plan-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-500);
    line-height: 1;
}

.table-plan-header .plan-period {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--neutral-700);
}

.table-plan-header .plan-desc-short {
    font-size: 0.85rem;
    color: var(--neutral-700);
    font-weight: 400;
    line-height: 1.4;
    max-width: 200px;
    margin-top: 0.5rem;
}

.popular-badge-table {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
    color: var(--bg-white);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(80, 108, 248, 0.2);
    margin-bottom: 0.25rem;
}

.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: bold;
}

.muted-cell {
    color: var(--neutral-200);
    font-size: 1.2rem;
    font-weight: 500;
}

.action-row td {
    padding: var(--space-lg) var(--space-md);
    background-color: var(--bg-white) !important;
}

.action-row td.popular-col {
    background-color: rgba(80, 108, 248, 0.025) !important;
}

.comparison-table .plan-btn {
    width: 100%;
    max-width: 220px;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    white-space: normal;
    height: 60px;
}

/* ==========================================================================
   Términos del Servicio
   ========================================================================== */
.terms-card {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.terms-icon {
    width: 64px;
    height: 64px;
    background-color: var(--bg-light);
    color: var(--primary-500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.terms-title {
    margin-bottom: 1rem;
}

.terms-summary {
    color: var(--neutral-700);
    margin-bottom: 1.5rem;
}

.terms-details {
    text-align: left;
    margin-top: 2rem;
    animation: fadeIn 0.3s ease;
}

.terms-details hr {
    border: 0;
    height: 1px;
    background-color: var(--neutral-200);
    margin-bottom: 2rem;
}

.terms-details h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-700);
}

.terms-details p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--neutral-900);
    color: var(--bg-white);
    padding-top: var(--space-2xl);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-tagline {
    color: var(--neutral-400);
    margin-top: 1rem;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.link-column h4,
.footer-social h4 {
    color: var(--bg-white);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.link-column a {
    display: block;
    color: var(--neutral-400);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.link-column a:hover {
    color: var(--primary-400);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-500);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--neutral-400);
    font-size: 0.9rem;
}

/* ==========================================================================
   Media Queries (Responsive)
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

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

@media (max-width: 900px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
    }

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

    .mobile-toggle {
        display: block;
        transition: transform 0.3s ease, color 0.3s ease;
    }

    .mobile-toggle.active {
        color: var(--primary-500);
        transform: rotate(90deg);
    }

    .logo-img {
        height: 35px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 2rem auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .dashboard-mockup {
        transform: none;
        margin-top: 2rem;
    }

    .dashboard-mockup:hover {
        transform: none;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

    .benefit-block {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .benefit-block.image-left .benefit-visual {
        order: -1;
    }

    .benefit-list li {
        text-align: left;
    }

    .terms-card {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Página de Términos y Condiciones (Premium)
   ========================================================================== */
.terms-page-section {
    padding-top: 140px;
    padding-bottom: var(--space-2xl);
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
    min-height: 100vh;
}

.terms-page-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.terms-page-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.terms-page-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background-color: rgba(80, 108, 248, 0.08);
    color: var(--primary-600);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
}

.terms-page-title {
    font-size: 2.8rem;
    color: var(--neutral-900);
    margin-bottom: var(--space-md);
    letter-spacing: -0.5px;
    font-weight: 800;
}

.terms-page-subtitle {
    font-size: 1.15rem;
    color: var(--neutral-700);
    margin-bottom: var(--space-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.terms-page-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--neutral-400);
    font-weight: 500;
}

.terms-page-meta .dot {
    color: var(--primary-400);
    font-weight: bold;
}

/* Content card layout */
.terms-page-content {
    background-color: var(--bg-white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    box-shadow: var(--shadow-lg);
}

.terms-block {
    margin-bottom: 3rem;
}

.terms-block:last-of-type {
    margin-bottom: 2rem;
}

/* Heading with primary color left-border */
.terms-block h2 {
    font-size: 1.5rem;
    color: var(--primary-700);
    margin-bottom: 1.25rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary-500);
    font-weight: 700;
    line-height: 1.3;
}

.terms-block p {
    font-size: 1rem;
    color: var(--neutral-700);
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

/* Clean list styling */
.terms-list {
    margin-bottom: 1.25rem;
    padding-left: 0.5rem;
}

.terms-list li {
    font-size: 1rem;
    color: var(--neutral-700);
    line-height: 1.7;
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
}

.terms-list li::before {
    content: "•";
    color: var(--primary-500);
    font-weight: 900;
    position: absolute;
    left: 0;
    font-size: 1.3rem;
    line-height: 1.1;
}

/* Warning/Notice Box */
.terms-warning {
    margin: 1.75rem 0;
    background-color: rgba(245, 158, 11, 0.05);
    border-left: 4px solid var(--warning);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1.5rem;
}

.terms-warning strong {
    display: block;
    color: #B45309; /* Darker warning color for readability */
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.terms-warning span {
    color: var(--neutral-700);
    font-size: 0.95rem;
    line-height: 1.6;
    display: block;
}

/* Sub-blocks (ACM/IEEE and CIP Code of Ethics) */
.terms-subblock {
    background-color: rgba(80, 108, 248, 0.02);
    border: 1px solid rgba(80, 108, 248, 0.06);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.terms-subblock:hover {
    background-color: rgba(80, 108, 248, 0.04);
    border-color: rgba(80, 108, 248, 0.12);
}

.terms-subblock h3 {
    font-size: 1.15rem;
    color: var(--primary-600);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.terms-subblock p {
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Footer note signature */
.terms-footer-note {
    border-top: 1px solid var(--neutral-200);
    padding-top: var(--space-lg);
    margin-top: 3.5rem;
}

.terms-footer-note p {
    font-size: 0.9rem;
    color: var(--neutral-400);
    line-height: 1.6;
    text-align: center;
    font-style: italic;
    margin-bottom: 0;
}

/* Responsive adjustment for padding */
@media (max-width: 768px) {
    .terms-page-section {
        padding-top: 110px;
    }
    
    .terms-page-header {
        margin-bottom: 2.5rem;
    }

    .terms-page-title {
        font-size: 2.2rem;
    }

    .terms-page-content {
        padding: 2rem var(--space-md);
    }

    .terms-block h2 {
        font-size: 1.3rem;
    }
}

/* ==========================================================================
   Footnote de Planes
   ========================================================================== */
.plans-footnote {
    margin-top: 2.5rem;
    padding: 1.25rem var(--space-lg);
    background-color: var(--bg-white);
    border: 1px solid rgba(80, 108, 248, 0.1);
    border-radius: var(--radius-md);
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.plans-footnote p {
    font-size: 0.95rem;
    color: var(--neutral-700);
    line-height: 1.6;
    margin: 0;
}

.plans-footnote strong {
    color: var(--primary-600);
}

@media (max-width: 480px) {
    .feature-card {
        padding: 1.5rem 1.25rem !important;
    }
    .metrics-grid {
        gap: 0.35rem !important;
    }
    .metric-box {
        padding: 0.3rem 0.4rem !important;
    }
    .recovery-content {
        gap: 0.5rem !important;
    }
    .recovery-action {
        font-size: 0.75rem !important;
    }
}

/* ==========================================================================
   Renovaciones del Landing Page (Nuevas Secciones)
   ========================================================================== */

/* ¿Cómo funciona VitalWatch? */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-top: 3rem;
}

.step-card {
    background-color: var(--bg-white);
    padding: 2.25rem 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(80, 108, 248, 0.08);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-500);
    opacity: 0;
    transition: var(--transition);
}

.step-card:hover::before {
    opacity: 1;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(80, 108, 248, 0.2);
}

.step-num {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--primary-500);
    opacity: 0.85;
    line-height: 1;
    margin-bottom: var(--space-md);
}

.step-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--neutral-900);
}

.step-desc {
    font-size: 0.95rem;
    color: var(--neutral-700);
    line-height: 1.6;
}

/* Diseñado para cada rol */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: 3rem;
}

.role-card {
    background-color: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(80, 108, 248, 0.08);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(80, 108, 248, 0.2);
}

.role-icon-container {
    width: 64px;
    height: 64px;
    background-color: rgba(80, 108, 248, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    transition: var(--transition);
}

.role-card:hover .role-icon-container {
    background-color: var(--primary-500);
    transform: scale(1.1);
}

.role-icon {
    font-size: 1.75rem;
    transition: var(--transition);
}

.role-card:hover .role-icon {
    filter: brightness(0) invert(1);
}

.role-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--neutral-900);
}

.role-desc {
    font-size: 0.95rem;
    color: var(--neutral-700);
    line-height: 1.6;
}

/* Módulos incluidos */
.modules-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.module-chip {
    padding: 0.6rem 1.25rem;
    background-color: rgba(80, 108, 248, 0.06);
    color: var(--primary-700);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 50px;
    border: 1px solid rgba(80, 108, 248, 0.1);
    transition: var(--transition);
    cursor: default;
}

.module-chip:hover {
    background-color: var(--primary-500);
    color: var(--bg-white);
    border-color: var(--primary-500);
    transform: scale(1.05);
}

/* Planes resumidos */
.planes-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: 3rem;
    margin-bottom: 3.5rem;
}

.plan-summary-card {
    background-color: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(80, 108, 248, 0.1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.plan-summary-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.plan-summary-card.recommended {
    border: 2px solid var(--primary-500);
    box-shadow: 0 10px 30px rgba(80, 108, 248, 0.15);
}

.plan-badge-recommended {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
    color: var(--bg-white);
    padding: 0.35rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(80, 108, 248, 0.25);
    white-space: nowrap;
}

.plan-card-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.plan-card-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--neutral-900);
}

.plan-card-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-500);
    line-height: 1;
}

.plan-card-period {
    font-size: 1rem;
    font-weight: 500;
    color: var(--neutral-400);
}

.plan-card-desc {
    font-size: 0.95rem;
    color: var(--neutral-700);
    line-height: 1.5;
    text-align: center;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.plan-card-btn {
    margin-top: auto;
}

/* Final CTA Section */
.final-cta-section {
    padding: var(--space-2xl) 0;
    background: linear-gradient(135deg, rgba(80, 108, 248, 0.05) 0%, rgba(101, 168, 251, 0.05) 100%);
}

.final-cta-card {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
    padding: 4rem 3rem;
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--bg-white);
    box-shadow: 0 15px 35px rgba(80, 108, 248, 0.25);
}

.final-cta-title {
    font-size: 2.5rem;
    color: var(--bg-white);
    margin-bottom: 1rem;
    font-weight: 800;
}

.final-cta-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.final-cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

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

.final-cta-buttons .btn-primary:hover {
    background-color: var(--bg-light);
    color: var(--primary-700);
}

.final-cta-buttons .btn-outline {
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--bg-white);
}

.final-cta-buttons .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--bg-white);
}

/* responsive overrides */
@media (max-width: 1024px) {
    .planes-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }
    .plan-summary-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .roles-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .planes-cards-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .final-cta-card {
        padding: 3rem 1.5rem;
    }
    
    .final-cta-title {
        font-size: 1.85rem;
    }
    
    .final-cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }

    .comparison-table th:first-child,
    .comparison-table td:first-child {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
        border-right: none !important;
        box-shadow: none !important;
    }
}
