/* =========================================
   1. VARIABLES Y RESETEO
   ========================================= */
:root {
    --primary-red: #E3001B;
    --dark-bg: #1B2129;
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --bg-crema: #F8F5F2;
    --font-titles: 'Raleway', sans-serif;
    --font-text: 'Roboto', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-text);
    color: var(--text-dark);
    background-color: var(--bg-crema);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. CABECERA Y MENÚ
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px 0;
    transition: all 0.3s ease;
    background: transparent;
}
.header.scrolled {
    background: rgba(27, 33, 41, 0.95);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 40px; transition: 0.3s; }
.nav-list { display: flex; list-style: none; gap: 30px; }
.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-family: var(--font-titles);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-link:hover { color: var(--primary-red); }
.menu-toggle { display: none; color: white; font-size: 24px; cursor: pointer; z-index: 1001; }

/* =========================================
   3. HERO (PORTADA)
   ========================================= */
.hero {
    position: relative;
    padding-top: 200px; 
    padding-bottom: 200px;
    background-image: url('img/bg-hero.jpg');
    background-size: cover;
    background-position: center;
}
.hero-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hero-text { color: white; max-width: 600px; padding-bottom: 50px; }
.hero-text .subtitle {
    font-family: var(--font-titles);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hero-text h1 {
    font-family: var(--font-titles);
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}
.hero-text .description { font-size: 18px; font-weight: 300; }

.hero-box {
    position: absolute;
    right: 20px;
    bottom: -280px;
    width: 500px;
    height: 500px;
    z-index: 10;
    box-shadow: -10px 10px 30px rgba(0,0,0,0.15);
}
.hero-box img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================
   4. NOSOTROS (PROPIEDADES) Y TEXTOS FANTASMAS
   ========================================= */
.seccion-nosotros {
    padding-top: 200px;
    padding-bottom: 180px;
    position: relative;
    overflow: hidden; /* Esto arregla cualquier problema con el texto gigante */
}

/* El texto fantasma 100% centrado al fondo */
.texto-gigante {
    position: absolute;
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-titles);
    font-size: clamp(5rem, 10vw, 8rem); /* Se adapta al tamaño de pantalla */
    font-weight: 800;
    color: rgba(220, 215, 210, 0.5); /* Color gris/crema */
    z-index: 0;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 5px;
    pointer-events: none; /* Para que no moleste al hacer clic */
}

.contenedor-titulos-frente {
    position: relative;
    text-align: center;
    margin-bottom: 100px;
    margin-top: 40px;
    z-index: 2;
}
.texto-frente {
    font-family: var(--font-titles);
    font-size: 36px;
    color: #222;
    font-weight: 700;
    line-height: 1.4;
}

.contenedor-nosotros {
    display: flex;
    align-items: center;
    gap: 80px;
    position: relative;
    z-index: 2;
}
.nosotros-img { flex: 1; text-align: center; }
.nosotros-img img { width: 100%; max-width: 450px; border-radius: 20px; filter: drop-shadow(6px 6px 8px rgba(0, 0, 0, 0.3)); }
.nosotros-texto { flex: 1; }
.subtitulo-rojo {
    font-family: var(--font-titles);
    color: var(--primary-red);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 25px;
}
.bloque-texto { margin-bottom: 25px; }
.bloque-texto h3 { font-family: var(--font-titles); font-size: 24px; margin-bottom: 8px; }
.bloque-texto p { font-size: 15px; line-height: 1.6; color: #666; }

/* =========================================
   5. MARTILLERO (Edificio oscuro)
   ========================================= */
.seccion-martillero {
    background-image: url('img/bg-edificio.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 120px 0 0 0;
    position: relative;
}
.seccion-martillero::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6);
}
.contenedor-martillero { position: relative; display: flex; justify-content: flex-end; }

.cuadro-blanco {
    background-color: #fff;
    padding: 50px;
    max-width: 550px;
    border-radius: 15px;
    transform: translateY(80px);
    z-index: 10;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.cuadro-blanco h2 { font-family: var(--font-titles); font-size: 24px; margin-bottom: 30px; }
.cuadro-blanco ul { list-style: none; margin-bottom: 25px; }
.cuadro-blanco li { font-size: 14px; line-height: 1.6; color: #555; margin-bottom: 15px; position: relative; padding-left: 20px; }
.cuadro-blanco li::before { content: "•"; color: var(--primary-red); font-weight: bold; position: absolute; left: 0; font-size: 20px; top: -4px; }
.nota-final { font-size: 13px; font-style: italic; color: #777; }

/* =========================================
   6. SERVICIOS
   ========================================= */
.seccion-servicios {
    padding-top: 100px; /* Volvemos a un padding normal */
    padding-bottom: 120px;
    position: relative;
    overflow: hidden;
}

.texto-servicios {
    top: 220px; /* 👈 1. ESTO BAJA EL TEXTO GIGANTE. Si lo quieres más abajo, ponle 250px, 300px, etc. */
    transform: translateX(-50%); /* 👈 OJO: Le quité el , -50% para que no rebote hacia arriba */
    text-align: center;
    line-height: 0.8;
}

.cont-servicios-relativo { position: relative; z-index: 2; }

.grilla-servicios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    text-align: center;
    margin-top: 360px; /* 👈 2. ESTO SUBE O BAJA LOS ÍCONOS. Ajusta este número para acercarlos a PROPIEDADES sin pisarlos */
}

.tarjeta-servicio i { font-size: 40px; color: var(--primary-red); margin-bottom: 15px; }
.tarjeta-servicio h3 { font-family: var(--font-titles); font-size: 20px; margin-bottom: 15px; }
.tarjeta-servicio p { font-size: 14px; line-height: 1.6; color: #666; }

/* =========================================
   7. PUBLICACIONES (Imágenes Limpias)
   ========================================= */
.seccion-publicaciones { padding: 80px 0 120px 0; }
.titulo-seccion { text-align: center; font-family: var(--font-titles); font-size: 32px; margin-bottom: 50px; }
.grilla-propiedades {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}
.tarjeta-propiedad-limpia {
    width: 100%;
}
.tarjeta-propiedad-limpia img {
    width: 100%;
    height: auto;
    display: block; /* Elimina márgenes fantasma */
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: 0.3s;
}
.tarjeta-propiedad-limpia img:hover { transform: translateY(-5px); }

.contenedor-boton { text-align: center; }
.btn-instagram {
    display: inline-block;
    background-color: var(--primary-red);
    color: #fff;
    padding: 15px 35px;
    font-family: var(--font-titles);
    font-weight: 700;
    text-decoration: none;
    border-radius: 5px;
    transition: 0.3s;
}
.btn-instagram:hover { background-color: #c00017; }

/* =========================================
   8. FOOTER
   ========================================= */
.footer { background-color: var(--dark-bg); color: #888; padding: 30px 0; font-size: 14px; }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.link-firma { color: var(--primary-red); text-decoration: none; transition: color 0.3s; }
.link-firma:hover { color: #fff; }

/* =========================================
   9. BOTONES FLOTANTES
   ========================================= */
.btn-whatsapp {
    position: fixed; bottom: 20px; left: 20px; background-color: #25d366; color: white; border-radius: 50%;
    width: 60px; height: 60px; display: flex; justify-content: center; align-items: center; font-size: 35px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.3); z-index: 999; text-decoration: none;
}
.btn-scroll-up {
    position: fixed; bottom: 20px; right: 20px; background-color: var(--primary-red); color: white; border: none;
    border-radius: 50%; width: 60px; height: 60px; font-size: 22px; cursor: pointer;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.3); z-index: 999; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.btn-scroll-up.show { opacity: 1; visibility: visible; }
.btn-scroll-up:hover { background-color: #c00017; }

/* =========================================
   10. RESPONSIVE Y MENÚ MÓVIL
   ========================================= */
@media (max-width: 991px) {
    .menu-toggle { display: block; }
    .nav-menu {
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: rgba(27, 33, 41, 0.95);
        display: flex; flex-direction: column; justify-content: center; align-items: center;
        transform: translateY(-100%); transition: transform 0.4s ease-in-out;
    }
    .nav-menu.active { transform: translateY(0); }
    .nav-list { flex-direction: column; text-align: center; gap: 40px; }
    .nav-link { font-size: 24px; }
    
    .hero { padding-top: 130px; padding-bottom: 100px; } /* Achicamos padding en móvil */
    .hero-text h1 { font-size: 3rem; }
    .hero-box { position: relative; right: auto; bottom: auto; margin: 40px auto -150px auto; width: 300px; height: 300px; }
    
    .seccion-nosotros { padding-top: 150px; padding-bottom: 100px; } /* Achicamos padding en móvil */
    .texto-frente { font-size: 26px; } /* Achicamos un poco el título en móvil para que no se desborde */
    
    .texto-gigante { font-size: 3.5rem; top: 20px; }
    .contenedor-titulos-frente { margin-top: 100px; }
    .contenedor-nosotros { flex-direction: column; text-align: center; gap: 40px; }
    
    .contenedor-martillero { justify-content: center; }
    .cuadro-blanco { transform: translateY(40px); margin: 0 20px; }
    
    .seccion-servicios { padding-top: 100px; padding-bottom: 80px; }
    .texto-servicios { top: 50%; } /* En celular lo devolvemos al medio para que encaje bien */
    
    .grilla-servicios { grid-template-columns: repeat(2, 1fr); margin-top: 40px; }
    .grilla-propiedades { grid-template-columns: 1fr; max-width: 450px; margin: 0 auto 50px auto; }
}
@media (max-width: 576px) {
    .grilla-servicios { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; text-align: center; gap: 15px; }
}