/* ==========================================
   Variables CSS
   ========================================== */
:root {
    /* Colores principales */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #06b6d4;
    --accent-color: #10b981;
    
    /* Colores de salud */
    --health-blue: #60a5fa;
    --health-cyan: #22d3ee;
    --health-teal: #14b8a6;
    
    /* Neutrales */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --white: #ffffff;
    --black: #000000;
    
    /* WhatsApp */
    --whatsapp-green: #25d366;
    --whatsapp-dark: #128c7e;
    
    /* Tipografía */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    
    /* Espaciado */
    --container-width: 1200px;
    --section-padding: 80px 0;
    --section-padding-mobile: 60px 0;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transiciones */
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

/* ==========================================
   Utilidades
   ========================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   Tipografía
   ========================================== */
.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.section-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* ==========================================
   Botones
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

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

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

.btn-large {
    padding: 16px 36px;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================
   Header / Navegación
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition-base);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.nav-logo .logo {
    height: 50px;
    width: auto;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--gray-700);
    border-radius: 3px;
    transition: var(--transition-base);
}

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

.nav-link {
    font-weight: 500;
    color: var(--gray-700);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.nav-link:hover::after {
    width: 100%;
}

.btn-whatsapp-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--whatsapp-green);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
}

.btn-whatsapp-nav:hover {
    background: var(--whatsapp-dark);
    transform: translateY(-2px);
}

.btn-whatsapp-nav::after {
    display: none;
}

/* ==========================================
   Botón flotante WhatsApp
   ========================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--whatsapp-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    z-index: 999;
    transition: var(--transition-base);
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    background: var(--whatsapp-dark);
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--health-cyan));
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/hero-optica.jpg') center/cover no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(6, 182, 212, 0.85));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-title-highlight {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    margin-top: 12px;
}

.hero-subtitle {
    font-size: 1.375rem;
    margin-bottom: 40px;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.hero-trust {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 30px;
}

/* ==========================================
   Señales Section
   ========================================== */
.signals-section {
    padding: var(--section-padding);
    background: linear-gradient(to bottom, var(--gray-50), var(--white));
}

.signals-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 40px;
}

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

.signal-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.signal-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.signal-icon {
    flex-shrink: 0;
    color: var(--primary-color);
}

.signal-item p {
    font-weight: 500;
    color: var(--gray-700);
    line-height: 1.5;
}

.signals-cta {
    text-align: center;
    margin-top: 40px;
}

/* ==========================================
   About Section
   ========================================== */
.about-section {
    padding: var(--section-padding);
    background: var(--white);
}

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

.about-image img {
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    width: 100%;
}

.about-text {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* ==========================================
   Services Section
   ========================================== */
.services-section {
    padding: var(--section-padding);
    background: linear-gradient(to bottom, var(--white), var(--gray-50));
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--white);
    padding: 40px 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    text-align: center;
}

.service-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    border-radius: 16px;
    margin: 0 auto 24px;
}

.service-icon svg {
    color: var(--white);
}

.service-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.service-description {
    color: var(--gray-600);
    line-height: 1.7;
}

/* ==========================================
   Why Us Section
   ========================================== */
.why-us-section {
    padding: var(--section-padding);
    background: var(--white);
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.why-card {
    text-align: center;
    padding: 48px 32px;
    background: linear-gradient(to bottom, var(--gray-50), var(--white));
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

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

.why-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, var(--primary-color), var(--health-cyan));
    border-radius: 50%;
    margin: 0 auto 24px;
}

.why-icon svg {
    color: var(--white);
}

.why-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.why-description {
    color: var(--gray-600);
    line-height: 1.7;
    font-size: 1.0625rem;
}

/* ==========================================
   Quality Section
   ========================================== */
.quality-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--gray-50), var(--white));
}

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

.quality-intro {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 32px;
    line-height: 1.8;
}

.quality-benefits {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.benefit-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.benefit-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(8px);
}

.benefit-icon {
    flex-shrink: 0;
    color: var(--accent-color);
}

.benefit-item h4 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.benefit-item p {
    color: var(--gray-600);
    line-height: 1.6;
}

.quality-highlight {
    display: flex;
    gap: 20px;
    padding: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 16px;
    color: var(--white);
}

.quality-highlight svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.highlight-text {
    font-size: 1.0625rem;
    line-height: 1.7;
}

.quality-image img {
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    width: 100%;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-section {
    padding: var(--section-padding);
    background: linear-gradient(to bottom, var(--white), var(--gray-50));
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-card {
    display: flex;
    gap: 20px;
    padding: 28px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: var(--transition-base);
}

.contact-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.contact-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    border-radius: 12px;
    color: var(--white);
}

.contact-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.contact-link {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

.contact-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-note {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.social-links {
    margin-top: 32px;
}

.social-icons {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 12px;
    transition: var(--transition-base);
}

.social-icon:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-4px);
}

/* ==========================================
   Formulario de Contacto
   ========================================== */
.contact-form-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.form-group label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 6px;
    display: none;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ef4444;
}

.form-group.error .form-error {
    display: block;
}

.form-success {
    padding: 16px;
    background: #d1fae5;
    border: 2px solid #10b981;
    border-radius: 8px;
    color: #065f46;
    font-weight: 600;
    text-align: center;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    width: 160px;
    margin-bottom: 16px;
}

.footer-tagline {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
}

.footer-text {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
}

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

.footer-links a {
    color: var(--gray-400);
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 8px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-contact svg {
    flex-shrink: 0;
    color: var(--primary-light);
}

.footer-contact a {
    color: var(--gray-400);
}

.footer-contact a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--gray-800);
    color: var(--gray-500);
    font-size: 0.875rem;
}

.footer-bottom p:first-child {
    margin-bottom: 8px;
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

/* ==========================================
   Responsive Design
   ========================================== */

/* Tablet */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.5rem;
    }
    
    /* Navegación móvil */
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 82px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 82px);
        background: var(--white);
        flex-direction: column;
        padding: 40px;
        gap: 24px;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.125rem;
    }
    
    /* Hero */
    .hero {
        min-height: 600px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-title-highlight {
        font-size: 1.875rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 320px;
    }
    
    /* Grids */
    .about-grid,
    .quality-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .signals-grid {
        grid-template-columns: 1fr;
    }
    
    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    /* Contacto */
    .contact-form-wrapper {
        padding: 32px 24px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    :root {
        --section-padding: 50px 0;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title-highlight {
        font-size: 1.5rem;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }
    
    .service-card,
    .why-card {
        padding: 32px 24px;
    }
    
    .quality-highlight {
        flex-direction: column;
        padding: 24px;
    }
    
    .contact-form-wrapper {
        padding: 24px 20px;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
