/* Definición de la paleta de colores usando variables CSS - Ampliada */
:root {
    --azul-carbon: #1E2E40;
    --azul-carbon-claro: #2a4055;
    --azul-electrico: #4A90E2;
    --azul-electrico-brillante: #5aa0f0;
    --azul-electrico-suave: rgba(74, 144, 226, 0.1);
    --naranja-lava: #FF5733;
    --naranja-lava-brillante: #ff6b4c;
    --naranja-lava-suave: rgba(255, 87, 51, 0.1);
    --blanco: #FFFFFF;
    --gris-claro: #f5f7fa;
    --degradado-azul: linear-gradient(135deg, var(--azul-carbon) 0%, var(--azul-electrico) 100%);
    --degradado-naranja: linear-gradient(135deg, var(--naranja-lava) 0%, #ff8c42 100%);
    --sombra-suave: 0 5px 15px rgba(30, 46, 64, 0.1);
    --sombra-media: 0 8px 25px rgba(30, 46, 64, 0.15);
    --sombra-intensa: 0 12px 30px rgba(30, 46, 64, 0.2);
}

/* Estilos globales y reseteo mejorados */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--azul-carbon);
    background-color: var(--blanco);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Contenedor central para el contenido */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Encabezado y logo mejorados */
header {
    background: var(--degradado-azul);
    color: var(--blanco);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--sombra-suave);
}

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

.logo {
    font-size: 2.2em;
    font-weight: bold;
    color: var(--naranja-lava);
    text-decoration: none;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.logo:hover {
    color: var(--naranja-lava-brillante);
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--blanco);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

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

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

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

/* Estilos de la sección principal (hero) mejorada */
.hero {
    background: linear-gradient(rgba(30, 46, 64, 0.85), rgba(30, 46, 64, 0.8)), url('/assets/images/background-hero.webp') no-repeat center center/cover;
    color: var(--blanco);
    text-align: center;
    padding: 180px 20px;
    position: relative;
    overflow: hidden;
    animation: fadeIn 1.5s ease-in;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, var(--azul-electrico) 0%, transparent 50%);
    opacity: 0.2;
    animation: pulse 10s infinite alternate;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    animation: slideUp 1s ease-out;
}

.hero p {
    font-size: 1.3em;
    max-width: 600px;
    margin: 0 auto 40px;
    animation: slideUp 1.2s ease-out;
}

.cta-button {
    display: inline-block;
    background: var(--degradado-naranja);
    color: var(--blanco);
    padding: 16px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(255, 87, 51, 0.3);
    position: relative;
    overflow: hidden;
    animation: slideUp 1.4s ease-out;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 87, 51, 0.4);
}

.cta-button:hover::before {
    left: 100%;
}

/* Estilos de la sección de servicios mejorada */
.services {
    padding: 100px 0;
    text-align: center;
    background-color: var(--gris-claro);
}

.services h2 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: var(--azul-carbon);
    position: relative;
    display: inline-block;
}

.services h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--degradado-naranja);
    border-radius: 2px;
}

.services > p {
    font-size: 1.2em;
    max-width: 700px;
    margin: 0 auto 60px;
    color: var(--azul-carbon-claro);
}

.service-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.service-item {
    flex: 0 0 calc(33.333% - 30px);
    background-color: var(--blanco);
    padding: 40px 25px;
    border-radius: 15px;
    box-shadow: var(--sombra-suave);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 0;
    background: var(--degradado-naranja);
    transition: height 0.4s ease;
}

.service-item:hover {
    transform: translateY(-12px);
    box-shadow: var(--sombra-intensa);
}

.service-item:hover::before {
    height: 100%;
}

.service-icon {
    font-size: 3.5em;
    color: var(--azul-electrico);
    background: var(--azul-electrico-suave);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.4s ease;
}

.service-item:hover .service-icon {
    background: var(--naranja-lava-suave);
    color: var(--naranja-lava);
    transform: rotateY(180deg);
}

.service-item h3 {
    font-size: 1.6em;
    margin: 15px 0;
    color: var(--azul-electrico);
    transition: color 0.3s ease;
}

.service-item:hover h3 {
    color: var(--naranja-lava);
}

.service-item p {
    color: var(--azul-carbon-claro);
}

/* Estilos del formulario de contacto mejorado */
.contact {
    padding: 100px 0;
    text-align: center;
    background: var(--degradado-azul);
    color: var(--blanco);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, var(--azul-electrico) 0%, transparent 70%);
    opacity: 0.1;
}

.contact-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    background: var(--blanco);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--sombra-intensa);
}

.contact h2 {
    color: var(--azul-carbon);
    font-size: 2.5em;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.contact h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--degradado-naranja);
    border-radius: 2px;
}

.contact form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.contact input, .contact textarea {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background-color: var(--gris-claro);
}

.contact input:focus, .contact textarea:focus {
    border-color: var(--azul-electrico);
    box-shadow: 0 0 0 3px var(--azul-electrico-suave);
    outline: none;
}

.contact label {
    position: absolute;
    top: 18px;
    left: 20px;
    color: #6c757d;
    transition: all 0.3s ease;
    pointer-events: none;
}

.contact input:focus + label,
.contact textarea:focus + label,
.contact input:not(:placeholder-shown) + label,
.contact textarea:not(:placeholder-shown) + label {
    top: -12px;
    left: 10px;
    font-size: 0.85em;
    background: var(--blanco);
    padding: 0 8px;
    color: var(--azul-electrico);
}

.contact button {
    background: var(--degradado-naranja);
    color: var(--blanco);
    border: none;
    padding: 18px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(255, 87, 51, 0.3);
    margin-top: 10px;
}

.contact button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 87, 51, 0.4);
}

/* Estilos del pie de página mejorado */
footer {
    background: var(--azul-carbon);
    color: var(--blanco);
    padding: 50px 0 20px;
    position: relative;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1 1 250px;
}

.footer-section h3 {
    color: var(--naranja-lava);
    margin-bottom: 20px;
    font-size: 1.4em;
    position: relative;
    display: inline-block;
}

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

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--blanco);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--naranja-lava);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--azul-carbon-claro);
    border-radius: 50%;
    color: var(--blanco);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--naranja-lava);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--azul-carbon-claro);
}

.footer-bottom a {
    color: var(--naranja-lava);
    text-decoration: none;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--naranja-lava-brillante);
    text-decoration: underline;
}

/* Nuevas animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { opacity: 0.2; }
    50% { opacity: 0.3; }
    100% { opacity: 0.2; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Efectos de aparición para elementos al hacer scroll */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

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

/* Media queries para diseño responsivo en dispositivos pequeños */
@media (max-width: 992px) {
    .service-item {
        flex: 0 0 calc(50% - 30px);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 100px 20px;
    }
    
    .hero h1 {
        font-size: 2.5em;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .service-item {
        flex: 0 0 100%;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .logo {
        font-size: 1.8em;
    }
    
    .hero h1 {
        font-size: 2em;
    }
    
    .hero p {
        font-size: 1.1em;
    }
    
    .contact-container {
        padding: 30px 20px;
    }
}
