/* ===================== */


/* Header fijo y Navbar  */


/* ===================== */

:root {
    /* Altura base de tu header */
    --header-h: 10px;
    /* Margen extra opcional (puede ser negativo si quieres menos espacio) */
    --anchor-extra-space: -42px;
}


/* Scroll suave y offset global */

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + var(--anchor-extra-space));
}


/* Margen para IDs individuales */

*[id] {
    scroll-margin-top: calc(var(--header-h) + var(--anchor-extra-space));
}


/* Fallback por compatibilidad */

*[id]::before {
    content: "";
    display: block;
    height: 0;
    margin-top: 0;
}


/* Fijar el header */

.header-fixed-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    color: #313c56;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* COLOR PERSONALIZADO PARA NAVBAR */

.custom-navbar {
    background-color: #8d8d8e !important;
    padding-top: 5px;
    padding-bottom: 10px;
}


/* Para evitar que el contenido se esconda debajo del header fijo */

body {
    padding-top: 100px;
    /* ajusta según altura total del header */
}


/* NAVBAR */

.navbar .nav-link {
    color: #ffffff;
    margin: 0 0px;
    font-weight: 500;
}

.navbar .nav-link:hover {
    color: #48587c;
}


/* Estilo personalizado para el dropdown */

.dropdown-menu {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    color: #313c56;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f1f1f1;
    color: #48587c;
}


/* Estilo base */

.marca-radac {
    color: #ffffff;
    /* color inicial del texto */
    transition: color 0.3s ease;
    text-decoration: none;
}


/* Cambia color al pasar el mouse */

.marca-radac:hover {
    color: #48587c;
    /* el color que desees al hacer hover */
}


/* Estilo opcional para la palabra "Constructora" */

.marca-light {
    font-weight: 400;
    opacity: 0.8;
}

.btn-cotizar {
    background-color: #313c56;
    /* color de fondo personalizado */
    color: #fff;
    /* color de texto */
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    transition: background 0.3s ease;
}

.btn-cotizar:hover {
    background-color: #48587c;
    /* color al pasar el cursor */
    color: #fff;
}

@media (max-width: 768px) {
    .navbar .nav-link {
        margin: 10px 0;
        text-align: center;
    }
    .btn-cotizar {
        margin: 10px 0;
        text-align: center;
    }
    .custom-navbar {
        background-color: #8d8d8e !important;
        padding-top: 25px;
        padding-bottom: 20px;
    }
}


/* ============
   Mobile drawer
   ============ */

:root {
    /* alto de la franja superior (logo + hamburguesa) en móvil */
    --mobile-top: 76px;
    /* ancho del panel: cámbialo a 70vw, 320px, etc. */
    --mobile-drawer-width: min(82vw, 300px);
}


/* MÓVIL: no empujar contenido ni aplicar offset de ancla */

@media (max-width: 991.98px) {
    html {
        scroll-padding-top: 0;
    }
    *[id] {
        scroll-margin-top: 0;
    }
    body {
        padding-top: 0;
    }
    /* Header fijo arriba como base */
    .header-fixed-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
    }
    .custom-navbar {
        padding: 8px 0;
    }
    /* Drawer lateral usando el propio .navbar-collapse de Bootstrap */
    .navbar-collapse {
        position: fixed;
        top: var(--mobile-top);
        right: 0;
        width: var(--mobile-drawer-width);
        background: rgba(148, 148, 150, 0.964);
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0);
        padding: 30px;
        /* ✅ Agregamos padding-bottom para el espacio extra */
        padding-bottom: 20px;
        overflow: visible;
        /* ya no necesitas scroll */
        z-index: 1100;
        transform: translateX(100%);
        transition: transform .28s ease;
        display: block !important;
    }
    /* Estados del colapso (aprovechando clases de Bootstrap) */
    .navbar-collapse.show {
        transform: translateX(0);
    }
    /* Estética de opciones */
    .navbar .nav-link {
        font-size: 1.05rem;
        padding: .6rem 0;
        text-align: center;
    }
    .btn-cotizar {
        display: block;
        width: 90%;
        margin-top: 8px;
    }
}


/* MÓVIL: drawer lateral sin ocupar toda la pantalla */

@media (max-width: 991.98px) {
    .navbar-collapse {
        position: fixed;
        top: var(--mobile-top);
        right: 0;
        width: var(--mobile-drawer-width);
        background: rgba(148, 148, 150, 0.964);
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
        padding: 24px 30px 28px;
        /* alto definido por contenido */
        display: block !important;
        /* evita display:none del collapse */
        transform: translateX(100%);
        /* oculto por defecto */
        transition: transform .28s ease;
        z-index: 1100;
        height: auto;
        /* ¡nada de 100vh! */
        overflow: visible;
    }
    /* Visible (abierto) */
    .navbar-collapse.show {
        transform: translateX(0);
    }
    /* Durante la animación de cierre: mantenerlo fuera */
    .navbar-collapse.collapsing {
        transform: translateX(100%);
        height: auto;
        /* sin animar la altura */
        overflow: hidden;
        /* por si acaso */
    }
    /* Asegura que cuando NO esté en show, esté fuera */
    .navbar-collapse:not(.show) {
        transform: translateX(100%);
    }
}


/* HERO SECTION */

.hero-section {
    position: relative;
    width: 100%;
    height: 92vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section {
    background-position: right;
    /* ✅ En escritorio, enfoca arriba */
}

.hero-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.463);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

.hero-contenedor {
    width: 100%;
}

.hero-title {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
}

.hero-titleg {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #3e4c6d;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-top: 20px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
}

.hero-btn {
    border: 2px solid white;
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 500;
    transition: 0.3s ease;
}

.hero-btn:hover {
    background: white;
    color: black;
}


/* RESPONSIVE */

@media (max-width: 768px) {
    .hero-section {
        height: 92vh;
        background-position: 40% 40%;
        /* ✅ Centro en móvil */
    }
    .hero-contenedor,
    .hero-content {
        text-align: center;
        margin-top: -3rem;
    }
    .hero-title {
        font-size: 2.7rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    .hero-btn {
        font-size: 1rem;
        padding: 10px 25px;
        border: 2px solid white;
        border-radius: 30px;
        font-weight: 500;
        transition: 0.3s ease;
        display: inline-block;
        margin-top: 0.5rem;
    }
}


/* Logo tipo botón */

.logo-btn {
    height: 60px;
    /* ajusta el tamaño */
    width: auto;
    /* mantiene proporción */
    cursor: pointer;
    /* efecto "botón" */
    transition: transform 0.2s ease, opacity 0.2s ease;
}


/* Efecto hover */

.logo-btn:hover {
    transform: scale(1.05);
    /* pequeño zoom */
    opacity: 0.9;
    /* leve transparencia */
}


/* Ajuste de margen si lo usas dentro de una navbar */

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
}

.marca-radac {
    text-decoration: none;
}

.intro-construccion {
    background-color: #f5f5f5;
    padding: 80px 50px;
}

.intro-construccion .intro-texto {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #4b5563;
    max-width: 800px;
    margin: 0 auto 35px;
}

.intro-construccion .btn-intro {
    display: inline-block;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.2);
}

.intro-construccion .btn-intro:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(17, 24, 39, 0.25);
    opacity: 0.95;
}


/* --- Responsivo --- */

@media (max-width: 768px) {
    .intro-construccion {
        padding: 60px 15px;
    }
    .intro-construccion .intro-titulo {
        font-size: 1.8rem;
    }
    .intro-construccion .intro-texto {
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .intro-construccion .intro-titulo {
        font-size: 1.6rem;
    }
    .intro-construccion .btn-intro {
        padding: 0.7rem 1.3rem;
        font-size: 0.95rem;
    }
}


/* CONTENEDOR DE SECCIÓN (fondo y spacing) */

.full-width-wrapper {
    width: 100%;
    position: relative;
    padding: 40px 0;
    background: #e7e4e4;
}


/* CARRUSEL (variables globales por defecto) */

.carousel {
    /* Puedes sobrescribir por sección en el atributo style del div.carousel */
    --slide-height: 380px;
    /* alto de las imágenes */
    --slide-width: 100%;
    /* ancho de las imágenes dentro del slide */
}

.carousel-container {
    max-width: 1140px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}


/* ===== MODO ANCHO COMPLETO (igual a FACHADAS) ===== */

.carousel--full .carousel-container {
    max-width: none;
    /* quita límite */
    width: 100%;
    /* ocupa todo */
    padding: 0;
    /* sin padding (edge-to-edge) */
}


/* SWIPER */

.swiper {
    width: 100%;
    padding: 20px 0;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}


/* Tamaño de imagen CONTROLADO por variables */

.swiper-slide img {
    width: var(--slide-width);
    height: var(--slide-height);
    object-fit: cover;
    /* Cambia a 'contain' si no quieres recorte */
    display: block;
    margin: 0 auto;
    /* centra cuando el ancho es < 100% */
    border-radius: 10px;
    /* opcional */
}


/* NAVEGACIÓN PROPIA DE CADA CARRUSEL */

.carousel .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 40px;
    background: #000;
    border: none;
    cursor: pointer;
    z-index: 10;
}


/* Flechas con ::after para no depender de íconos */

.carousel .nav::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.carousel .btn-prev {
    left: 0;
}

.carousel .btn-next {
    right: 0;
}

.carousel .btn-prev::after {
    transform: rotate(-135deg);
    margin-left: 3px;
}

.carousel .btn-next::after {
    transform: rotate(45deg);
    margin-right: 3px;
}


/* TITULARES */

h2.text-center {
    text-align: center;
}


/* RESPONSIVE: Igualar móviles al estilo de "CABAÑAS" */

@media (max-width: 768px) {
    .full-width-wrapper {
        padding: 32px 0;
        overflow-x: hidden;
    }
    .carousel-container {
        padding: 0 10px;
    }
    .swiper {
        padding: 10px 0;
    }
    /* Un poco más alto en mobile para todas las secciones (look "CABAÑAS") */
    .swiper-slide img {
        height: calc(var(--slide-height) + 60px);
    }
    .carousel .nav {
        width: 45px;
        height: 36px;
    }
    .carousel .btn-prev {
        left: -5px;
    }
    .carousel .btn-next {
        right: -5px;
    }
    /* Ajuste de botones cuando es full-bleed */
    .carousel--full .btn-prev {
        left: 8px;
    }
    .carousel--full .btn-next {
        right: 8px;
    }
    h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
}


/* OPCIONAL: Si prefieres mantener proporción exacta en vez de alto fijo,
   cambia el bloque de img por esto y elimina --slide-height:
   .swiper-slide img { width: var(--slide-width); aspect-ratio: 16/9; height: auto; object-fit: cover; }
*/


/* SECCIÓN FOOTER */

.footer-dark {
    background-color: #1e1e1e;
    padding: 20px 20px;
    font-family: 'Poppins', sans-serif;
    color: #ccc;
    text-align: center;
    /* CENTRA TODO */
}

.footer-grid-dark {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
    /* CENTRA CADA COLUMNA */
}

.footer-item-dark {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* CENTRA CONTENIDO DENTRO DE LA COLUMNA */
}


/* TÍTULO */

.footer-titulo h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #fff;
}

.footer-titulo span {
    color: #ffffff;
}


/* MAPA */

.footer-mapa {
    margin-bottom: 40px;
    border-radius: 10px;
    overflow: hidden;
}

.footer-item-dark h4 {
    color: #fff;
    font-size: 0.95rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
}

.footer-item-dark p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #aaa;
}

.footer-link-dark {
    color: #aaa;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link-dark:hover {
    color: #ffffff;
}

.footer-social-dark {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 8px;
}

.footer-social-dark a {
    font-size: 1.2rem;
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.footer-social-dark a:hover {
    color: #313c56;
    transform: translateY(-5px);
}

.footer-credit {
    text-align: center;
    margin-top: 40px;
    font-size: 0.85rem;
    color: #777;
    border-top: 1px solid #333;
    padding-top: 20px;
}

.footer-btn-dark {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #000000;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.footer-btn-dark:hover {
    background-color: #313c56;
    color: #fff;
}


/* WHATSAPP BUTTON */

.whatsapp-float {
    position: fixed;
    bottom: 0px;
    right: 22px;
    z-index: 2147483647;
    /* máximo valor posible */
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.whatsapp-float img.whatsapp-icon {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        font-size: 20px;
        padding: 10px 12px;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* Ajustes generales */
    body {
        padding-top: 90px;
    }
    /* NAVBAR */
    .navbar .nav-link {
        font-size: 1rem;
        margin: 0 8px;
    }
    /* FOOTER */
    .footer-grid-dark {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-item-dark h4 {
        font-size: 1rem;
    }
    .footer-item-dark p,
    .footer-link-dark {
        font-size: 0.9rem;
    }
    .footer-titulo h2 {
        font-size: 1.8rem;
    }
    .footer-credit {
        font-size: 0.8rem;
    }
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}


/* === Auto-ocultar navbar === */

.header-fixed-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    transition: transform .4s ease-in-out, opacity .3s ease-in-out;
    will-change: transform, opacity;
}


/* visible por scroll o hover */

.header-fixed-container.show {
    transform: translateY(0);
    opacity: 1;
}


/* oculto por scroll hacia abajo */

.header-fixed-container.hide {
    transform: translateY(-100%);
    opacity: 0;
}


/* visible si el cursor está en la franja superior */

.header-fixed-container.visible-hover {
    transform: translateY(0);
    opacity: 1;
}


/* Fondo elegante opcional */

.custom-navbar {
    background-color: rgba(141, 141, 142, .95) !important;
    backdrop-filter: blur(8px);
}


/* Usa la altura real del header como offset y NO un número fijo */

:root {
    --header-h: 60px;
}

html {
    scroll-padding-top: var(--header-h);
}

*[id] {
    scroll-margin-top: var(--header-h);
}

body {
    padding-top: var(--header-h);
}


/* Evitar separación con el hero */

.hero-section {
    margin-top: 0;
}