/* --- RESET & VARIABLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-red: #D32F2F;
    --text-cream: #E6DEC6;
    --text-white: #FFFFFF;
    --text-dark: #333333;
    --bg-beige: #F5F0E6;
    --font-main: 'Montserrat', sans-serif;
    --header-height: 80px;
}

body {
    font-family: var(--font-main);
    overflow-x: hidden;
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* --- HEADER & NAV --- */
.main-header {
    background-color: var(--primary-red);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { height: 40px; width: auto; }
.main-nav ul { list-style: none; display: flex; gap: 20px; align-items: center; }
.main-nav a {
    text-decoration: none; color: var(--text-white); font-weight: 700;
    font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase;
    transition: color 0.3s ease; white-space: nowrap;
}
.main-nav a:hover { color: var(--text-cream); }
.main-nav li:not(:last-child)::after {
    content: "|"; color: var(--text-white); margin-left: 20px; opacity: 0.5;
}
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 6px; padding: 5px; }
.mobile-toggle span { display: block; width: 30px; height: 3px; background-color: white; border-radius: 3px; transition: all 0.3s ease; }

/* --- HERO SECTION CORREGIDO --- */
.hero-section {
    position: relative;
    /* CAMBIO 1: Restamos los 80px del header a la altura total para que no genere scroll extra */
    height: calc(100vh - var(--header-height));
    
    /* CAMBIO 2: Empujamos toda la sección hacia abajo para que empiece DESPUÉS del header rojo */
    margin-top: var(--header-height);
    
    /* Asegúrate de que la extensión sea correcta (.jpg o .png según tu archivo) */
    background-image: url('FONDO.png'); 
    background-size: cover;
    
    /* CAMBIO 3: 'top right' ancla la imagen arriba. Como ya bajamos la sección, la cabeza se verá perfecta */
    background-position: top right;
    background-repeat: no-repeat;
    
    display: flex;
    align-items: center;
}
.hero-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0) 100%);
    z-index: 1;
}
/* --- HERO CONTENT CORREGIDO --- */
.hero-content {
    position: relative;
    z-index: 2;
    /* CAMBIO 4: Quitamos el relleno superior porque ya movimos toda la sección con el margin-top */
    padding-top: 0; 
}
.text-block h1 {
    color: var(--text-white); font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1; font-weight: 900; margin-bottom: 5px;
    text-transform: uppercase; text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}
.text-block h2 {
    color: var(--text-cream); font-size: clamp(1.8rem, 4vw, 3.5rem);
    line-height: 1.1; font-weight: 900; text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

/* --- SECCIÓN: WHO WE ARE --- */
.who-we-are {
    background-color: var(--bg-beige);
    padding: 80px 0;
}

.who-we-are-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 60px;
}

.text-content {
    flex: 1;
    max-width: 600px;
}

.text-content h3 {
    color: var(--primary-red);
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 25px;
    margin-top: 80px;
}

.text-content p {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1rem;
}

.round-logo-container {
    flex: 0 0 auto;
}

.round-logo {
    width: 250px;
    height: auto;
    display: block;
}

/* Galería de Imágenes (Home) */
.services-gallery {
    display: flex;
    gap: 20px;
}

.gallery-item {
    flex: 1;
    height: 300px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* --- ESTILOS PÁGINA DE SERVICIOS (WHAT WE DO) --- */

body.services-page {
    background-color: var(--bg-beige);
}

/* Clase para centrar la sección horizontalmente */
.what-we-do.centered-section {
    display: flex;
    justify-content: center;
    width: 100%;
}

.main-content {
    padding-top: var(--header-height); 
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Permite apilar servicios y galería */
}

/* Contenedor de servicios actualizado para centrado perfecto */
.services-container {
    display: flex;
    gap: 60px;
    padding: 60px 20px;
    align-items: center; /* Centrado Vertical Texto vs Imagen */
    justify-content: center; /* Centrado Horizontal */
    max-width: 1200px;
    margin: 0 auto;
}

.services-text {
    flex: 1;
    max-width: 600px; /* Evita que el texto se estire demasiado */
}

.services-text h1 {
    color: var(--primary-red);
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.services-list {
    list-style: none;
}

.services-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 25px;
}

.services-list li::before {
    content: "•";
    color: var(--primary-red);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
    line-height: 1;
}

.service-title {
    color: #000;
    font-weight: 800;
    font-size: 1.05rem;
    display: inline-block;
}

.services-list p {
    color: var(--text-dark);
    margin-top: 5px;
    line-height: 1.5;
    font-size: 1rem;
}

.services-footer-text {
    font-weight: 700;
    color: #000;
    margin-top: 30px;
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Columna de Imagen Centrada */
.services-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.full-height-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.15);
    border-radius: 4px;
}

/* --- NUEVA GALERÍA (SLIDER) --- */
.gallery-section {
    background-color: var(--bg-beige);
    padding: 40px 0 80px 0;
    width: 100%;
}

.gallery-title {
    text-align: center;
    color: var(--primary-red);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.gallery-slider-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-track-container {
    overflow: hidden;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    aspect-ratio: 16/9;
    position: relative;
    background-color: #ddd;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Botones del Slider */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background-color: var(--primary-red);
    color: white;
}

.prev-btn { left: -25px; }
.next-btn { right: -25px; }


/* --- PÁGINA DE CONTACTO --- */

.contact-info-section {
    background-color: var(--bg-beige);
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 60px;
}

.contact-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.contact-details h1 {
    color: var(--primary-red);
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.info-item {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #000;
}

.info-item strong {
    font-weight: 800;
    margin-right: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

.social-icons img:hover {
    transform: scale(1.1);
}

.contact-form-section {
    background-color: #000000;
    color: #ffffff;
    padding: 60px 0 40px 0;
}

.form-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 400;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background-color: #ffffff;
    border: none;
    border-radius: 15px;
    padding: 15px;
    font-size: 1rem;
    outline: none;
}

.btn-send {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 12px 60px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 25px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    transition: background-color 0.3s;
    text-transform: uppercase;
}

.btn-send:hover {
    background-color: #b71c1c;
}

.copyright {
    text-align: right;
    font-size: 0.8rem;
    margin-top: 50px;
    color: #cccccc;
}

/* Indicador de página activa */
.main-nav a.active {
    color: var(--text-cream);
    border-bottom: 2px solid var(--text-cream);
}

/* --- MEDIA QUERIES (Responsividad Global) --- */
@media (max-width: 900px) {
    /* Header Móvil */
    .main-nav li:not(:last-child)::after { display: none; }
    .mobile-toggle { display: flex; }
    .main-nav {
        position: fixed; top: var(--header-height); left: 0; width: 100%;
        background-color: var(--primary-red); height: 0; overflow: hidden;
        transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    .main-nav.active { height: 260px; }
    .main-nav ul { flex-direction: column; padding: 30px 0; gap: 0; }
    .main-nav a { display: block; padding: 15px 0; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); width: 100%; }
    
    /* Hero */
    .hero-section { background-position: 70% center; }
    .hero-section::before { background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%); }

    /* Who We Are */
    .who-we-are { padding: 50px 0; }
    .who-we-are-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .round-logo-container { margin-top: 20px; }
    .services-gallery { flex-direction: column; }
    .gallery-item { height: 250px; }

    /* Servicios Page */
    .services-container {
        flex-direction: column-reverse; /* Texto arriba, Imagen abajo */
        padding-top: 30px;
        text-align: center;
    }
    .main-content { align-items: flex-start; }
    .services-image-container { width: 100%; }
    .full-height-img {
        height: 100%;
        object-fit: cover;
        object-position: top;
    }
    
    /* Galería Slider Móvil */
    .prev-btn { left: 10px; } 
    .next-btn { right: 10px; }

    /* Contacto */
    .contact-grid {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
    }
    .social-icons { align-self: flex-start; }
    .contact-details h1 { font-size: 1.8rem; }
    .form-wrapper { padding: 0 10px; }
    .copyright { text-align: center; }
}