/* ====== VARIABLES CSS ====== */
:root {
    --primary-color: #0066cc; /* Azul corporativo */
    --secondary-color: #00a0e9; /* Azul vibrante */
    --accent-color: #ff6b35; /* Naranja vibrante */
    --light-color: #ffffff;
    --light-bg: #f8fafc;
    --dark-color: #2d3748;
    --gray-color: #718096;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --box-shadow: 0 10px 30px rgba(0, 102, 204, 0.1);
    --border-radius: 16px;
    --gradient-primary: linear-gradient(135deg, #0066cc 0%, #00a0e9 100%);
    --gradient-secondary: linear-gradient(135deg, #00a0e9 0%, #00c9ff 100%);
    --gradient-accent: linear-gradient(135deg, #ff6b35 0%, #ff8e53 100%);
    --gradient-logo: linear-gradient(135deg, #0066cc 0%, #00a0e9 50%, #00c9ff 100%);
    --gradient-lang: linear-gradient(135deg, #ffffff 0%, #e6f0ff 50%, #cce0ff 100%);
}

/* ====== RESET Y ESTILOS BASE ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #444;
    background-color: var(--light-bg);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    color: var(--dark-color);
}

h1 {
    font-size: 3.8rem;
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

h3 {
    font-size: 2rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--gray-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 25px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.5s ease;
    z-index: -1;
}

.btn:hover:before {
    width: 100%;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--gradient-primary);
    color: white;
}

section {
    padding: 100px 0;
    position: relative;
}

.text-center {
    text-align: center;
}

/* ====== BARRA DE IDIOMAS ====== */
.language-bar {
    background: var(--gradient-lang);
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 10002;
    transition: transform 0.3s ease;
}

.language-bar.hidden {
    transform: translateY(-100%);
}

.language-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-label i {
    color: var(--secondary-color);
    font-size: 1rem;
}

.language-label span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.lang-switcher {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang-switcher a {
    font-weight: 600;
    font-size: 0.85rem;
    position: relative;
    padding: 6px 12px;
    border-radius: 4px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 102, 204, 0.15);
    color: var(--dark-color);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lang-switcher a:before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    padding: 1px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lang-switcher a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
    border-color: rgba(0, 102, 204, 0.3);
}

.lang-switcher a:hover:before {
    opacity: 1;
}

.lang-switcher a.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.2);
}

.lang-switcher a.active:before {
    opacity: 0;
}

.lang-switcher a i {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ====== ENCABEZADO Y NAVEGACIÓN ====== */
.header {
    position: fixed;
    top: 50px;
    left: 0;
    width: 100%;
    z-index: 10001;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
    transition: var(--transition);
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 40px rgba(0, 102, 204, 0.1);
    top: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
}

/* LOGO con efecto de gradiente animado - MODIFICADO */
.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    position: relative;
}

.logo-text {
    background: var(--gradient-logo);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    background-size: 200% auto;
    animation: gradient-shift 5s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.logo:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.logo:hover:after {
    transform: scaleX(1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--dark-color);
    position: relative;
    padding: 5px 0;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-links a:hover:after {
    width: 100%;
}

.whatsapp-link {
    display: flex;
    align-items: center;
    color: #25D366;
    font-weight: 700;
    font-size: 1.1rem;
    background: rgba(37, 211, 102, 0.1);
    padding: 12px 25px;
    border-radius: 50px;
    border: 1px solid rgba(37, 211, 102, 0.2);
    transition: var(--transition);
}

.whatsapp-link:hover {
    transform: translateY(-3px);
    background: rgba(37, 211, 102, 0.2);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.1);
}

.whatsapp-link i {
    color: #25D366;
    margin-right: 10px;
    font-size: 1.4rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 10001;
}

/* ====== PIE DE PÁGINA ====== */
.footer {
    background: linear-gradient(135deg, #1a2b4d 0%, #0d1a33 100%);
    color: #d1d9e8;
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(0, 102, 204, 0.3);
}

.footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-secondary);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin-bottom: 25px;
    display: block;
}

.footer-logo span {
    background: var(--gradient-logo);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: gradient-shift 5s ease-in-out infinite;
}

.footer h4 {
    color: white;
    margin-bottom: 30px;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 15px;
}

.footer h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: #b0b8d0;
    display: inline-block;
    position: relative;
    padding-left: 0;
}

.footer-links a:before {
    content: '›';
    position: absolute;
    left: 0;
    opacity: 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 20px;
}

.footer-links a:hover:before {
    opacity: 1;
    left: 0;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: #b0b8d0;
    transition: var(--transition);
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.contact-details {
    list-style: none;
}

.contact-details li {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.contact-details i {
    color: var(--secondary-color);
    margin-right: 15px;
    margin-top: 5px;
    font-size: 1.2rem;
    min-width: 25px;
}

.contact-details div {
    color: #b0b8d0;
    font-size: 0.95rem;
}

.footer-qr {
    margin-top: 20px;
    text-align: center;
}

.footer-qr img {
    max-width: 160px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: white;
    padding: 10px;
}

.footer-qr p {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #b0b8d0;
}

.copyright {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
    color: #8a95b5;
}

/* ====== ANIMACIONES ====== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 160, 233, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 160, 233, 0.8);
    }
}

.float-animation {
    animation: float 5s ease-in-out infinite;
}

.pulse-glow-animation {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1), transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1200px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    h1 {
        font-size: 3.2rem;
    }
    
    h2 {
        font-size: 2.4rem;
    }
}

@media (max-width: 992px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 80px 0;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        z-index: 10000;
        border-right: 1px solid rgba(0, 102, 204, 0.1);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 15px 0;
        font-size: 1.2rem;
    }
    
    .whatsapp-link {
        font-size: 1rem;
        padding: 10px 20px;
    }
    
    .language-bar {
        padding: 8px 0;
    }
    
    .language-bar .container {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .lang-switcher {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
      /* 进一步调整小屏幕 */
    .navbar {
        grid-template-columns: auto 1fr auto;
        grid-template-areas: 
            "logo whatsapp menu";
        gap: 10px;
    }
    
    /* 在768px以下隐藏导航链接网格区域，只显示三列布局 */
    .nav-links {
        display: none;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .logo {
        max-width: 120px; /* 进一步限制LOGO宽度 */
        font-size: 1rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .whatsapp-link {
        font-size: 0.7rem;
        padding: 6px 12px;
        margin-right: 10px;
    }
    
    .whatsapp-link i {
        font-size: 1rem;
        margin-right: 5px;
    }
    
    .mobile-menu-btn {
        font-size: 1.2rem;
        padding: 5px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .service-card, .article-content {
        padding: 25px 20px;
    }
    
    section {
        padding: 60px 0;
    }
    
    /* 调整服务网格间距 */
    .services-grid, .knowledge-grid {
        gap: 20px;
    }
    
    /* 调整语言切换器以适应小屏幕 */
    .lang-switcher {
        max-width: 200px; /* 限制最大宽度 */
    }
    
    .lang-switcher a {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .navbar {
        gap: 5px;
        padding: 10px 0;
    }
    
    .logo {
        max-width: 100px;
        font-size: 0.9rem;
    }
    
    .logo-text {
        font-size: 0.9rem;
    }
    
    .whatsapp-link {
        font-size: 0.65rem;
        padding: 5px 8px;
        margin-right: 5px;
    }
    
    .whatsapp-link i {
        font-size: 0.9rem;
        margin-right: 3px;
    }
    
    .mobile-menu-btn {
        font-size: 1.1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        padding: 14px 25px;
        font-size: 0.9rem;
    }
    
    /* 调整语言标签 */
    .language-label {
        font-size: 0.85rem;
    }
    
    .language-label span {
        display: none; /* 在小屏幕上隐藏"Seleccionar idioma:"文字 */
    }
}