/* Variables de colores corporativos */
:root {
    --color-primary: #0056b3;
    --color-secondary: #00897b;
    --color-accent: #3949ab;
    --color-light: #ffffff;
    --color-dark: #1a1a2e;
    --color-text-light: #4a4a68;
    --color-text-dark: #e0e0e0;
    --color-success: #00a389;
    --color-warning: #ffa000;
    --color-danger: #d32f2f;
    --color-info: #0288d1;
    --color-glow: rgba(0, 86, 179, 0.4);
    --transition-standard: all 0.3s ease;
}

/* Estilos para modo oscuro */
[data-theme="dark"] {
    --color-light: #1a1a2e;
    --color-dark: #ffffff;
    --color-text-light: #e0e0e0;
    --color-text-dark: #4a4a68;
    --color-glow: rgba(57, 73, 171, 0.4);
}

/* Estilos generales */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-text-light);
    background-color: var(--color-light);
    transition: var(--transition-standard);
}

/* Efecto de brillo para texto */
.text-glow {
    text-shadow: 0 0 10px var(--color-glow);
    transition: var(--transition-standard);
}

.text-glow:hover {
    text-shadow: 0 0 15px var(--color-glow);
}

/* Estilo para el logo */
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

/* Estilos para el carrusel */
.carousel-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide:not(.hidden) {
    opacity: 1;
    z-index: 1;
}

/* Formulario de contacto mejorado */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form .form-container {
    background-color: var(--color-light);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition-standard);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-form .form-container:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

input, textarea, select {
    transition: var(--transition-standard);
    border: 2px solid rgba(0, 0, 0, 0.05);
    background: var(--color-light);
    color: var(--color-text-light);
}

input:hover, textarea:hover, select:hover {
    border-color: rgba(0, 86, 179, 0.3);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-glow);
    outline: none;
}

/* Botones mejorados */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: var(--transition-standard);
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px var(--color-glow);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Efectos de hover para enlaces de navegación */
nav a {
    position: relative;
    transition: var(--transition-standard);
    color: var(--color-text-light);
}

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

nav a:hover::after {
    width: 100%;
}

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

/* Tarjetas con efecto de sombra */
.card {
    transition: var(--transition-standard);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background-color: var(--color-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1), 
                0 0 15px var(--color-glow);
}

/* Mejoras en las tarjetas de servicios */
.service-card {
    transition: var(--transition-standard);
    border-radius: 8px;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1),
                0 0 15px var(--color-glow);
}

.service-card i {
    transition: var(--transition-standard);
    color: var(--color-primary);
}

.service-card:hover i {
    transform: scale(1.1);
}

/* Interruptor de modo oscuro/claro */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-primary);
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.theme-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    color: var(--color-dark);
    font-size: 14px;
}

.sun-icon {
    left: 8px;
    opacity: 1;
}

.moon-icon {
    right: 8px;
    opacity: 0.5;
}

input:checked + .slider .sun-icon {
    opacity: 0.5;
}

input:checked + .slider .moon-icon {
    opacity: 1;
}

/* Media queries para responsive */
@media (max-width: 768px) {
    .carousel-container {
        height: 300px;
    }
    
    #inicio {
        padding-top: 70px;
    }
    
    .contact-form {
        max-width: 100%;
        padding: 0 20px;
    }
}

/* Secciones */
section {
    padding: 4rem 0;
    position: relative;
    min-height: 300px; /* Ensure minimum height for sections */
    display: block; /* Make sure sections display properly */
    width: 100%; /* Full width */
}

section:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Fix for section visibility */
section:not(#inicio) {
    padding-top: 6rem; /* Add more padding for non-hero sections */
    margin-top: -2rem; /* Adjust for fixed header */
}

/* Encabezados de sección */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--color-primary);
}

/* Animación suave para elementos - Fix visibility issues */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Add this to ensure fade-in elements become visible */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        animation: fadeInAnimation 0.8s forwards;
        animation-delay: 0.2s;
    }
    
    @keyframes fadeInAnimation {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Estilos para los botones de modo */
.mode-btn {
    transition: all 0.3s ease;
}

.mode-btn.active {
    background-color: rgba(0, 86, 179, 0.2);
    box-shadow: 0 0 5px rgba(0, 86, 179, 0.3);
}

.mode-btn:hover {
    background-color: rgba(0, 86, 179, 0.1);
}

/* Estilos para los diferentes modos */
.tablet-mode .container {
    max-width: 768px !important;
}

.mobile-mode .container {
    max-width: 480px !important;
}