/* -------------------------------------------------------------
   SOFTREST - SISTEMA DE ESTILOS PREMIUM (GLASSMORPHISM & UX)
   ------------------------------------------------------------- */

/* --- Local Fonts Configuration (Inter & Outfit) --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/inter-normal-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-normal-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-normal-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-normal-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-normal-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/outfit-normal-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/outfit-normal-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/outfit-normal-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/outfit-normal-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/outfit-normal-800.woff2') format('woff2');
}

/* --- CSS Variables & Design Tokens --- */
:root {
    /* Brand Colors (Constant across themes) - Derived from SVG logo */
    --primary-hue: 23; /* Coral Orange */
    --primary: hsl(var(--primary-hue), 91%, 57%); /* #F47B2F */
    --primary-hover: hsl(var(--primary-hue), 91%, 50%);
    --primary-glow: hsla(var(--primary-hue), 91%, 57%, 0.15);
    
    /* Secondary Tech Blue & Light Blue from SVG */
    --secondary-hue: 210; /* Tech Blue */
    --secondary: hsl(var(--secondary-hue), 57%, 45%); /* #3273B6 */
    --secondary-hover: hsl(var(--secondary-hue), 57%, 38%);
    --secondary-glow: hsla(var(--secondary-hue), 57%, 45%, 0.15);
    
    --accent-hue: 201; /* Sky Blue */
    --accent: hsl(var(--accent-hue), 66%, 55%); /* #40A1D8 */
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;

    /* Theme colors - Dark Mode (Default) */
    --bg-color: #090d16;
    --card-bg-theme: rgba(22, 28, 45, 0.5);
    --glass-bg-theme: rgba(30, 41, 59, 0.4);
    --border-color-theme: rgba(255, 255, 255, 0.08);
    --border-hover-theme: rgba(255, 255, 255, 0.15);
    
    --text-main: #f8fafc;
    --text-secondary-theme: #94a3b8;
    --text-muted-theme: #64748b;
    --slider-track: rgba(148, 163, 184, 0.2);
    --slider-track-hover: rgba(148, 163, 184, 0.3);
    
    --shadow-premium: var(--shadow-md);
    --glow-opacity: 0.12;

    /* Backward compatibility mapping to keep style.css code fully functional */
    --dark-bg: var(--bg-color);
    --card-bg: var(--card-bg-theme);
    --glass-bg: var(--glass-bg-theme);
    --border-color: var(--border-color-theme);
    --border-hover: var(--border-hover-theme);
    --text-primary: var(--text-main);
    --text-secondary: var(--text-secondary-theme);
    --text-muted: var(--text-muted-theme);
    
    /* Fonts */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.7);
    --shadow-primary: 0 8px 25px hsla(var(--primary-hue), 92%, 50%, 0.25);
    
    /* Layout */
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

html.light-mode, body.light-mode {
    /* Theme colors - Light Mode */
    --bg-color: #f8fafc; /* Blanco azulado limpio */
    --card-bg-theme: #ffffff; /* Blanco puro */
    --glass-bg-theme: rgba(241, 245, 249, 0.7);
    --border-color-theme: rgba(15, 23, 42, 0.08); /* Elimina bordes pesados */
    --border-hover-theme: rgba(15, 23, 42, 0.12);
    
    --text-main: #0f172a; /* Azul pizarra oscuro */
    --text-secondary-theme: #475569; /* Slate gray */
    --text-muted-theme: #64748b;
    
    --shadow-premium: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --glow-opacity: 0.05;
    
    /* Brand adjustments for light mode contrast if needed */
    --primary-hover: hsl(var(--primary-hue), 91%, 48%);
    --secondary-hover: hsl(var(--secondary-hue), 57%, 34%);

    /* Intermediate layout shadows for light mode (balanced depth) */
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.045);
    --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.065);
    --shadow-primary: 0 8px 25px hsla(var(--primary-hue), 92%, 50%, 0.14);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden; /* Evita que brillos de fondo y elementos fuera de rango causen scroll horizontal */
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    isolation: isolate;
}

/* --- Decorative Background Blurs --- */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: var(--glow-opacity);
    pointer-events: none;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -150px;
    right: -100px;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    top: 50%;
    left: -200px;
}

.bg-glow-3 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: 0;
    right: 50px;
}

/* --- Typography & Headings --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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

.text-center { text-align: center; }
.text-gradient {
    background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.highlight { color: var(--primary); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-secondary); }
.bold { font-weight: 700; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.py-4 { padding-top: 32px; padding-bottom: 32px; }
.px-4 { padding-left: 24px; padding-right: 24px; }
.flex { display: flex; }
.flex-center-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.font-xs { font-size: 0.75rem; }
.font-sm { font-size: 0.875rem; }
.font-md { font-size: 1rem; }
.font-lg { font-size: 1.25rem; }
.hidden, .d-none { display: none !important; }

/* --- Badges & Buttons --- */
.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    padding: 14px 28px; /* Premium default padding for robust, elegant button height */
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px hsla(var(--primary-hue), 92%, 50%, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

/* --- Header & Navigation --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%; /* Evita desbordamiento horizontal en navegadores con scrollbar vertical visible */
    z-index: 100;
    background: rgba(9, 13, 22, 0.75);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    transition: all 0.3s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
}

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

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 100px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 110;
    padding: 12px;  /* Aumenta el área táctil para móviles a un tamaño accesible */
    margin: -12px;  /* Compensa el padding para mantener la alineación original */
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* --- Hero Section --- */
.hero-section {
    padding-top: 160px;
    padding-bottom: 80px;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.hero-title {
    font-size: 3.25rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 56px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
}

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

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Glass Card Comparison Visual */
.hero-card-glass {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.28); /* Much more visible and clean border in dark mode */
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), var(--shadow-lg); /* Inset shadow to simulate glass bevel shine */
}

.light-mode .hero-card-glass {
    border: 2px solid rgba(15, 23, 42, 0.24); /* Much more visible and clean border in light mode */
    box-shadow: inset 0 1.5px 2px rgba(255, 255, 255, 0.95), var(--shadow-lg); /* Stronger white shine at top of glass window */
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.24); /* Thicker and more visible bottom border in dark mode */
    padding-bottom: 16px;
}

.light-mode .hero-card-header {
    border-bottom: 2px solid rgba(15, 23, 42, 0.2); /* Thicker and more visible bottom border in light mode */
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

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

.hero-card-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 8px;
}

.comparison-row {
    margin-bottom: 20px;
}

.comp-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.comp-bar {
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    padding-left: 12px;
    padding-right: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 6px;
    transition: width 1s ease-in-out;
}

.comp-bar span {
    white-space: nowrap;
    flex-shrink: 0;
}

.comp-bar.traditional {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.comp-bar.modern {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    min-width: max-content;
}

/* --- General Section Header --- */
.section-header {
    max-width: 650px;
    margin: 0 auto 64px auto;
}

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

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

/* --- Simulator Section --- */
.simulator-section {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.sim-controls-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    gap: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.02);
}

.step-card.active {
    background: rgba(244, 123, 47, 0.03);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(244, 123, 47, 0.05);
}

.step-icon-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.step-card.active .step-icon-number {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}

.step-info h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.step-card.active .step-info h3 {
    color: var(--primary);
}

.step-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.run-step-btn {
    display: none;
}

.step-card.active .run-step-btn {
    display: inline-flex;
}

/* --- Smartphone Mockup --- */
.phone-mockup-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: fit-content;
    margin: 0 auto;
}

.phone-container {
    width: 320px;
    height: 640px;
    background: #0f172a;
    border: 10px solid #334155;
    border-radius: 40px;
    box-shadow: var(--shadow-lg), 0 0 0 2px rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.phone-earpiece {
    width: 60px;
    height: 4px;
    background: #334155;
    border-radius: 100px;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.phone-camera {
    width: 8px;
    height: 8px;
    background: #1e293b;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: calc(50% + 45px);
    z-index: 10;
}

.phone-home-button {
    width: 40px;
    height: 4px;
    background: #334155;
    border-radius: 100px;
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.phone-screen {
    flex-grow: 1;
    background: #0b0f19;
    padding: 24px 16px 20px 16px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.screen-step {
    display: none;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.4s ease;
}

.screen-step.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Simulator - Screen 1: Scan */
.scanner-header {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    margin-top: 12px;
    margin-bottom: 24px;
}

.camera-simulator {
    flex-grow: 1;
    background: #1e293b;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-target-box {
    width: 140px;
    height: 140px;
    position: relative;
}

.scan-target-box .corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--primary);
}

.corner.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.corner.top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.corner.bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; }
.corner.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

.laser-beam {
    width: 100%;
    height: 3px;
    background: var(--primary);
    position: absolute;
    top: 0;
    box-shadow: 0 0 10px var(--primary);
    animation: scanAnimation 2s infinite linear;
}

@keyframes scanAnimation {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.qr-mock {
    width: 100px;
    height: 100px;
    margin: 20px auto;
    color: rgba(255, 255, 255, 0.8);
}

.scanner-footer {
    padding-top: 24px;
}

/* Simulator - Screen App UI (Step 2, 3, 4) */
.phone-app-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.table-badge {
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
}

.app-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
}

.bell-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-glow);
    border: 1px solid rgba(244, 123, 47, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: buttonPulse 1.8s infinite;
}

.bell-icon svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.bell-icon:hover {
    background: rgba(244, 123, 47, 0.25);
    border-color: var(--primary);
}

/* Light Theme Overrides for Bell Icon (Solid Background & Black Icon) */
.light-mode .bell-icon {
    background: var(--primary);
    border-color: var(--primary);
}

.light-mode .bell-icon svg {
    color: #fff;
}

.light-mode .bell-icon:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.bell-icon.active {
    background: var(--primary);
    border-color: var(--primary);
    animation: shake 0.5s infinite;
}

.bell-icon.active svg {
    color: #fff;
}

.bell-icon.no-animation {
    animation: none !important;
}

@keyframes shake {
    0% { transform: rotate(0); }
    15% { transform: rotate(10deg); }
    30% { transform: rotate(-10deg); }
    45% { transform: rotate(5deg); }
    60% { transform: rotate(-5deg); }
    75% { transform: rotate(2deg); }
    100% { transform: rotate(0); }
}

.phone-app-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch; /* Momentum scrolling suave en dispositivos iOS */
}

/* Hide scrollbar for layout inside app content */
.phone-app-content::-webkit-scrollbar {
    display: none;
}

.chef-recommendation {
    background: linear-gradient(135deg, rgba(244, 123, 47, 0.1), rgba(244, 123, 47, 0.02));
    border: 1px solid rgba(244, 123, 47, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 16px;
}

.recommendation-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.chef-recommendation h4 {
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.price {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.section-title-app {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.app-food-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.food-details h6 {
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.phone-app-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.cart-summary-sim {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Screen 3: Bell waves */
.bell-wave-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 24px auto;
}

.bell-wave-animation .circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-glow);
    animation: wavePulse 2s infinite ease-out;
}

.bell-wave-animation .wave-2 {
    animation-delay: 0.6s;
}

.bell-icon-large {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-primary);
}

.bell-icon-large svg {
    width: 32px;
    height: 32px;
}

@keyframes wavePulse {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Screen 4: Success */
.success-icon-animated {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--success);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px auto;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.success-icon-animated svg {
    width: 30px;
    height: 30px;
}

.simulated-receipt {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 12px;
    width: 100%;
}

/* Waiter device notification popup */
.waiter-panel-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    left: auto;
    width: 280px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-lg);
    transform: translateY(120px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    color: #f8fafc; /* Safe default light color for dark background */
}

.light-mode .waiter-panel-notification {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-left: 4px solid var(--primary);
    color: var(--text-main);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.waiter-panel-notification.active {
    transform: translateY(0);
    opacity: 1;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.notification-badge-red {
    background: rgba(244, 123, 47, 0.15);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.notification-header .time {
    font-size: 0.65rem;
    color: var(--text-muted);
}

#waiterNotificationText {
    font-size: 0.75rem;
    font-weight: 500;
}

.notification-subtext {
    font-size: 11px;
    color: #94a3b8; /* Readable muted text in dark mode */
}

.light-mode .notification-subtext {
    color: #64748b; /* Readable muted text in light mode */
}

/* --- ROI Section --- */
.roi-section {
    padding: 100px 0;
}

.roi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: stretch;
}

.roi-sliders-card, .roi-results-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.slider-group {
    margin-bottom: 28px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.slider-header label {
    font-weight: 600;
    font-size: 0.95rem;
}

.slider-value {
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 700;
}

.slider-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--slider-track, rgba(255, 255, 255, 0.08));
    border-radius: 100px;
    outline: none;
    transition: background 0.3s ease;
}

.slider-range:hover {
    background: var(--slider-track-hover, rgba(255, 255, 255, 0.15));
}

.slider-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: var(--shadow-primary);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.slider-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-hover);
}

/* Firefox overrides for range track and thumb */
.slider-range::-moz-range-track {
    height: 6px;
    background: var(--slider-track, rgba(255, 255, 255, 0.08));
    border-radius: 100px;
    border: none;
    transition: background 0.3s ease;
}

.slider-range:hover::-moz-range-track {
    background: var(--slider-track-hover, rgba(255, 255, 255, 0.15));
}

.slider-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: var(--shadow-primary);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.slider-range::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-hover);
}

.slider-range::-moz-range-progress {
    height: 6px;
    background: var(--primary);
    border-radius: 100px 0 0 100px;
}

.academic-note {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* ROI Results Panel Card */
.roi-results-card {
    background: linear-gradient(135deg, rgba(244, 123, 47, 0.03), rgba(255, 255, 255, 0.01));
    border-color: rgba(244, 123, 47, 0.15);
}

.roi-results-card h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.result-highlight-box {
    background: linear-gradient(135deg, rgba(244, 123, 47, 0.1), rgba(244, 123, 47, 0.02));
    border: 1px solid rgba(244, 123, 47, 0.2);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    margin-bottom: 32px;
}

.benefit-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.benefit-amount {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 8px;
}

.benefit-percentage {
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 600;
}

.results-breakdown {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.breakdown-row.total-row {
    border-bottom: none;
    padding-top: 8px;
    font-size: 1.15rem;
}

/* --- Benefits Section --- */
.benefits-section {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.005);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.benefit-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.benefit-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.01);
}

.benefit-card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-glow);
    border-radius: var(--radius-sm);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.benefit-card-icon svg {
    width: 24px;
    height: 24px;
}

.benefit-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.benefit-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* --- Lead Form Section --- */
.benefits-section + .lead-section {
    border-top: 1px solid var(--border-color);
}

.lead-section {
    padding: 100px 0;
    position: relative;
}

.lead-container {
    max-width: 800px;
}

.lead-form-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-lg);
}

.elegant-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-checkbox {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.form-group-checkbox input {
    margin-top: 4px;
}

.elegant-form label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.elegant-form input[type="text"],
.elegant-form input[type="email"],
.elegant-form input[type="tel"],
.elegant-form select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.elegant-form input:focus,
.elegant-form select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.elegant-form select option {
    background: #0f172a;
    color: var(--text-primary);
}

/* Success Card Message Box */
.form-success-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 0;
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.form-success-box .success-icon {
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--success);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.1);
}

.form-success-box .success-icon svg {
    width: 32px;
    height: 32px;
}

/* --- Footer --- */
.main-footer {
    background: #06090e;
    border-top: 1px solid var(--border-color);
    padding-top: 64px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-info .logo {
    margin-bottom: 12px;
}

.footer-academic {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 6px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    background: #04060a;
}

/* Ensure all muted footer elements meet WCAG AA contrast ratio */
.main-footer .text-muted {
    color: #a1a1aa !important;
}



/* --- Mobile Menu Drawer --- */
@media (max-width: 991px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: #090d16;
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 100px 32px 32px 32px;
        gap: 28px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 105;
        box-shadow: var(--shadow-lg);
        overflow-y: auto; /* Permite scroll vertical en pantallas cortas o landscape */
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .light-mode .nav-menu {
        background: rgba(248, 250, 252, 0.95);
        border-left-color: rgba(15, 23, 42, 0.08);
        box-shadow: -10px 0 30px rgba(15, 23, 42, 0.05);
        backdrop-filter: blur(20px);
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .nav-link.active::after {
        display: none;
    }
}

/* --- Responsive Layout Grid Adaptations --- */
@media (max-width: 991px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap; /* Permitir envoltura en pantallas pequeñas */
        gap: 12px;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 320px;
        white-space: normal; /* Permitir saltos de línea del texto del botón */
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap; /* Permitir envoltura de estadísticas */
        gap: 24px;       /* Reducir separación excesiva */
    }

    .simulator-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .phone-mockup-wrapper {
        order: -1; /* Display simulator phone first on tablets/mobiles */
    }

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

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

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

    .section-header h2 {
        font-size: 2rem;
    }

    .lead-form-card {
        padding: 32px 24px;
    }

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

    /* Evitar desbordamiento de las tarjetas ROI en móviles */
    .roi-sliders-card, .roi-results-card {
        padding: 24px 20px;
    }

    .result-highlight-box {
        padding: 20px 16px;
        margin-bottom: 24px;
    }

    .benefit-amount {
        font-size: 1.85rem; /* Reduce fuente para que el texto de COP quepa sin desbordar */
    }

    /* Evitar desbordamiento de tarjetas de beneficios */
    .benefit-card {
        padding: 24px;
    }

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

    .footer-academic {
        align-items: center;
        text-align: center;
    }
    
    .waiter-panel-notification {
        left: auto;
        right: 16px;
        bottom: 16px;
        transform: translateY(120px);
        width: 280px;
        max-width: calc(100% - 32px);
    }
    
    .waiter-panel-notification.active {
        transform: translateY(0);
    }

    .breakdown-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .breakdown-row span {
        white-space: normal;
    }


}

/* =============================================================
   ENHANCED SIMULATOR UX & INTERACTIVITY STYLES (FEEDBACK FIXED)
   ============================================================= */

/* Make Step Cards transition and hover beautifully */
.step-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease !important;
}

.step-card:hover {
    transform: translateY(-3px);
    border-color: rgba(244, 123, 47, 0.4) !important;
    background: rgba(244, 123, 47, 0.01) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.step-card.active:hover {
    border-color: var(--primary) !important;
    background: rgba(244, 123, 47, 0.04) !important;
    box-shadow: 0 12px 30px rgba(244, 123, 47, 0.08);
}

/* Cursor pointers inside the phone screen */
.phone-screen,
.phone-screen button,
.phone-screen .btn,
.phone-screen .bell-icon,
.app-food-item button {
    cursor: pointer !important;
}

/* Phone Buttons Hover Effect */
.scanner-footer button,
.chef-recommendation button,
.app-food-item button,
#screenStep3 button,
#screenStep4 button {
    position: relative;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease, box-shadow 0.2s ease;
}

.scanner-footer button:hover,
.chef-recommendation button:hover,
.app-food-item button:hover,
#screenStep3 button:hover,
#screenStep4 button:hover {
    transform: scale(1.05) !important;
    filter: brightness(1.15);
}

.scanner-footer button:active,
.chef-recommendation button:active,
.app-food-item button:active,
#screenStep3 button:active,
#screenStep4 button:active {
    transform: scale(0.98) !important;
}

/* --- Pulse Animations (Dark Mode / Default) --- */
@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(244, 123, 47, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(244, 123, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 123, 47, 0); }
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes secondaryPulse {
    0% { box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.7); } /* Slate/secondary color glow */
    70% { box-shadow: 0 0 0 10px rgba(148, 163, 184, 0); }
    100% { box-shadow: 0 0 0 0 rgba(148, 163, 184, 0); }
}

/* --- Pulse Animations (Light Mode - Enhanced Contrast & Width) --- */
@keyframes buttonPulseLight {
    0% { box-shadow: 0 0 0 0 rgba(244, 123, 47, 0.95); }
    70% { box-shadow: 0 0 0 12px rgba(244, 123, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 123, 47, 0); }
}

@keyframes successPulseLight {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.95); }
    70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes secondaryPulseLight {
    0% { box-shadow: 0 0 0 0 rgba(71, 85, 105, 0.7); } /* Slate/secondary color glow in light mode */
    70% { box-shadow: 0 0 0 10px rgba(71, 85, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(71, 85, 105, 0); }
}

/* Apply continuous visual cues to active primary buttons on mockup */
#screenStep1 .scanner-footer button {
    animation: buttonPulse 2s infinite;
}
.light-mode #screenStep1 .scanner-footer button {
    animation: buttonPulseLight 2s infinite;
}

#screenStep2 .chef-recommendation button {
    animation: secondaryPulse 2.5s infinite;
}
.light-mode #screenStep2 .chef-recommendation button {
    animation: secondaryPulseLight 2.5s infinite;
}

/* Custom indicator when cart has items but order not confirmed */
.pulse-button-success {
    animation: successPulse 1.8s infinite !important;
}
.light-mode .pulse-button-success {
    animation: successPulseLight 1.8s infinite !important;
}

#screenStep3 button {
    animation: buttonPulse 2s infinite;
}
.light-mode #screenStep3 button {
    animation: buttonPulseLight 2s infinite;
}

#screenStep4 button {
    animation: successPulse 2s infinite;
}
.light-mode #screenStep4 button {
    animation: successPulseLight 2s infinite;
}

/* Add a floating tooltip hint next to the main phone screen when on step 1 */
.phone-mockup-wrapper::before {
    content: "👈 Interactúa con la pantalla o las tarjetas";
    position: absolute;
    top: -64px; /* Positioned higher to accommodate the larger bubble size */
    left: 50%;
    transform: translateX(-50%);
    width: 92%; /* Slightly narrower than the phone container */
    text-align: center;
    background: rgba(244, 123, 47, 0.1);
    border: 1px solid rgba(244, 123, 47, 0.3);
    color: var(--primary);
    padding: 8px 18px; /* Increased padding by ~20% */
    border-radius: 100px;
    font-size: 0.9rem; /* Increased font-size from 0.75rem (exactly 20% larger) */
    font-weight: 600;
    pointer-events: none;
    box-shadow: var(--shadow-sm);
    animation: bounceUpDown 2s infinite ease-in-out;
    z-index: 15;
}

@keyframes bounceUpDown {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -6px); }
}

/* Two-button layout for step card 2 */
.step-buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.step-buttons-row .btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.step-buttons-row .btn:not([disabled]).btn-primary {
    animation: successPulse 1.8s infinite;
}

#btnCallWaiterStep2 {
    animation: none;
}

/* Flying Toast Notification Banner inside Phone Mockup */
.phone-app-toast {
    position: absolute;
    top: -50px; /* Hidden above the screen viewport */
    left: 16px;
    right: 16px;
    background: var(--success);
    color: #040810;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4), 0 0 15px rgba(16, 185, 129, 0.2);
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 50; /* Needs to float above app bars and content */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.phone-app-toast.active {
    top: 16px; /* Slides down into view */
}

/* ==========================================================================
   ADICIONALES DE COMPATIBILIDAD MÓVIL Y OPTIMIZACIÓN DE RENDIMIENTO
   ========================================================================== */

/* 1. Optimización para móviles pequeños (iPhone SE, etc.) y simulación responsiva */
@media (max-width: 480px) {
    .phone-container {
        width: 100% !important; /* Permite adaptarse a pantallas angostas sin desbordamiento */
        max-width: 310px;       /* Ancho seguro para evitar scroll lateral con padding de contenedor */
        height: 640px !important; /* Altura compacta */
        border-width: 6px !important; /* Marco del teléfono más delgado */
        border-radius: 30px !important;
    }
    
    .phone-earpiece {
        width: 40px !important;
        top: 8px !important;
    }
    
    .phone-camera {
        top: 6px !important;
        left: calc(50% + 30px) !important;
    }

    .phone-home-button {
        width: 30px !important;
        bottom: 6px !important;
    }

    .phone-screen {
        padding: 18px 12px 14px 12px !important; /* Menor padding interno */
    }

    /* Aumento de área táctil de botones de interacción dentro del simulador */
    .app-food-item button, 
    .chef-recommendation button,
    .btn-xs {
        min-width: 36px;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 2. Optimización de rendimiento para blurs costosos de GPU */
@media (max-width: 767px) {
    .bg-glow {
        filter: blur(80px) !important; /* Reducir carga de rasterización en GPU móvil */
        opacity: 0.08 !important;      /* Mantener consistencia con menor difuminado */
    }
}

/* --- Theme Toggle Button --- */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.light-mode .theme-toggle:hover {
    background: rgba(15, 23, 42, 0.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Toggle visibility of icons depending on theme */
/* Default theme is Dark: show Sun, hide Moon */
.theme-toggle .sun-icon {
    display: block;
}
.theme-toggle .moon-icon {
    display: none;
}

/* Light theme: show Moon, hide Sun */
.light-mode .theme-toggle .sun-icon {
    display: none;
}
.light-mode .theme-toggle .moon-icon {
    display: block;
}


/* ==========================================================================
   SOFTREST - LIGHT THEME SYSTEM (PREMIUM LIGHT GLASSMORPHISM)
   ========================================================================== */

.light-mode {
    --dark-bg: #f8fafc; /* Crisp white-blue canvas */
    --card-bg: rgba(255, 255, 255, 0.7); /* Highly reflective glass card background */
    --glass-bg: rgba(241, 245, 249, 0.6); /* Soft light gray glass */
    --border-color: rgba(15, 23, 42, 0.08); /* Dark slate subtle border */
    --border-hover: rgba(15, 23, 42, 0.15);
    
    --text-primary: #0f172a; /* Deep charcoal slate */
    --text-secondary: #475569; /* Slate gray */
    --text-muted: #64748b; /* Cool gray */
    --primary-glow: hsla(var(--primary-hue), 92%, 50%, 0.08);
    --slider-track: rgba(71, 85, 105, 0.2);
    --slider-track-hover: rgba(71, 85, 105, 0.3);
}

/* Light Theme Component Overrides */
.light-mode body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
}

.light-mode .text-gradient {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    color: var(--primary);
}

.light-mode .bg-glow {
    opacity: 0.22; /* Balanced opacity for elegant gradient visibility in light mode */
    filter: blur(110px); /* Moderate blur for a smooth blend that remains noticeable */
}

.light-mode .bg-glow-2 {
    opacity: 0.28; /* Slightly higher opacity for blue contrast against light canvas */
}

.light-mode .main-header {
    background: rgba(248, 250, 252, 0.8);
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

.light-mode .btn-secondary {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
    color: var(--text-primary);
}

.light-mode .btn-secondary:hover {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.15);
}

.light-mode .btn-outline {
    border-color: rgba(15, 23, 42, 0.15);
    color: var(--text-primary);
}

.light-mode .btn-outline:hover {
    background: rgba(15, 23, 42, 0.04);
    border-color: var(--text-primary);
    color: var(--text-primary);
    box-shadow: 0 0 12px rgba(15, 23, 42, 0.08);
}

.light-mode .badge {
    background: rgba(15, 23, 42, 0.04);
}

.light-mode .comp-bar.traditional {
    background: rgba(15, 23, 42, 0.05);
}

.light-mode .step-card:hover {
    background: rgba(15, 23, 42, 0.01) !important;
}

.light-mode .step-card.active {
    background: rgba(244, 123, 47, 0.05) !important;
}

.light-mode .step-icon-number {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
}

.light-mode .step-card.active .step-icon-number {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.light-mode .phone-container {
    background: #0f172a; /* Keep mockup shell dark for realistic screen bezel contrast */
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.09);
}

.light-mode .phone-screen {
    background: #ffffff; /* Mockup screen background defaults to white in light theme */
    color: #0f172a;
}

.light-mode .camera-simulator {
    background: #f1f5f9; /* Light background for camera preview area */
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.light-mode .qr-mock {
    color: rgba(15, 23, 42, 0.85); /* Dark QR code for light preview area */
}

.light-mode .phone-app-bar {
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.light-mode .phone-app-content {
    background: #f1f5f9;
}

.light-mode .chef-recommendation {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035);
}

.light-mode .app-food-item {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.light-mode .app-food-item:hover {
    border-color: rgba(244, 123, 47, 0.3);
}

.light-mode .phone-app-footer {
    background: #f8fafc;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.light-mode .simulated-receipt {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

.light-mode .academic-note {
    background: linear-gradient(135deg, rgba(244, 123, 47, 0.05), rgba(15, 23, 42, 0.01));
}

.light-mode .step-buttons-row .btn[disabled] {
    background: rgba(15, 23, 42, 0.05);
    color: rgba(15, 23, 42, 0.4);
}

.light-mode .main-footer {
    background: #f1f5f9;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.light-mode .footer-bottom {
    background: #e2e8f0;
    border-top-color: rgba(15, 23, 42, 0.06);
}

.light-mode .main-footer .text-muted {
    color: #475569 !important; /* Increased contrast for footer bottom in light mode */
}





.light-mode .elegant-form input[type="text"],
.light-mode .elegant-form input[type="email"],
.light-mode .elegant-form input[type="tel"],
.light-mode .elegant-form select {
    background: rgba(15, 23, 42, 0.03);
}

.light-mode .elegant-form input:focus,
.light-mode .elegant-form select:focus {
    background: rgba(15, 23, 42, 0.05);
}

.light-mode .elegant-form select option {
    background: #ffffff;
    color: var(--text-primary);
}

@media (max-width: 767px) {
    .light-mode .bg-glow {
        opacity: 0.18 !important; /* Balanced mobile blurs in light mode */
        filter: blur(75px) !important;
    }
}



