/* ===== VARIABLES CSS ===== */
:root {
    /* Colores principales */
    --primary-color: #0B1426;
    --secondary-color: #1E3A5F;
    --accent-color: #4A90E2;
    --accent-light: #7BB3F0;
    --accent-dark: #2E5984;

    /* Colores de texto */
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-light: #6B7280;
    --text-white: #FFFFFF;

    /* Colores de fondo */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-dark: #0B1426;
    --bg-overlay: rgba(11, 20, 38, 0.8);

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #0B1426 0%, #1E3A5F 50%, #4A90E2 100%);
    --gradient-secondary: linear-gradient(135deg, #4A90E2 0%, #7BB3F0 100%);
    --gradient-overlay: linear-gradient(rgba(11, 20, 38, 0.7), rgba(30, 58, 95, 0.8));

    /* Tipografía */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Roboto Slab', serif;

    /* Tamaños de fuente */
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.25rem;
    --fs-2xl: 1.5rem;
    --fs-3xl: 1.875rem;
    --fs-4xl: 2.25rem;
    --fs-5xl: 3rem;
    --fs-6xl: 4rem;

    /* Espaciado */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 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);

    /* Transiciones */
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;

    /* Bordes redondeados */
    --radius-sm: 0.25rem;
    --radius-base: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Z-index */
    --z-dropdown: 1000;
    --z-modal: 1050;
    --z-tooltip: 1060;
    --z-navbar: 1070;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    /* Cursor normal - sin personalización problemática */
    cursor: default;
}

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

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

ul,
ol {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===== UTILIDADES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-fluid {
    max-width: 100%;
    padding: 0 var(--spacing-lg);
}

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

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

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

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

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

.justify-between {
    justify-content: space-between;
}

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

/* ===== NAVEGACIÓN ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(11, 20, 38, 0.95);
    backdrop-filter: blur(20px);
    z-index: var(--z-navbar);
    transition: var(--transition-base);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
    background: rgba(11, 20, 38, 0.98);
    box-shadow: var(--shadow-lg);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--text-white);
    font-weight: 700;
    font-size: var(--fs-xl);
}

.nav-logo img {
    height: 40px;
    width: auto;
    border-radius: var(--radius-sm);
}

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

.nav-link {
    color: var(--text-white);
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-base);
    position: relative;
    transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-light);
}

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

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

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-primary);
    min-width: 200px;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
    z-index: var(--z-dropdown);
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-primary);
    transition: var(--transition-base);
}

.dropdown-content a:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-white);
    transition: var(--transition-base);
    border-radius: var(--radius-sm);
}

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

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

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

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    overflow: hidden;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Burbujas - estilos mejorados */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    bottom: -100px;
    animation: bubble-rise linear infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

@keyframes bubble-rise {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-overlay);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    color: var(--text-white);
    text-align: center;
}

.hero-title {
    font-size: clamp(var(--fs-4xl), 5vw, var(--fs-6xl));
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
    font-family: var(--font-secondary);
}

.hero-title .highlight {
    color: var(--accent-light);
    position: relative;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    animation: slideIn 1s ease-out 0.5s both;
}

.typing-effect {
    border-right: 2px solid var(--accent-light);
    animation: blink 1s infinite;
    min-height: 1.2em;
    display: inline-block;
}

.hero-subtitle {
    font-size: var(--fs-xl);
    margin-bottom: var(--spacing-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    line-height: 1.6;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-3xl);
    margin-bottom: var(--spacing-3xl);
    flex-wrap: wrap;
}

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

.stat-number {
    display: block;
    font-size: var(--fs-4xl);
    font-weight: 700;
    color: var(--accent-light);
    font-family: var(--font-secondary);
}

.stat-label {
    font-size: var(--fs-sm);
    opacity: 0.8;
    margin-top: var(--spacing-xs);
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    font-weight: 600;
    font-size: var(--fs-base);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition-slow);
    z-index: 0;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn>* {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-secondary);
    color: var(--text-white);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border-color: var(--accent-light);
}

.btn-secondary:hover {
    background: var(--accent-light);
    color: var(--text-primary);
}

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

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--text-white);
}

.btn-large {
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: var(--fs-lg);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-2xl);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-white);
    opacity: 0.7;
    z-index: 3;
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-white);
    border-radius: 12px;
    position: relative;
    margin: 0 auto var(--spacing-sm);
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--text-white);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

.scroll-indicator span {
    font-size: var(--fs-sm);
    opacity: 0.8;
}

/* ===== SECCIONES ===== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-4xl);
}

.section-tag {
    display: inline-block;
    background: var(--gradient-secondary);
    color: var(--text-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: clamp(var(--fs-3xl), 4vw, var(--fs-5xl));
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-secondary);
    line-height: 1.2;
}

.section-description {
    font-size: var(--fs-xl);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== SERVICIOS PREVIEW ===== */
.services-preview {
    padding: var(--spacing-4xl) 0;
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-2xl);
}

.service-card {
    background: var(--bg-primary);
    padding: var(--spacing-3xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-secondary);
}

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

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.service-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    transition: var(--transition-slow);
    opacity: 0;
}

.service-card:hover .service-icon::before {
    animation: shine 0.8s ease-in-out;
}

.service-icon i {
    font-size: var(--fs-3xl);
    color: var(--text-white);
}

.service-content h3 {
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-secondary);
}

.service-content p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.service-features {
    margin-bottom: var(--spacing-xl);
}

.service-features li {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.service-features i {
    color: var(--accent-color);
    font-size: var(--fs-sm);
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--accent-color);
    font-weight: 600;
    transition: var(--transition-base);
}

.service-link:hover {
    color: var(--accent-dark);
    gap: var(--spacing-md);
}

/* ===== WHY CHOOSE US ===== */
.why-choose-us {
    padding: var(--spacing-4xl) 0;
    background: var(--bg-primary);
}

.why-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4xl);
    align-items: center;
}

.why-text h2 {
    font-size: clamp(var(--fs-3xl), 4vw, var(--fs-4xl));
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-secondary);
}

.why-text p {
    font-size: var(--fs-lg);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
    line-height: 1.7;
}

.why-features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.feature-item {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: var(--fs-xl);
    color: var(--text-white);
}

.feature-content h4 {
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.feature-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.why-image {
    position: relative;
}

.image-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.image-container img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
}

.image-container:hover .image-overlay {
    opacity: 1;
}

.image-container:hover img {
    transform: scale(1.05);
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(74, 144, 226, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
}

.play-button:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.play-button i {
    font-size: var(--fs-2xl);
    color: var(--text-white);
    margin-left: 4px;
}

/* ===== QUICK TIPS ===== */
.quick-tips {
    padding: var(--spacing-4xl) 0;
    background: var(--bg-secondary);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-3xl);
}

.tip-card {
    background: var(--bg-primary);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-secondary);
}

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

.tip-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
}

.tip-icon i {
    font-size: var(--fs-2xl);
    color: var(--text-white);
}

.tip-card h3 {
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.tip-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.tip-link {
    color: var(--accent-color);
    font-weight: 600;
    transition: var(--transition-base);
}

.tip-link:hover {
    color: var(--accent-dark);
}

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

/* ===== FINAL CTA ===== */
.final-cta {
    padding: var(--spacing-4xl) 0;
    background: var(--gradient-primary);
    color: var(--text-white);
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(var(--fs-3xl), 4vw, var(--fs-4xl));
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-secondary);
}

.cta-content p {
    font-size: var(--fs-xl);
    margin-bottom: var(--spacing-2xl);
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: var(--spacing-4xl) 0 var(--spacing-xl);
}

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

.footer-section h3 {
    font-size: var(--fs-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: var(--accent-light);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    font-size: var(--fs-xl);
    font-weight: 700;
}

.footer-logo img {
    height: 40px;
    width: auto;
    border-radius: var(--radius-sm);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.footer-section ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-base);
}

.footer-section ul li a:hover {
    color: var(--accent-light);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

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

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.8);
}

.contact-info i {
    color: var(--accent-light);
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-xl);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 800px;
    box-shadow: var(--shadow-2xl);
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--text-white);
    font-size: var(--fs-3xl);
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.close:hover {
    background: rgba(0, 0, 0, 0.7);
}

#video-container {
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 16/9;
}

#video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== ANIMACIONES ===== */
@keyframes slideIn {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

@keyframes scroll {
    0% {
        top: 8px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

@keyframes shine {
    0% {
        opacity: 0;
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* ===== BURBUJAS ZIGZAG MEJORADAS ===== */
.bubble-zigzag {
    animation-name: bubbleZigzag !important;
    animation-timing-function: ease-in-out !important;
}

/* Animación zigzag CORREGIDA - las burbujas suben desde abajo */
@keyframes bubbleZigzag {
    0% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0;
    }

    5% {
        opacity: var(--bubble-opacity, 0.8);
    }

    15% {
        transform: translateY(-15vh) translateX(calc(var(--zigzag-offset, 20px) * 0.3)) rotate(30deg);
        opacity: var(--bubble-opacity, 0.8);
    }

    30% {
        transform: translateY(-30vh) translateX(var(--zigzag-offset, 20px)) rotate(90deg);
        opacity: var(--bubble-opacity, 0.8);
    }

    45% {
        transform: translateY(-45vh) translateX(calc(var(--zigzag-offset, 20px) * -0.7)) rotate(150deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.9);
    }

    60% {
        transform: translateY(-60vh) translateX(calc(var(--zigzag-offset, 20px) * 0.4)) rotate(210deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.8);
    }

    75% {
        transform: translateY(-75vh) translateX(calc(var(--zigzag-offset, 20px) * -0.2)) rotate(270deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.6);
    }

    90% {
        transform: translateY(-90vh) translateX(calc(var(--zigzag-offset, 20px) * 0.1)) rotate(330deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.3);
    }

    100% {
        transform: translateY(-110vh) translateX(0px) rotate(360deg);
        opacity: 0;
    }
}

/* ===== BURBUJAS - ESTILOS CORREGIDOS ===== */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    backdrop-filter: blur(1px);
    /* Asegurar que las burbujas estén visibles */
    z-index: 3;
}

/* Animación zigzag mejorada */
@keyframes bubbleZigzag {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }

    5% {
        opacity: var(--bubble-opacity, 0.8);
    }

    20% {
        transform: translateY(80vh) translateX(var(--zigzag-offset, 20px)) rotate(60deg);
    }

    40% {
        transform: translateY(60vh) translateX(calc(var(--zigzag-offset, 20px) * -0.8)) rotate(120deg);
    }

    60% {
        transform: translateY(40vh) translateX(calc(var(--zigzag-offset, 20px) * 0.6)) rotate(180deg);
    }

    80% {
        transform: translateY(20vh) translateX(calc(var(--zigzag-offset, 20px) * -0.4)) rotate(240deg);
    }

    95% {
        opacity: calc(var(--bubble-opacity, 0.8) * 0.5);
    }

    100% {
        transform: translateY(-10vh) translateX(0px) rotate(360deg);
        opacity: 0;
    }
}

/* Clase para aplicar la animación zigzag */
.bubble-zigzag {
    animation-name: bubbleZigzag;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

/* Mejorar visibilidad en diferentes fondos */
.bubble {
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Optimizaciones para móvil */
@media (max-width: 768px) {
    .bubbles-container {
        display: none;
    }

    .bubble {
        display: none;
    }
}

/* Reducir animaciones si el usuario las desactiva */
@media (prefers-reduced-motion: reduce) {

    .bubble,
    .bubbles-container {
        display: none !important;
    }
}

/* ===== OPTIMIZACIONES DE CARGA ===== */
/* Prevenir saltos de layout */
.hero-title .typing-effect {
    min-width: 300px;
    display: inline-block;
    vertical-align: top;
}

/* Suavizar transiciones de entrada */
[data-aos] {
    transition-duration: 0.6s !important;
}

/* Mejorar rendimiento en móviles */
@media (max-width: 768px) {
    .bubble {
        max-width: 50px;
        max-height: 50px;
    }

    #particles-js {
        display: none;
        /* Deshabilitar partículas en móviles */
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .why-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-3xl);
    }

    .why-image {
        order: -1;
    }

    .hero-stats {
        gap: var(--spacing-2xl);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        padding: var(--spacing-xl);
        gap: var(--spacing-lg);
        transform: translateY(-100%);
        transition: var(--transition-base);
        opacity: 0;
        visibility: hidden;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .hamburger {
        display: flex;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-xl);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

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

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Optimizar texto en móviles */
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* ===== MEJORAS DE ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .bubble {
        display: none;
    }

    #particles-js {
        display: none;
    }
}

/* ===== FOCUS STATES MEJORADOS ===== */
a:focus,
button:focus,
.btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ===== ESTADOS DE CARGA ===== */
.loading-state {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.loading-state.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SMOOTH SCROLLING MEJORADO ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ===== MEJORAS DE PERFORMANCE ===== */
.service-card,
.tip-card,
.advice-card {
    will-change: transform;
}

.service-card:hover,
.tip-card:hover,
.advice-card:hover {
    will-change: auto;
}

/* ===== DARK MODE SUPPORT (OPCIONAL) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --text-primary: #ffffff;
        --text-secondary: #b3b3b3;
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    .navbar,
    .hero,
    .scroll-indicator,
    #particles-js,
    .bubbles-container {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* ===== UTILITIES ADICIONALES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.no-scroll {
    overflow: hidden;
}

/* ===== ESTILOS ESPECÍFICOS PARA MEJORAS ===== */
/* Asegurar que el efecto de escritura funcione correctamente */
.typing-effect {
    min-width: 280px;
    text-align: left;
    display: inline-block;
}

/* Evitar saltos en la carga */
.hero-content {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Mejorar la visibilidad de las burbujas */
.bubble {
    backdrop-filter: blur(1px);
}

/* Optimizar las transiciones */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mejorar el contraste en estados de hover */
.btn:hover,
.service-link:hover,
.tip-link:hover {
    filter: brightness(1.1);
}

/* Asegurar que los elementos críticos se carguen rápido */
.nav-logo img,
.hero-title,
.typing-effect {
    font-display: swap;
    contain: layout style paint;
}

/* ===== BURBUJAS - ESTILOS CORREGIDOS Y COMPLETOS ===== */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    backdrop-filter: blur(1px);
    z-index: 3;
    /* Asegurar que las burbujas sean visibles */
    opacity: 1;
}

/* Animación zigzag corregida */
@keyframes bubbleZigzag {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }

    5% {
        opacity: var(--bubble-opacity, 0.8);
    }

    15% {
        transform: translateY(85vh) translateX(calc(var(--zigzag-offset, 20px) * 0.3)) rotate(30deg);
        opacity: var(--bubble-opacity, 0.8);
    }

    30% {
        transform: translateY(70vh) translateX(var(--zigzag-offset, 20px)) rotate(90deg);
        opacity: var(--bubble-opacity, 0.8);
    }

    45% {
        transform: translateY(55vh) translateX(calc(var(--zigzag-offset, 20px) * -0.7)) rotate(150deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.9);
    }

    60% {
        transform: translateY(40vh) translateX(calc(var(--zigzag-offset, 20px) * 0.4)) rotate(210deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.8);
    }

    75% {
        transform: translateY(25vh) translateX(calc(var(--zigzag-offset, 20px) * -0.2)) rotate(270deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.6);
    }

    90% {
        transform: translateY(10vh) translateX(calc(var(--zigzag-offset, 20px) * 0.1)) rotate(330deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.3);
    }

    100% {
        transform: translateY(-10vh) translateX(0px) rotate(360deg);
        opacity: 0;
    }
}

/* Clase para aplicar la animación zigzag */
.bubble-zigzag {
    animation-name: bubbleZigzag;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

/* Mejorar visibilidad de burbujas */
.bubble {
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(255, 255, 255, 0.1);

    /* Gradiente base por si no se aplica desde JS */
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.1) 100%);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* Variaciones de burbujas para más realismo */
.bubble:nth-child(odd) {
    animation-duration: 6s !important;
}

.bubble:nth-child(even) {
    animation-duration: 8s !important;
}

.bubble:nth-child(3n) {
    animation-duration: 5s !important;
    filter: brightness(1.2);
}

/* Hero específico - asegurar contexto */
.hero {
    position: relative;
    overflow: hidden;
}

.hero .bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Optimizaciones para móvil */
@media (max-width: 768px) {

    .bubbles-container,
    .bubble {
        display: none !important;
    }
}

/* Respeto por preferencias de animación */
@media (prefers-reduced-motion: reduce) {

    .bubble,
    .bubbles-container {
        display: none !important;
    }

    @keyframes bubbleZigzag {
        from {
            opacity: 0;
        }

        to {
            opacity: 0;
        }
    }
}

/* Debug - remover en producción */
.bubbles-container[data-debug="true"] {
    border: 2px dashed red;
    background: rgba(255, 0, 0, 0.1);
}

.bubble[data-debug="true"] {
    border: 2px solid lime !important;
    background: rgba(0, 255, 0, 0.3) !important;
}

/* ===== BURBUJAS - ESTILOS CORREGIDOS Y COMPLETOS ===== */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    backdrop-filter: blur(1px);
    z-index: 3;
    /* Asegurar que las burbujas sean visibles */
    opacity: 1;
}

/* Animación zigzag corregida */
@keyframes bubbleZigzag {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }

    5% {
        opacity: var(--bubble-opacity, 0.8);
    }

    15% {
        transform: translateY(85vh) translateX(calc(var(--zigzag-offset, 20px) * 0.3)) rotate(30deg);
        opacity: var(--bubble-opacity, 0.8);
    }

    30% {
        transform: translateY(70vh) translateX(var(--zigzag-offset, 20px)) rotate(90deg);
        opacity: var(--bubble-opacity, 0.8);
    }

    45% {
        transform: translateY(55vh) translateX(calc(var(--zigzag-offset, 20px) * -0.7)) rotate(150deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.9);
    }

    60% {
        transform: translateY(40vh) translateX(calc(var(--zigzag-offset, 20px) * 0.4)) rotate(210deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.8);
    }

    75% {
        transform: translateY(25vh) translateX(calc(var(--zigzag-offset, 20px) * -0.2)) rotate(270deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.6);
    }

    90% {
        transform: translateY(10vh) translateX(calc(var(--zigzag-offset, 20px) * 0.1)) rotate(330deg);
        opacity: calc(var(--bubble-opacity, 0.8) * 0.3);
    }

    100% {
        transform: translateY(-10vh) translateX(0px) rotate(360deg);
        opacity: 0;
    }
}

/* Clase para aplicar la animación zigzag */
.bubble-zigzag {
    animation-name: bubbleZigzag;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

/* Mejorar visibilidad de burbujas */
.bubble {
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(255, 255, 255, 0.1);

    /* Gradiente base por si no se aplica desde JS */
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.1) 100%);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* Hero específico - asegurar contexto */
.hero {
    position: relative;
    overflow: hidden;
}

.hero .bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* ===== SOLUCIÓN DEFINITIVA ANTI-SALTOS ===== */
.bubble {
    animation: none !important;
    transition: none !important;
    transform-origin: center center !important;
    will-change: transform !important;
}

/* Deshabilitar CUALQUIER animación CSS existente */
.bubble.bubble-zigzag,
.bubble[class*="bubble"] {
    animation: none !important;
}

/* Remover transforms conflictivos */
@keyframes bubbleZigzag {

    0%,
    100% {
        transform: none !important;
    }
}

/* Forzar solo JavaScript */
.bubbles-container .bubble {
    animation-name: none !important;
    animation-duration: 0s !important;
}

/* Hero con burbujas - agregar al CSS existente */
.services-hero.hero {
    position: relative;
    overflow: hidden;
    min-height: 60vh;
}

.services-hero #particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.services-hero .bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.services-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 20, 38, 0.3);
    z-index: 2;
}

.services-hero .hero-content {
    position: relative;
    z-index: 3;
}

/* ===== HERO CON BURBUJAS PARA CONSEJOS ===== */
.consejos-hero.hero {
    position: relative;
    overflow: hidden;
    min-height: 60vh;
}

.consejos-hero #particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.consejos-hero .bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.consejos-hero .hero-overlay {
    position: relative;
    z-index: 2;
}

.consejos-hero .hero-content {
    position: relative;
    z-index: 3;
}
/* ============================================================
   CORRECCIONES DE LEGIBILIDAD (SABC DIVING)
   ============================================================ */

/* 1. PÁGINA DE CONSEJOS (consejos.php) */

/* Listas en tarjetas de consejos y línea de tiempo */
.advice-card .checklist li,
.timeline-content .checklist li {
    color: #111827 !important; /* Gris casi negro */
    background: rgba(74, 144, 226, 0.12) !important; /* Fondo azul suave con contraste */
}

/* Bloques de Urgencia (¿Cuándo llevar tu equipo?) */
.urgency-card .warning-signs li {
    color: #111827 !important;
}
.urgency-card.critical .warning-signs li { background: rgba(239, 68, 68, 0.15) !important; }
.urgency-card.moderate .warning-signs li { background: rgba(245, 158, 11, 0.15) !important; }
.urgency-card.preventive .warning-signs li { background: rgba(16, 185, 129, 0.15) !important; }

/* Caja de acción requerida (teléfono/cita) */
.urgency-card .action-required {
    color: #111827 !important;
    background: #f1f5f9 !important;
}


/* 2. PÁGINA DE SERVICIOS (servicios.php) */

/* Listas técnicas (Reguladores, BCD, etc.) */
.technical-list li {
    color: #111827 !important;
    background: rgba(74, 144, 226, 0.12) !important;
    font-weight: 500;
}

/* Tablas de especificaciones y certificaciones (fondos grises) */
.spec-item, .cert-item, .schedule-item {
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
}
.spec-label, .cert-label, .frequency {
    color: #374151 !important; /* Gris oscuro */
}
.spec-value, .cert-value, .description {
    color: #1d4ed8 !important; /* Azul fuerte para los datos */
    font-weight: 600;
}

/* Tarjetas de Precios (Sección inferior) */
.pricing-card {
    color: #111827 !important;
}
.pricing-card .pricing-features li {
    color: #374151 !important;
}
.pricing-card .price-range {
    color: #2563eb !important; /* Azul brillante para el precio */
}
.pricing-card .delivery-time {
    background: #f8fafc !important;
    color: #1e40af !important;
}

/* Marcas que reparamos (Burbujas azules) */
.brand-item {
    background: #2563eb !important; /* Azul sólido para que el texto blanco resalte */
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Ajuste para textos en secciones con fondo oscuro (bg-dark / hero) */
.hero-content p, .services-cta p, .footer p {
    color: rgba(255, 255, 255, 0.9) !important;
}