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


/* 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%);
    }
}


/* === SECCIÓN HERO GENERAL === */

.hero-section {
    position: relative;
    width: 100%;
    min-height: 90vh;
    /* Puedes ajustar esta altura según lo que necesites */
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.221), rgba(0, 0, 0, 0.221)), url('../img/Imagen5.jpg') center center / cover no-repeat;
}


/* === CAPAS DE FONDO PARA EFECTO CROSSFADE === */

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
    opacity: 0;
}


/* === CAPA OSCURA SOBRE LA IMAGEN === */

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-inline: clamp(1rem, 5vw, 4rem);
    padding-block: clamp(2rem, 10vh, 4rem);
    background: rgba(0, 0, 0, 0.221);
}


/* === CONTENEDOR GENERAL DE CONTENIDO === */

.hero-contenedor {
    width: 100%;
    max-width: 1200px;
}


/* === CONTENIDO DEL HERO === */

.hero-content {
    color: white;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}


/* === TÍTULO PRINCIPAL === */

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.2;
}


/* === SUBTÍTULO === */

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: white;
}


/* === IMAGEN DEL LOGO === */

.hero-content img {
    width: clamp(180px, 90%, 450px);
    height: auto;
}


/* === BOTÓN === */

.hero-btn {
    border: 2px solid white;
    border-radius: 30px;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    transition: 0.3s ease;
    color: white;
}

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


/* === RESPONSIVE - SE MANTIENE A LA IZQUIERDA === */

@media (max-width: 768px) {
    .hero-overlay {
        justify-content: center;
        text-align: center;
    }
    .hero-content {
        align-items: left;
        text-align: left;
    }
    .hero-content img {
        width: 70%;
    }
    .hero-btn {
        width: auto;
    }
    .hero-btn {
        width: auto;
    }
    .hero-content img {
        width: 90%;
    }
}


/* 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;
}


/* ======= NAVBAR AUTO-OCULTABLE ======= */

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


/* Estado visible */

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


/* Estado oculto */

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


/* Mantener visible si el cursor está arriba del todo */

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


/* Fondo semitransparente elegante (opcional) */

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


/* Evitar que el contenido quede oculto bajo la barra */

body {
    padding-top: 100px;
}


/* === SECCIÓN PRINCIPAL CON VIDEO === */

.hero-section {
    position: relative;
    width: 100%;
    min-height: 92vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* === VIDEO DE FONDO === */

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    background-color: #000;
}


/* === CAPA OSCURA SOBRE EL VIDEO === */

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
}


/* === CONTENEDOR GENERAL DE CONTENIDO === */

.hero-contenedor {
    width: 100%;
    max-width: 1200px;
}


/* === CONTENIDO DEL HERO === */

.hero-content {
    color: white;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}


/* === TÍTULO PRINCIPAL === */

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.2;
}


/* === SUBTÍTULO === */

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: white;
}


/* === IMAGEN DEL LOGO === */

.hero-content img {
    width: clamp(180px, 90%, 450px);
    height: auto;
}


/* === BOTÓN === */

.hero-btn {
    border: 2px solid white;
    border-radius: 30px;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    transition: 0.3s ease;
    color: white;
}

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


/* === MEDIA QUERIES PARA MÓVIL === */

@media (max-width: 768px) {
    .hero-overlay {
        justify-content: center;
        text-align: center;
    }
    .hero-content {
        align-items: left;
        text-align: left;
    }
    .hero-content img {
        width: 70%;
        margin-bottom: 5rem;
        margin-top: -3rem;
        /* Este valor sube el logo */
    }
    .hero-btn {
        width: auto;
    }
    .hero-btn {
        width: auto;
    }
    .hero-content img {
        width: 90%;
    }
}

.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;
    }
}


/* SECCIÓN PROYECTOS DESTACADOS */


/* Contenedor de toda la sección (ocupa ancho completo) */

.full-width-wrapper {
    width: 100vw;
    position: relative;
    padding: 40px 0;
}


/* Carrusel centrado dentro del contenedor */

.carousel-container {
    max-width: 1140px;
    /* o el ancho que uses normalmente */
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}


/* Swiper básico */

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

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* Modificar el tamaño del texto de los títulos en el carrusel */

.swiper-slide h4 {
    font-size: 1.5rem;
    /* Cambia este valor para ajustar el tamaño del texto */
    font-weight: 600;
    /* Ajusta el grosor de la fuente si lo deseas */
    color: #000000;
    /* Cambia el color si lo prefieres */
    margin-top: 10px;
    /* Ajusta el espacio superior si lo necesitas */
}

.swiper-slide img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
}


/* Botones - ahora posicionados respecto al contenedor full-width */

.swiper-button-prev,
.swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #000 !important;
    color: #fff !important;
    width: 60px !important;
    height: 40px !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    border: none !important;
    z-index: 10;
}


/* Botón izquierdo */

.swiper-button-prev {
    left: 0 !important;
    /* puedes poner -20px si quieres que sobresalga más */
}


/* Botón derecho */

.swiper-button-next {
    right: 0 !important;
}


/* Flechas */

.swiper-button-prev::after,
.swiper-button-next::after {
    content: '' !important;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #fff !important;
    border-right: 2px solid #fff !important;
}

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

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

@media (max-width: 768px) {
    .full-width-wrapper {
        width: 99.7vw;
        padding: 50px 0;
        /* menos padding para pantallas pequeñas */
        overflow-x: hidden;
        /* previene scroll lateral accidental */
    }
    .carousel-container {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    .swiper {
        padding: 10px 0;
    }
    .swiper-slide {
        padding: 0 5px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .swiper-slide img {
        width: 100%;
        max-height: 480px;
        object-fit: cover;
    }
    .swiper-slide h5 {
        font-size: 16px;
        margin-top: 10px;
    }
    .swiper-button-prev,
    .swiper-button-next {
        width: 45px !important;
        height: 35px !important;
    }
    .swiper-button-prev {
        left: -5px !important;
    }
    .swiper-button-next {
        right: -5px !important;
    }
    h2 {
        font-size: 22px;
        text-align: center;
        margin-bottom: 20px;
    }
}


/* SECCIÓN STATS */

.stats-section {
    background-color: #f5f5f5;
    padding: 60px 20px;
    display: flex;
    justify-content: center;
}


/* Contenedor central */

.stats-container {
    max-width: 1100px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    flex-wrap: wrap;
}


/* Cada bloque individual */

.stat-box {
    text-align: center;
    flex: 1 1 250px;
}

.stat-box img {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.stat-box h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.stat-box .plus {
    color: #b58a3a;
    /* dorado */
    margin-left: 2px;
}

.stat-box p {
    margin-top: 8px;
    font-size: 16px;
    color: #777;
}


/* 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;
    }
    /* HERO */
    .hero-title {
        font-size: 3.5rem;
    }
    .hero-titleg {
        font-size: 4rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .hero-btn {
        font-size: 1rem;
        padding: 10px 25px;
    }
    /* CONÓCENOS */
    .titulo-fondo {
        font-size: 4rem;
        top: -10px;
    }
    .subtitulo {
        font-size: 1.6rem;
    }
    .parrafo {
        font-size: 1.05rem;
        padding: 0 1rem;
    }
    /* SERVICIOS */
    .contenedor-servicios {
        height: auto;
        max-height: none;
        overflow: visible;
        padding: 60px 0;
    }
    .titulo-servicios {
        font-size: 3.5rem;
        text-align: center;
    }
    .imagen-wrapper img {
        height: 320px;
    }
    .servicio-texto {
        font-size: 1.1rem;
    }
    /* CONTACTO */
    .contacto-titulo {
        font-size: 4rem;
    }
    .formulario-contacto input,
    .formulario-contacto textarea {
        font-size: 1rem;
    }
    /* 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;
}