/* VARIABLES Y RESETEO */
:root {
    --primary-color: #0056b3;
    --secondary-color: #e63946;
    --dark-color: #1a1a1a;
    --light-color: #f4f4f4;
    --white: #ffffff;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
    /* Evita scroll horizontal indeseado */
}

a {
    text-decoration: none;
    color: var(--dark-color);
}

ul {
    list-style: none;
}

/* UTILIDADES GENÉRICAS */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    /* Padding dinámico */
}

.section {
    padding: clamp(50px, 8vw, 100px) 0;
    /* Espaciado fluido */
}

.text-center {
    text-align: center;
    margin-bottom: clamp(30px, 5vw, 50px);
}

.text-white {
    color: var(--white) !important;
}

/* BOTONES */
.btn {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    /* Bordes más redondeados y modernos */
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.btn:hover {
    background: #c1121f;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6);
}

/* NAVEGACIÓN */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.4s ease;
}

/* Efecto Glassmorphism al hacer scroll */
header.scrolled {
    background-color: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(10px);
    padding: 8px 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    /* Para que quede por encima del menú móvil */
}

.logo-img {
    height: clamp(45px, 6vw, 70px);
    width: auto;
    transition: height 0.3s ease;
}

.logo h2 {
    color: var(--white);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    transition: font-size 0.3s ease;
}

.logo span {
    color: var(--secondary-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav ul {
    display: flex;
    gap: 25px;
}

nav a {
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

/* Animación sutil de subrayado en el menú */
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--secondary-color);
}

/* ICONOS SOCIALES EN EL HEADER */
.social-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-icons a {
    color: var(--white);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--secondary-color);
    transform: scale(1.1) translateY(-2px);
}

/* BOTÓN MENÚ MÓVIL */
.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

/* EFECTOS SCROLL HEADER */
header.scrolled .logo-img {
    height: clamp(40px, 5vw, 50px);
}

header.scrolled .logo h2 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

header.scrolled nav a {
    font-size: 0.95rem;
}

/* HERO SECTION */
.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.carousel,
.slide,
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 5s linear;
    /* Añadido efecto zoom sutil */
}

.slide.active {
    opacity: 1;
    transform: scale(1.05);
}

.hero-overlay {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 86, 179, 0.4));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 0 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    /* Texto ultra adaptativo */
    line-height: 1.1;
    margin-bottom: 25px;
    font-weight: 800;
    text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.6);
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: 40px;
    font-weight: 400;
    text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.5);
}

/* NOSOTROS */
.nosotros-section {
    position: relative;
    color: var(--white);
    overflow: hidden;
}

.nosotros-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

.nosotros-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.85), rgba(26, 26, 26, 0.9));
    z-index: 2;
}

.nosotros-content {
    position: relative;
    z-index: 3;
    max-width: 850px;
}

.nosotros-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 25px;
    text-transform: uppercase;
}

.nosotros-content p {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    margin-bottom: 20px;
    line-height: 1.8;
}

/* SERVICIOS */
.services-dark {
    background: var(--dark-color);
    color: var(--white);
}

.services-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-box {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.service-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 2;
    transition: background 0.4s ease;
}

.service-box:hover::before {
    transform: scale(1.15);
}

.service-box:hover::after {
    background: rgba(0, 0, 0, 0.7);
}

.service-content {
    position: relative;
    z-index: 3;
    padding: 30px;
    width: 100%;
}

.service-content h3 {
    font-size: 2rem;
    color: var(--white);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: transform 0.4s ease;
}

.service-box:hover .service-content h3 {
    color: var(--secondary-color);
    transform: translateY(-10px);
}

.service-extra {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.service-box:hover .service-extra {
    max-height: 200px;
    opacity: 1;
    margin-top: 15px;
}

.service-extra p {
    font-size: 1.05rem;
    color: #ddd;
    line-height: 1.5;
}

/* SECCIÓN CONTACTO Y MAPA */
.contact-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: center;
}

.contact-details h2 {
    color: var(--primary-color);
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.contact-details p {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    margin-bottom: 30px;
    color: #555;
}

.contact-info li {
    margin-bottom: 25px;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-info i {
    color: var(--secondary-color);
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
    margin-top: 3px;
}

.contact-map {
    width: 100%;
    height: clamp(300px, 40vw, 450px);
    /* Altura fluida del mapa */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* FOOTER */
footer {
    background: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 25px 5%;
    font-size: 0.95rem;
}

/* ========================================= */
/* MEDIA QUERIES (SÚPER RESPONSIVIDAD)       */
/* ========================================= */

@media(max-width: 900px) {

    /* Activar el Menú Hamburguesa */
    .menu-toggle {
        display: block;
    }

    /* Diseño del panel lateral para móviles */
    .nav-right {
        position: fixed;
        top: 0;
        right: -100%;
        /* Oculto fuera de la pantalla por defecto */
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        padding: 50px 20px;
        transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

    /* Clase que se activa mediante JS */
    .nav-right.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        margin-bottom: 40px;
    }

    nav a {
        font-size: 1.5rem;
        /* Letras más grandes en el celular para tocar fácil */
    }

    .social-icons {
        justify-content: center;
        gap: 25px;
    }

    .social-icons a {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}

@media(max-width: 600px) {

    /* Ajustes extra para pantallas de celulares muy pequeños */
    .contact-grid {
        gap: 30px;
    }

    .btn {
        width: 100%;
        /* Botón ancho completo en móviles */
    }

    .service-box {
        min-height: 300px;
        /* Reducir altura un poco para que quepa bien en pantalla */
    }
}