
:root {
    --hero-text: #F9F6F3;
    --hero-text-soft: rgba(249, 246, 243, 0.86);
    --hero-line: rgba(249, 246, 243, 0.35);
    --hero-accent: #B29C6F;
    --font-display: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --hero-fade: 1.2s;
}

/* ---------- Barra de navegación sobre la imagen ---------- */
.nav.nav-hero {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin-inline: auto;
    width: min(90%, 1600px);
    padding: 2rem 0 1.4rem;
    border-bottom: 1px solid var(--hero-line);
    overflow: visible;
    z-index: 50;
    font-family: var(--font-display);
}

.nav-hero .Logo { display: block; }

.nav-hero .logo {
    display: block;
    width: clamp(8rem, 12vw, 11rem);
    /* Convierte el logo oscuro en blanco. Si tienen el logo en blanco, usen ese archivo y borren esta línea */
    filter: brightness(0) invert(1);
}

.nav-hero .barrayredes {
    flex-direction: row;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3.5rem);
    margin-top: 0;
}

.nav-hero .barra {
    height: auto;
    gap: clamp(1rem, 2.4vw, 3rem);
}

.nav-hero ul li { margin-inline: 0; }

.nav-hero .barra > li > a {
    position: relative;
    padding: 0.4rem 0;
    color: var(--hero-text);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.18em;
}

.nav-hero .barra > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--hero-text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.nav-hero .barra > li > a:hover::after { transform: scaleX(1); }

.nav-hero .Redes {
    gap: 0.9rem;
    align-items: center;
}

.nav-hero .Redes a { display: flex; }

.nav-hero .Redes img {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.nav-hero .Redes img:hover { opacity: 1; }

.nav-hero .toggle-button {
    background: transparent;
    color: var(--hero-text);
    font-size: 1.8rem;
}

/* ---------- Menú móvil (superpuesto) ---------- */
.barra-small.menu-hero {
    position: absolute;
    top: 5.5rem;
    left: 5%;
    right: 5%;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0.5rem;
    z-index: 60;
    background: rgba(28, 26, 24, 0.7);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(249, 246, 243, 0.16);
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    text-align: left;
    font-family: var(--font-display);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.barra-small.menu-hero.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.barra-small.menu-hero li { list-style: none; }

.barra-small.menu-hero > li + li { border-top: 1px solid rgba(249, 246, 243, 0.08); }

.barra-small.menu-hero > li > a,
.barra-small.menu-hero .m-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.95rem 0.9rem;
    background: transparent;
    color: var(--hero-text);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-align: left;
    cursor: pointer;
}

.barra-small.menu-hero .caret {
    width: 0.9rem;
    height: 0.9rem;
    transition: transform 0.3s ease;
}

.m-dropdown.is-open .caret { transform: rotate(180deg); }

/* Submenú tipo acordeón */
.barra-small.menu-hero .m-submenu {
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    margin: 0 0.4rem;
    border-radius: 4px;
    background: rgba(249, 246, 243, 0.05);
    transition: max-height 0.35s ease, margin 0.35s ease;
}

.m-dropdown.is-open .m-submenu {
    max-height: 22rem;
    margin-bottom: 0.5rem;
}

.barra-small.menu-hero .m-submenu li + li { border-top: 1px solid rgba(249, 246, 243, 0.06); }

.barra-small.menu-hero .m-submenu a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.75rem 0.9rem;
    color: var(--hero-text);
}

.barra-small.menu-hero .m-submenu span {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.barra-small.menu-hero .m-submenu small {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 300;
    color: rgba(249, 246, 243, 0.6);
}

.barra-small.menu-hero .m-submenu .submenu-all a {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hero-accent);
}

/* ---------- Hero / carrusel ---------- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 540px;
    overflow: hidden;
    background: #1c1a18;
    color: var(--hero-text);
    letter-spacing: normal;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--hero-fade) ease, visibility 0s linear var(--hero-fade);
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    transition: opacity var(--hero-fade) ease;
}

.hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.07);
    transition: transform 7s ease-out;
}

.hero-slide.is-active img { transform: scale(1); }

/* Oscurece arriba (menú) y abajo (texto) para que se lea bien */
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.60) 0%,    /* arriba, detrás del menú (antes 0.45) */
        rgba(0, 0, 0, 0.30) 28%,   /* antes 0.10 */
        rgba(0, 0, 0, 0.30) 55%,   /* antes 0.12 */
        rgba(0, 0, 0, 0.60) 100%   /* abajo, detrás del texto (antes 0.62) */
    );
    pointer-events: none;
}

/* ---------- Texto de cada imagen ---------- */
.hero-caption {
    position: absolute;
    left: 50%;
    bottom: clamp(5.5rem, 13vh, 8rem);
    transform: translateX(-50%);
    width: min(88%, 44rem);
    text-align: center;
    z-index: 2;
}

.hero-caption > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-slide.is-active .hero-caption > * {
    opacity: 1;
    transform: none;
}

.hero-slide.is-active .hero-title { transition-delay: 0.45s; }
.hero-slide.is-active .hero-desc  { transition-delay: 0.6s; }
.hero-slide.is-active .hero-link  { transition-delay: 0.75s; }

.hero-title {
    margin-bottom: 0.9rem;
    font-family: var(--font-display);
    font-size: clamp(0.85rem, 0.7rem + 0.4vw, 1.05rem);
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--hero-text);
}

.hero-desc {
    font-family: var(--font-body);
    font-size: clamp(0.8rem, 0.68rem + 0.35vw, 0.95rem);
    font-weight: 300;
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--hero-text-soft);
}

.hero-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 1.8rem;
    margin-top: 1.4rem;
    border: 1px solid var(--hero-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--hero-text);
    transition: background 0.3s ease, width 0.3s ease;
}

.hero-link:hover {
    background: rgba(255, 255, 255, 0.32);
    width: 3.8rem;
}

.hero-link svg { width: 1rem; height: 1rem; }

/* ---------- Flechas ---------- */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: transparent;
    color: var(--hero-text);
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-arrow:hover { opacity: 1; }
.hero-prev { left: 2%; }
.hero-next { right: 2%; }
.hero-prev:hover { transform: translateY(-50%) translateX(-3px); }
.hero-next:hover { transform: translateY(-50%) translateX(3px); }
.hero-arrow svg { width: 1.3rem; height: 1.3rem; }

/* ---------- Puntos ---------- */
.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 2.2rem;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 0.75rem;
}

.hero-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border-radius: 50%;
    background: rgba(249, 246, 243, 0.45);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.hero-dot:hover { background: rgba(249, 246, 243, 0.8); }

.hero-dot.is-active {
    background: var(--hero-text);
    transform: scale(1.35);
}

.hero-arrow:focus-visible,
.hero-dot:focus-visible,
.hero-link:focus-visible {
    outline: 1px solid var(--hero-text);
    outline-offset: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 895px) {
    .nav.nav-hero { padding: 1.4rem 0 1rem; }
    .hero-arrow { display: none; }           /* en móvil se desliza con el dedo */
    .hero-caption { bottom: 5rem; }
    .hero-desc {
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media screen and (max-width: 600px) {
    .hero-caption { width: 90%; }
    .hero-dots { bottom: 1.8rem; gap: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-slide img,
    .hero-caption > * {
        transition: none !important;
        transform: none !important;
    }
}


/* ---------- Submenú "Proyectos en venta" (PC) ---------- */
.nav-hero .dropdown { position: relative; }

.nav-hero .barra > li > a .caret {
    width: 0.8rem;
    height: 0.8rem;
    margin-left: 0.35rem;
    transition: transform 0.3s ease;
}

.nav-hero .dropdown:hover .caret,
.nav-hero .dropdown:focus-within .caret { transform: rotate(180deg); }

.nav-hero .submenu {
    position: absolute;
    top: calc(100% + 1.1rem);
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-width: 16rem;
    padding: 0.5rem;
    background: rgba(28, 26, 24, 0.6);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(249, 246, 243, 0.16);
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    z-index: 70;
}

/* Puente invisible para que no se cierre al bajar el mouse */
.nav-hero .submenu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1.2rem;
    height: 1.2rem;
}

.nav-hero .dropdown:hover .submenu,
.nav-hero .dropdown:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-hero .submenu li {
    display: block;
    margin: 0;
    width: 100%;
}

.nav-hero .submenu li + li { border-top: 1px solid rgba(249, 246, 243, 0.08); }

.nav-hero .submenu li a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.75rem 0.9rem;
    border-radius: 4px;
    color: var(--hero-text);
    text-align: left;
    transition: background 0.25s ease, padding 0.25s ease;
}

.nav-hero .submenu li a:hover {
    background: rgba(249, 246, 243, 0.08);
    padding-left: 1.15rem;
}

.nav-hero .submenu span {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.nav-hero .submenu small {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: rgba(249, 246, 243, 0.6);
}

.nav-hero .submenu .submenu-all a {
    flex-direction: row;
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hero-accent);
}


/* =========================================================
   VERSIÓN CLARA (páginas sin imagen detrás, fondo blanco)
   Uso: <body class="body pagina-clara">
   ========================================================= */
.pagina-clara {
    --nav-texto: #303030;
    --nav-linea: rgba(48, 48, 48, 0.2);
}

/* La barra deja de flotar sobre la imagen y empuja el contenido hacia abajo */
.pagina-clara .nav.nav-hero {
    position: relative;
    border-bottom-color: var(--nav-linea);
}

/* Logo y redes en su color original (oscuro) */
.pagina-clara .nav-hero .logo,
.pagina-clara .nav-hero .Redes img {
    filter: none;
}

.pagina-clara .nav-hero .barra > li > a,
.pagina-clara .nav-hero .toggle-button {
    color: var(--nav-texto);
}

.pagina-clara .nav-hero .barra > li > a::after {
    background: var(--nav-texto);
}

/* Submenú de PC en claro */
.pagina-clara .nav-hero .submenu {
    background: rgba(249, 246, 243, 0.92);
    border-color: var(--nav-linea);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

.pagina-clara .nav-hero .submenu li + li { border-top-color: rgba(48, 48, 48, 0.08); }
.pagina-clara .nav-hero .submenu li a { color: var(--nav-texto); }
.pagina-clara .nav-hero .submenu li a:hover { background: rgba(48, 48, 48, 0.05); }
.pagina-clara .nav-hero .submenu small { color: rgba(48, 48, 48, 0.55); }

/* Menú móvil en claro */
.pagina-clara .barra-small.menu-hero {
    background: rgba(249, 246, 243, 0.95);
    border-color: var(--nav-linea);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

.pagina-clara .barra-small.menu-hero > li + li { border-top-color: rgba(48, 48, 48, 0.08); }

.pagina-clara .barra-small.menu-hero > li > a,
.pagina-clara .barra-small.menu-hero .m-toggle,
.pagina-clara .barra-small.menu-hero .m-submenu a {
    color: var(--nav-texto);
}

.pagina-clara .barra-small.menu-hero .m-submenu { background: rgba(48, 48, 48, 0.04); }
.pagina-clara .barra-small.menu-hero .m-submenu small { color: rgba(48, 48, 48, 0.55); }

/* "Ver todos" se mantiene dorado en ambas versiones */
.pagina-clara .nav-hero .submenu .submenu-all a,
.pagina-clara .barra-small.menu-hero .m-submenu .submenu-all a {
    color: var(--hero-accent);
}

/* Nav fijo (no flota sobre la imagen) → letras oscuras */
.nav.nav-hero.nav-fija {
    position: relative;
    border-bottom-color: rgba(0, 0, 0, 0.2);
}

.nav-fija .barra > li > a,
.nav-fija .toggle-button {
    color: #000;
}

.nav-fija .barra > li > a::after {
    background: #000;
}

/* Logo e íconos en su color original */
.nav-fija .logo,
.nav-fija .Redes img {
    filter: none;
}

/* Submenú de PC en claro */
.nav-fija .submenu {
    background: rgba(249, 246, 243, 0.95);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}
.nav-fija .submenu li a { color: #000; }
.nav-fija .submenu li a:hover { background: rgba(0, 0, 0, 0.05); }
.nav-fija .submenu small { color: rgba(0, 0, 0, 0.55); }
.nav-fija .submenu .submenu-all a { color: var(--hero-accent); }

/* Menú móvil (va justo después del nav) en claro */
.nav-fija + .barra-small.menu-hero {
    background: rgba(249, 246, 243, 0.97);
    border-color: rgba(0, 0, 0, 0.12);
}
.nav-fija + .barra-small.menu-hero > li > a,
.nav-fija + .barra-small.menu-hero .m-toggle,
.nav-fija + .barra-small.menu-hero .m-submenu a { color: #000; }
.nav-fija + .barra-small.menu-hero .m-submenu small { color: rgba(0, 0, 0, 0.55); }
.nav-fija + .barra-small.menu-hero .m-submenu .submenu-all a { color: var(--hero-accent); }