:root {
    --primary: #023047;
    --secondary: #FB8500;
    --accent: #219EBC;
    --light: #8ECAE6;
    --dark: #023047;
    --highlight: #FFB703;
    --transition: all 0.4s ease;
    
    /* Colores base light theme */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f4f4f4;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #888888;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --box-shadow: rgba(0,0,0,0.1);
}

/* Dark theme variables */
[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: #444444;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --card-bg: #4e4b4b;
    --box-shadow: rgb(232, 65, 65);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header y Navegación */
header {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    background-size: 200% 200%;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: gentlePulse 12s ease-in-out infinite;
}

[data-theme="dark"] header {
    background: linear-gradient(135deg, var(--primary), #001a2d);
}

@keyframes gentlePulse {
    0%, 100% {
        background-position: 0% 50%;
        filter: brightness(1);
    }
    25% {
        background-position: 50% 50%;
        filter: brightness(1.05);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1);
    }
    75% {
        background-position: 50% 50%;
        filter: brightness(1.05);
    }
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1); /* Siempre blanco */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--highlight);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--highlight);
    transition: var(--transition);
}

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

.login-btn {
    background-color: var(--secondary);
    padding: 8px 20px;
    border-radius: 50px;
    transition: var(--transition);
}

.login-btn:hover {
    background-color: var(--highlight);
    transform: translateY(-2px);
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Toggle switch theme */
/* Toggle switch theme - VERSIÓN CORREGIDA Y SIMPLIFICADA */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--bg-tertiary);
    border-radius: 15px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--secondary);
    border-radius: 50%;
    transition: transform 0.3s ease;
    left: 5px;
}

[data-theme="dark"] .theme-toggle::before {
    transform: translateX(30px);
}

.theme-toggle i {
    font-size: 14px;
    z-index: 1;
    transition: all 0.3s ease;
    position: absolute;
}

/* Posicionar el icono según el tema */
[data-theme="light"] .theme-toggle i {
    left: 8px;
    color: #FFB703;
}

[data-theme="dark"] .theme-toggle i {
    left: 38px;
    color: #8ECAE6;
}

/* Ocultar/mostrar iconos según el tema */
/* [data-theme="light"] .theme-toggle .fa-moon {
    opacity: 0;
}

[data-theme="light"] .theme-toggle .fa-sun {
    opacity: 1;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 0;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 1;
} */

/* Secciones generales */
.section {
    padding: 100px 0;
    background-color: var(--bg-tertiary);
    transition: background-color 0.3s ease;
}

.section.is-secondary {
    background-color: var(--bg-primary);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: white;
    padding: 60px 0 30px;
}

[data-theme="dark"] footer {
    background: linear-gradient(135deg, var(--primary), #001a2d);
}

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

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--secondary);
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 60px;
    width: auto;
}

.footer-column p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: var(--transition);
}

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

.contact-info {
    list-style: none;
}

.contact-info li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-info i {
    color: var(--secondary);
    margin-top: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

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

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

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #aaa;
}

/* Responsive Base */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary);
        flex-direction: column;
        padding: 1rem 0;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/*whatsapp*/
/* Widget combinado de chat */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

/* Icono principal redondo */
.chat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(251, 133, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    animation: bounce 2s infinite;
}

.chat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(251, 133, 0, 0.6);
}

/* Badge de notificación */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #FF4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

/* Contenido expandido */
.chat-content {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

[data-theme="dark"] .chat-content {
    background: var(--card-bg);
    color: var(--text-primary);
}

.chat-widget.expanded .chat-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header del chat */
.chat-header {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
    padding: 15px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-info i {
    font-size: 1.2rem;
}

.chat-info span {
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Cuerpo del chat */
.chat-body {
    padding: 20px;
}

.chat-message {
    margin-bottom: 20px;
    text-align: center;
}

.chat-message p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

[data-theme="dark"] .chat-message p {
    color: var(--text-secondary);
}

/* Opciones de chat */
.chat-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.chat-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.chat-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.whatsapp-option {
    background: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.2);
}

.whatsapp-option:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.4);
}

.telegram-option {
    background: rgba(0, 136, 204, 0.1);
    border-color: rgba(0, 136, 204, 0.2);
}

.telegram-option:hover {
    background: rgba(0, 136, 204, 0.15);
    border-color: rgba(0, 136, 204, 0.4);
}

.option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.whatsapp-option .option-icon {
    background: #25D366;
    color: white;
}

.telegram-option .option-icon {
    background: #0088CC;
    color: white;
}

.option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

[data-theme="dark"] .option-title {
    color: var(--text-primary);
}

.option-desc {
    font-size: 0.8rem;
    color: #666;
}

[data-theme="dark"] .option-desc {
    color: var(--text-secondary);
}

.option-arrow {
    color: #999;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.chat-option:hover .option-arrow {
    transform: translateX(3px);
    color: var(--secondary);
}

/* Footer del chat */
.chat-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

[data-theme="dark"] .chat-footer {
    border-top-color: var(--border-color);
}

.chat-footer small {
    color: #999;
    font-size: 0.75rem;
}

[data-theme="dark"] .chat-footer small {
    color: var(--text-muted);
}

/* Flecha del tooltip */
.chat-content::before {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

[data-theme="dark"] .chat-content::before {
    border-top-color: var(--card-bg);
}

/* Animaciones */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chat-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .chat-content {
        width: calc(100vw - 40px);
        right: -10px;
    }
    
    .chat-content::before {
        right: 30px;
    }
    
    .chat-option {
        padding: 12px;
    }
}

/* Estados del widget */
.chat-widget.minimized .chat-content {
    display: block;
}
/*Fin whatsapp*/


/* Flecha de regresar al inicio */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(251, 133, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--highlight);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 183, 3, 0.4);
}

.back-to-top i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.back-to-top:hover i {
    transform: translateY(-2px);
}

/* Efecto de pulso sutil */
.back-to-top::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--secondary);
    border-radius: 50%;
    opacity: 0;
    animation: pulse-ring 3s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Posición alternativa para no interferir con WhatsApp */
@media (min-width: 1200px) {
    .back-to-top {
        left: 30px;
        bottom: 30px;
    }
    
    #whatsapp-widget {
        right: 30px;
        bottom: 30px;
    }
}

/* En móviles, posicionar de manera que no interfieran */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 90px; /* Para que no choque con WhatsApp */
        left: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top i {
        font-size: 1.1rem;
    }
}

/* Para tablets */
@media (max-width: 992px) and (min-width: 769px) {
    .back-to-top {
        bottom: 100px;
        left: 25px;
    }
}
/* Fin flecha de regresar al inicio */

/* Botón de presupuesto en header */
/* Reset completo de efectos problemáticos */
.budget-btn,
.budget-btn:hover,
.budget-btn:focus {
    background: var(--accent);
    color: white !important;
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    opacity: 1 !important;
    visibility: visible !important;
}

.budget-btn:hover {
    background: var(--highlight);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 158, 188, 0.3);
}

/* Asegurar que el texto sea siempre visible */
.budget-btn span {
    display: inline !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: white !important;
}
/* Fin botón de presupuesto en header */