:root{
    --dark: #030a15;
    --primary: #1b2d4d;
    --secondary: #516173;
    --light: #f8f9f8;
    --accent: #ddccb9;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    color: #374151;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Imágenes responsivas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Enlaces */
a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Clases de animación */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out forwards;
}

.animate-pulse-slow {
    animation: pulse 2s ease-in-out infinite;
}

/* Estilos para el menú móvil */
#mobileNav {
    animation: slideDown 0.3s ease-out;
    z-index: 9999;
}

/* Transición suave para elementos interactivos */
.service-card,
.contact-form input,
.contact-form textarea,
.contact-form select,
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efectos hover para tarjetas */
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Estilos para botones */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* Placeholder estilizado */
::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Focus styles */
:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #3b82f6;
    color: white;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.875rem;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 1.875rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons a {
        width: 100%;
    }
}

/* Estilos para el loader del formulario */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Estilos para mensajes de éxito/error */
.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Estilos para la sección de contacto */
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* Estilos para las estadísticas */
.stat-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Estilos para el footer */
.footer-links li a:hover {
    padding-left: 0.5rem;
    color: white;
}

/* Clases utilitarias */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.box-shadow-hover:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Gradientes personalizados */
.gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-white-blue {
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
}

/* Utilitarios para transiciones */
.transition-all-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estilos para imágenes en hero */
.hero-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.hero-image-container img {
    transition: transform 0.5s ease;
}

.hero-image-container:hover img {
    transform: scale(1.05);
}

/* Estilos para iconos */
.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Asegurar que los inputs sean legibles en móvil */
input, textarea, select {
    font-size: 16px; /* Previene zoom en iOS */
}

/* Clases de utilidad para márgenes y paddings */
.section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Estilos para el botón de volver arriba */
#backToTop {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
}

/* Estilos para el menú activo */
.nav-link.active {
    color: #3b82f6;
    font-weight: 600;
}

/* Estilos para validación de formulario */
.invalid {
    border-color: #ef4444 !important;
}

.valid {
    border-color: #10b981 !important;
}

/* Clase para ocultar elementos con transición */
.hidden-transition {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.visible-transition {
    opacity: 1;
    visibility: visible;
}

/* Estilos para efecto de onda */
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
}

/* Clase para sombras suaves */
.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Ajustes para mejorar la legibilidad */
p {
    max-width: 65ch;
}

/* Clase para limitar el ancho del texto */
.text-container {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

/* Media queries adicionales */
@media (max-width: 1024px) {
    .lg\:text-left {
        text-align: left;
    }
}

/* Clase para animación de entrada gradual */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* Añadir estas clases al final de tu main.css existente */

/* Header centrado mejorado */
@media (min-width: 1024px) {
    .logo {
        flex-shrink: 0;
    }
    
    nav > div {
        width: 100%;
    }
}

/* Efecto hover para enlaces del header */
.group:hover .group-hover\:w-full {
    width: 100%;
}

/* Animación para el menú móvil */
.animate-slide-down {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejoras para el footer */
footer a:hover {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}

/* Estilos para botones flotantes */
.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Ajustes responsivos para header */
@media (max-width: 1023px) {
    .logo {
        margin: 0 auto;
    }
}

/* Mejoras visuales para hover en servicios */
.service-card:hover .icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Efecto de brillo para elementos interactivos */
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}