/*
 * Claudia Montesino - Psicóloga en Badalona
 * Sistema de diseño escalable y moderno
 * Version: 2.0
 */

/* ========================================
   1. VARIABLES CSS (Design Tokens)
   ======================================== */
:root {
    /* Paleta de colores principal - Tranquilidad y confianza */
    --primary: #4A90A4;
    --primary-dark: #2D6B7C;
    --primary-light: #6FB5C9;
    --primary-lighter: #D4EAF2;
    
    --secondary: #86C5A8;
    --secondary-dark: #5FA88C;
    --secondary-light: #B0E0CC;
    
    --accent: #E88D7A;
    --accent-dark: #D67560;
    
    /* Grises */
    --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;
    
    /* Estados */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Tipografía */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    /* Tamaños de fuente (escala modular 1.25) */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    
    /* Espaciado (escala 8px) */
    --space-1: 0.5rem;   /* 8px */
    --space-2: 1rem;     /* 16px */
    --space-3: 1.5rem;   /* 24px */
    --space-4: 2rem;     /* 32px */
    --space-5: 2.5rem;   /* 40px */
    --space-6: 3rem;     /* 48px */
    --space-8: 4rem;     /* 64px */
    --space-10: 5rem;    /* 80px */
    
    /* Sombras (elevation system) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border radius */
    --radius-sm: 0.25rem;   /* 4px */
    --radius: 0.5rem;       /* 8px */
    --radius-md: 0.75rem;   /* 12px */
    --radius-lg: 1rem;      /* 16px */
    --radius-xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;
    
    /* Transiciones */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index scale */
    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-tooltip: 1060;
}

/* ========================================
   2. RESET Y BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: #ffffff;
}

/* Accesibilidad: Skip to content */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: var(--space-2);
    text-decoration: none;
    z-index: var(--z-tooltip);
}

.skip-to-content:focus {
    top: 0;
}

/* ========================================
   3. NAVBAR MODERNA
   ======================================== */
.navbar-custom {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    padding: var(--space-2) 0;
}

.navbar-custom.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar-brand-custom {
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--gray-900);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.navbar-brand-custom:hover {
    color: var(--primary);
}

.nav-link-custom {
    font-weight: 500;
    color: var(--gray-700);
    padding: var(--space-1) var(--space-2);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

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

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
    width: 80%;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: var(--space-2);
    margin-top: var(--space-1);
}

.dropdown-item {
    border-radius: var(--radius);
    padding: var(--space-2);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--primary-lighter);
    color: var(--primary-dark);
    transform: translateX(4px);
}

/* Mejorar flecha dropdown */
.dropdown-toggle::after {
    border: none !important;
    content: "\f078" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    margin-left: 0.5rem;
    vertical-align: middle;
    transition: transform var(--transition-fast);
    color: var(--gray-700);
}

.dropdown-toggle:hover::after {
    color: var(--primary);
}

.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Navbar móvil mejorado */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        margin-top: var(--space-3);
        padding: var(--space-3);
    }
    
    .nav-link-custom {
        padding: var(--space-3) var(--space-2);
        border-radius: var(--radius);
    }
    
    .nav-link-custom:hover {
        background: var(--primary-lighter);
    }
    
    .nav-link-custom::after {
        display: none;
    }
    
    .dropdown-menu {
        box-shadow: none;
        background: var(--gray-50);
        margin-top: var(--space-2);
        margin-left: var(--space-2);
    }
    
    .btn-primary-custom {
        width: 100%;
        text-align: center;
        margin-top: var(--space-2);
    }
}

/* ----------------------------------------
   Mega Menu Styles
   ---------------------------------------- */
.dropdown-mega .dropdown-menu-mega {
    min-width: 650px;
    border: none;
    border-radius: var(--radius-lg);
    margin-top: 10px;
    padding: 0;
    overflow: hidden;
}

.dropdown-mega .dropdown-header {
    font-size: var(--text-xs);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: var(--space-2) var(--space-2) var(--space-1);
    margin-bottom: 0;
    color: var(--primary-dark);
    background: transparent;
}

.dropdown-mega .dropdown-item {
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    padding: 0.5rem 1rem;
    font-size: var(--text-sm);
}

.dropdown-mega .dropdown-item:hover {
    background: var(--primary-lighter);
    color: var(--primary-dark);
    transform: translateX(5px);
}

.dropdown-mega .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Flecha del mega dropdown */
.dropdown-arrow {
    font-size: 0.65rem;
    transition: transform var(--transition-base);
    opacity: 0.7;
}

.dropdown-mega.show .dropdown-arrow,
.dropdown-mega:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Ocultar la flecha duplicada de Bootstrap */
.dropdown-mega .dropdown-toggle::after {
    display: none !important;
}

/* Color morado para TOC */
.text-purple {
    color: #9333ea !important;
}

/* Mega menu en móvil */
@media (max-width: 991.98px) {
    .dropdown-mega .dropdown-menu-mega {
        min-width: 100%;
        border-radius: 0;
        margin-top: var(--space-2);
        box-shadow: none;
        background: var(--gray-50);
    }
    
    .dropdown-mega .dropdown-menu-mega .row {
        flex-direction: column;
    }
    
    .dropdown-mega .dropdown-header {
        padding-top: var(--space-3);
    }
    
    .dropdown-mega .dropdown-item:hover {
        transform: none;
    }
}

/* ========================================
   4. BOTONES (Sistema completo)
   ======================================== */
.btn {
    font-weight: 600;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.25);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
    color: white;
}

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

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

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

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

/* ========================================
   5. HERO SECTION (Modern Premium Design)
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, #f8fbfd 0%, #e8f4f8 50%, #d4eaf2 100%);
    padding: clamp(4rem, 10vh, 8rem) 0 clamp(3rem, 8vh, 6rem);
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

/* Decoraciones de fondo sutiles */
.hero-decoration {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(134, 197, 168, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
}

.hero-decoration-2 {
    position: absolute;
    bottom: -15%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232, 141, 122, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Avatar circular pequeño */
.hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 8px 24px rgba(74, 144, 164, 0.2), 0 0 0 1px rgba(74, 144, 164, 0.1);
    transition: transform var(--transition-base);
}

.hero-avatar:hover {
    transform: scale(1.05);
}

/* Badge moderno */
.badge-pill {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(232, 141, 122, 0.12) 0%, rgba(232, 141, 122, 0.08) 100%);
    border: 1.5px solid var(--accent);
    color: var(--accent-dark);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    animation: pulse-subtle 3s ease-in-out infinite;
}

@keyframes pulse-subtle {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(232, 141, 122, 0.3); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(232, 141, 122, 0); }
}

/* Título hero moderno */
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

.text-highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.text-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
    opacity: 0.3;
    border-radius: 4px;
    z-index: -1;
}

/* Descripción hero */
.hero-description {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.7;
    color: var(--gray-700);
    max-width: 600px;
}

/* Stats mini glassmorphism */
.stats-mini {
    display: flex;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 164, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 164, 0.15);
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Botones modernos con glassmorphism */
.hero-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary-modern {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    box-shadow: 0 4px 16px rgba(74, 144, 164, 0.3);
    transition: all var(--transition-base);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary-modern:hover::before {
    left: 100%;
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(74, 144, 164, 0.4);
    color: white;
}

.btn-secondary-modern {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-secondary-modern:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(74, 144, 164, 0.3);
}

/* Hero visual con floating cards */
.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-shape {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(134, 197, 168, 0.2) 0%, rgba(74, 144, 164, 0.2) 100%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 8s ease-in-out infinite;
    position: absolute;
}

@keyframes morph {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    25% { border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%; }
    50% { border-radius: 30% 70% 50% 50% / 60% 30% 70% 40%; }
    75% { border-radius: 50% 50% 60% 40% / 40% 70% 30% 60%; }
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.5rem;
}

.floating-card.card-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-card.card-1 i { color: var(--accent); }

.floating-card.card-2 {
    top: 50%;
    right: 5%;
    animation-delay: 2s;
}

.floating-card.card-2 i { color: var(--primary); }

.floating-card.card-3 {
    bottom: 15%;
    left: 15%;
    animation-delay: 4s;
}

.floating-card.card-3 i { color: var(--secondary); }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(2deg); }
    66% { transform: translateY(-5px) rotate(-2deg); }
}

/* ========================================
   6. CARDS MODERNOS (Premium Design)
   ======================================== */
.card-custom {
    background: white;
    border-radius: 20px;
    padding: var(--space-5);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all var(--transition-slow);
    border: 1px solid rgba(74, 144, 164, 0.08);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
}

.card-custom:hover::before {
    transform: scaleX(1);
}

.card-custom:hover {
    box-shadow: 0 12px 32px rgba(74, 144, 164, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-8px);
    border-color: rgba(74, 144, 164, 0.2);
}

.card-custom i {
    transition: all var(--transition-base);
    position: relative;
}

.card-custom:hover i {
    transform: scale(1.15) rotate(5deg);
}

/* ========================================
   7. SECCIONES (Layout patterns)
   ======================================== */
section {
    padding: var(--space-8) 0;
}

section.bg-light {
    background: linear-gradient(180deg, var(--gray-50) 0%, white 100%);
}

.section-badge {
    display: inline-block;
    background: var(--primary-lighter);
    color: var(--primary-dark);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: var(--space-3);
}

.lead {
    font-size: var(--text-lg);
    color: var(--gray-600);
}

/* ========================================
   8. TESTIMONIOS
   ======================================== */
.card-custom .fa-star {
    color: #fbbf24;
    font-size: var(--text-lg);
}

.text-warning {
    color: #fbbf24 !important;
}

/* ========================================
   9. ACCORDION FAQ (Moderno)
   ======================================== */
.accordion-item {
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
}

.accordion-button {
    background: white;
    font-weight: 600;
    color: var(--gray-900);
    padding: var(--space-3) var(--space-4);
    transition: all var(--transition-base);
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.accordion-body {
    padding: var(--space-4);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--gray-700);
}

/* ========================================
   10. FOOTER
   ======================================== */
.footer-custom {
    background: linear-gradient(180deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: var(--gray-300);
    padding: var(--space-8) 0 var(--space-4);
}

.footer-custom h5,
.footer-custom h6 {
    color: white;
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.footer-custom a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.footer-custom .list-unstyled li {
    margin-bottom: var(--space-1);
}

/* ========================================
   11. UTILIDADES
   ======================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-muted {
    color: var(--gray-600) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.rounded {
    border-radius: var(--radius-lg) !important;
}

/* ========================================
   12. ANIMACIONES
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation para cards */
.card-custom:nth-child(1) { animation-delay: 0.1s; }
.card-custom:nth-child(2) { animation-delay: 0.2s; }
.card-custom:nth-child(3) { animation-delay: 0.3s; }
.card-custom:nth-child(4) { animation-delay: 0.4s; }
.card-custom:nth-child(5) { animation-delay: 0.5s; }
.card-custom:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   13. RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 991.98px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --space-10: 4rem;
        --space-8: 3rem;
    }
    
    .hero-section {
        padding: var(--space-6) 0;
        min-height: auto;
    }
    
    .hero-visual {
        height: 300px;
    }
    
    .floating-card {
        font-size: 0.8rem;
        padding: 0.75rem 1rem;
    }
    
    section {
        padding: var(--space-6) 0;
    }
}

@media (max-width: 767.98px) {
    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --space-10: 3rem;
        --space-8: 2.5rem;
    }
    
    .hero-avatar {
        width: 60px;
        height: 60px;
    }
    
    .hero-cta-group {
        flex-direction: column;
    }
    
    .btn-primary-modern,
    .btn-secondary-modern {
        width: 100%;
        justify-content: center;
    }
    
    .stats-mini {
        gap: 0.5rem;
    }
    
    .stat-item {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        text-align: center;
    }
    
    .hero-visual {
        height: 250px;
        margin-top: 2rem;
    }
    
    .floating-card {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .floating-card i {
        font-size: 1.2rem;
    }
    
    .card-custom {
        padding: var(--space-4);
    }
}

/* ========================================
   14. PRINT STYLES
   ======================================== */
@media print {
    .navbar-custom,
    .btn,
    footer {
        display: none !important;
    }
}

/* ========================================
   15. DARK MODE SUPPORT (Preparado)
   ======================================== */
@media (prefers-color-scheme: dark) {
    /* Se puede activar en futuras versiones */
}

/* ========================================
   16. PERFORMANCE OPTIMIZATIONS
   ======================================== */
.hero-section img,
.card-custom img {
    will-change: transform;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background: var(--gray-200);
}

/* ========================================
   17. ACCESIBILIDAD
   ======================================== */
.btn:focus,
.nav-link-custom:focus {
    outline: 3px solid rgba(74, 144, 164, 0.5);
    outline-offset: 2px;
}

/* Mejoras visuales adicionales */
.hero-section .d-flex.gap-3 {
    color: var(--gray-700);
}

.hero-section strong {
    color: var(--primary-dark);
}

section.bg-light {
    background: linear-gradient(180deg, #F5F8FA 0%, white 100%);
}

/* Reducir animaciones para usuarios que lo prefieran */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   18. ESTILOS ADICIONALES - DISEÑO PERSONAL
   ======================================== */

/* Iconos con colores cálidos */
.fa-heartbeat { color: var(--accent) !important; }
.fa-cloud-rain { color: var(--primary) !important; }
.fa-heart { color: var(--accent) !important; }
.fa-battery-empty { color: var(--secondary) !important; }
.fa-user-check { color: var(--secondary) !important; }

/* Mejora de legibilidad */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
}

p {
    line-height: 1.7;
}

/* Botones más cálidos */
.btn-secondary-custom {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(74, 144, 164, 0.15);
}

/* Card con fondo suave */
.card-custom {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-base);
    border: 1px solid rgba(74, 144, 164, 0.1);
    height: 100%;
}

.card-custom:hover {
    box-shadow: 0 8px 24px rgba(74, 144, 164, 0.15);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

/* Mejora del footer con colores más suaves */
.footer-custom {
    background: linear-gradient(180deg, #2D3E50 0%, #1a252f 100%);
    color: var(--gray-300);
    padding: var(--space-8) 0 var(--space-4);
}

/* Proceso con íconos circulares más atractivos */
.bg-primary.text-white.rounded-circle {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    box-shadow: 0 4px 12px rgba(74, 144, 164, 0.3);
}

/* Transición suave en hover de enlaces */
a {
    transition: all var(--transition-fast);
}

/* Badge de trust con mejor contraste */
.hero-section .d-flex.align-items-center {
    background: rgba(255, 255, 255, 0.7);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius);
    backdrop-filter: blur(5px);
}
