/* ================================================================
   RD REAL ESTATE — HOJA DE ESTILOS
   Archivo: css/styles.css
   Aquí se modifican colores, tipografías, tamaños, espacios,
   carruseles, animaciones y comportamiento responsive.
   ================================================================ */

/* 01. VARIABLES DE MARCA Y ESTILOS BASE */
:root {
    --navy: #101d31;
    --navy2: #182942;
    --gold: #c8aa70;
    --cream: #f7f6f2;
    --white: #fff;
    --ink: #202631;
    --muted: #737985;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 86px;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: Arial,Helvetica,sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    
}

.serif {
    font-family: Georgia,"Times New Roman",serif;
    font-weight: 400;
    letter-spacing: -.035em;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: .68rem;
    font-weight: 700;
}

.gold {
    color: var(--gold);
}

.container {
    width: min(1200px,calc(100% - 48px));
    margin: auto;
}

/* LOGOTIPO Y NOMBRE DE LA EMPRESA */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

/* Tamaño y posición de la imagen */
.brand-logo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Texto situado a la derecha del logo */
.brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    display: block;
}

/* 02. ENCABEZADO Y NAVEGACIÓN */
header {
    height: 82px;
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    display: flex;
    align-items: center;
    background: rgba(16,29,49,.92);
    backdrop-filter: blur(14px);
    color: white;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-family: Georgia,serif;
    font-size: 1.15rem;
    letter-spacing: .13em;
    line-height: 1.15;
}

.brand small {
    display: block;
    font: .58rem Arial,sans-serif;
    letter-spacing: .35em;
    margin-top: 6px;
    color: var(--gold);
}

nav {
    display: flex;
    gap: 28px;
    align-items: center;
    font-size: .77rem;
}

nav a {
    opacity: .85;
    transition: color .25s;
}

nav a:hover {
    color: var(--gold);
}

.nav-cta,.button {
    border: 1px solid var(--gold);
    padding: 13px 17px;
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: background .25s,color .25s;
}

.nav-cta:hover,.button:hover {
    background: var(--gold);
    color: var(--navy);
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    color: white;
    font-size: 1.5rem;
}

/* 03. PORTADA Y VIDEO PRINCIPAL */
.hero {
    height: min(850px,100svh);
    min-height: 650px;
    background: var(--navy);
    position: relative;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,rgba(8,17,30,.78),rgba(8,17,30,.22))
}

.hero-media video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    inset: 0;
    opacity: .75;
}

.hero:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg,rgba(9,18,31,.5),transparent 55%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 70px;
    max-width: 850px;
}

/* BOTÓN PRINCIPAL DE PORTADA: centrado horizontalmente bajo el texto. */
.hero-content > .button {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 {
    font-size: clamp(3.4rem,8vw,7.7rem);
    line-height: .95;
    margin: 25px 0;
    max-width: 850px;
}

.hero p {
    max-width: 450px;
    line-height: 1.8;
    color: #e1e4e9;
    font-size: .98rem;
    margin-bottom: 32px;
}

.hero-bottom {
    position: absolute;
    z-index: 2;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .65rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #e5e7eb;
}

.scroll-mark {
    display: flex;
    gap: 12px;
    align-items: center;
}

.scroll-mark:before {
    content: "";
    height: 1px;
    width: 48px;
    background: var(--gold);
}

/* 04. SECCIONES Y FILTROS */
section {
    padding: 110px 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 46px;
}

.section-head h2 {
    font-size: clamp(2.5rem,5vw,4.8rem);
    line-height: 1;
    margin: 16px 0 0;
}

.section-head p {
    max-width: 360px;
    color: var(--muted);
    line-height: 1.7;
    font-size: .9rem;
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.filter {
    border: 1px solid #d9d7d0;
    background: transparent;
    padding: 10px 15px;
    color: #535a64;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    cursor: pointer;
}

.filter.active,.filter:hover {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

/* 05. TARJETAS DE INMUEBLES Y CARRUSELES */
.grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 28px;
}

.property {
    min-width: 0;
}

.property[hidden] {
    display: none;
}

.property-image {
    height: 350px;
    overflow: hidden;
    position: relative;
    background: #ddd;
}

.property-gallery {
    isolation: isolate;
    touch-action: pan-y;
}

.gallery-track {
    position: absolute;
    inset: 0;
}

.gallery-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .55s ease,visibility .55s ease;
}

.gallery-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .9s cubic-bezier(.2,.7,.2,1);
}

.property:hover .gallery-slide.active img {
    transform: scale(1.035);
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 50%;
    background: rgba(16,29,49,.58);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background .25s,border-color .25s;
    backdrop-filter: blur(6px);
}

.gallery-arrow:hover,.gallery-arrow:focus-visible {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
    outline: none;
}

.gallery-prev {
    left: 12px;
}

.gallery-next {
    right: 12px;
}

.gallery-bottom {
    position: absolute;
    z-index: 4;
    left: 14px;
    right: 14px;
    bottom: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.gallery-dots {
    display: flex;
    gap: 6px;
    pointer-events: auto;
}

.gallery-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 1px solid white;
    border-radius: 50%;
    background: rgba(255,255,255,.42);
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0,0,0,.2);
}

.gallery-dot.active {
    width: 19px;
    border-radius: 7px;
    background: var(--gold);
    border-color: var(--gold);
}

.gallery-count {
    font-size: .63rem;
    letter-spacing: .12em;
    color: white;
    background: rgba(16,29,49,.65);
    padding: 6px 8px;
    backdrop-filter: blur(5px);
}

.tag {
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: 3;
    background: rgba(16,29,49,.9);
    color: white;
    padding: 9px 11px;
    font-size: .62rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gallery-arrow:focus-visible,.gallery-dot:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.property-info {
    padding: 20px 0 22px;
    border-bottom: 1px solid #d8d6cf;
}

.property-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.property h3 {
    font: 400 1.8rem Georgia,serif;
    margin: 12px 0 8px;
    color: var(--navy);
}

.property p {
    font-size: .84rem;
    line-height: 1.65;
    color: #646b74;
    margin: 0 0 18px;
    min-height: 44px;
}

.text-link {
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 6px;
    display: inline-flex;
    gap: 15px;
    align-items: center;
}

/* 06. BANNER DESTACADO */
.feature {
    background: var(--navy);
    color: white;
    padding: 0;
}

.feature-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 560px;
}

.feature-image {
    min-height: 420px;
    background: url("../assets/CASAVEGA.jpeg") center/cover;
}

.feature-copy {
    padding: clamp(40px,7vw,100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-copy h2 {
    font-size: clamp(2.7rem,4vw,4.7rem);
    line-height: 1;
    margin: 20px 0;
}

.feature-copy p {
    line-height: 1.8;
    color: #d3d8df;
    max-width: 430px;
    font-size: .9rem;
    margin-bottom: 30px;
}

/* 07. SECCIÓN NOSOTROS */
.about {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 100px;
    align-items: start;
}

.about h2 {
    font-size: clamp(2.8rem,5vw,5rem);
    line-height: 1;
    margin: 18px 0;
}

.about-copy {
    padding-top: 24px;
}

.about-copy p {
    color: #626a74;
    line-height: 1.9;
    font-size: .95rem;
    margin: 0 0 18px;
}

.values {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #d8d6cf;
}

.value strong {
    font: 400 1.25rem Georgia,serif;
    display: block;
    margin-bottom: 7px;
    color: var(--navy);
}

.value span {
    font-size: .74rem;
    color: var(--muted);
    line-height: 1.5;
}

/* 08. SECCIÓN CONTACTO */
.contact {
    background: #eae8e1;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr .8fr;
    gap: 80px;
    align-items: center;
}

.contact h2 {
    font-size: clamp(3rem,6vw,6rem);
    line-height: .98;
    margin: 18px 0 24px;
}

.contact p {
    color: #626a74;
    line-height: 1.8;
    max-width: 480px;
}

.contact-card {
    background: var(--navy);
    color: white;
    padding: 38px;
}

.contact-card h3 {
    font: 400 1.8rem Georgia,serif;
    margin: 0 0 14px;
}

.contact-card p {
    color: #d6dbe2;
    font-size: .86rem;
}

.contact-card .button {
    margin-top: 14px;
}

/* 09. PIE DE PÁGINA */
footer {
    background: #0b1524;
    color: white;
    padding: 55px 0 25px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 45px;
    border-bottom: 1px solid #293448;
}

.footer-blurb {
    max-width: 280px;
    color: #aab2bf;
    font-size: .8rem;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    align-items: start;
    font-size: .75rem;
    color: #d6dbe2;
}

.footer-links a:hover {
    color: var(--gold);
}

.legal {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 22px;
    color: #8e98a7;
    font-size: .68rem;
    line-height: 1.6;
}

/* 10. ANIMACIONES DE ENTRADA Y SALIDA */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s ease,transform .8s cubic-bezier(.2,.7,.2,1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: .12s;
}

.delay-2 {
    transition-delay: .24s;
}

.delay-3 {
    transition-delay: .36s;
}

/* 11. AVISO LEGAL Y NOTAS */
.privacy-panel {
    background: #fff;
    padding: 35px;
    margin-top: 25px;
    border: 1px solid #e0ded7;
}

.privacy-panel h3 {
    font: 400 1.6rem Georgia,serif;
}

.privacy-panel p {
    font-size: .85rem;
    color: #656d76;
    line-height: 1.8;
}

.small-note {
    font-size: .7rem;
    color: var(--muted);
    line-height: 1.6;
}

/* 12. DISEÑO RESPONSIVE — TABLETS Y PANTALLAS MEDIANAS */
@media (max-width:900px) {
    nav {
        gap: 14px;
    }

    .grid {
        grid-template-columns: repeat(2,1fr);
    }

    .about {
        gap: 45px;
    }

    .feature-copy {
        padding: 45px;
    }

    .contact-layout {
        gap: 35px;
    }
}

/* 13. DISEÑO RESPONSIVE — CELULARES */
@media (max-width:680px) {
    .container {
        width: min(100% - 32px,1200px);
    }

    header {
        height: 72px;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        padding: 22px 24px 28px;
        background: var(--navy);
        flex-direction: column;
        align-items: flex-start;
        border-top: 1px solid #304057;
    }

    nav.open {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .hero {
        min-height: 680px;
        height: 92svh;
    }

    .hero h1 {
        font-size: clamp(3.3rem,16vw,5.4rem);
    }

    .hero-bottom {
        font-size: .56rem;
    }

    .hero-bottom span:last-child {
        display: none;
    }

    section {
        padding: 75px 0;
    }

    .section-head {
        display: block;
        margin-bottom: 32px;
    }

    .section-head p {
        margin-top: 20px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .property-image {
        height: 360px;
    }

    .feature-inner,.about,.contact-layout {
        grid-template-columns: 1fr;
    }

    .feature-image {
        min-height: 330px;
    }

    .feature-copy {
        padding: 42px 24px 55px;
    }

    .about {
        gap: 10px;
    }

    .values {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-card {
        padding: 28px;
    }

    .footer-top,.legal {
        flex-direction: column;
    }

    .footer-links {
        gap: 18px;
    }

    .brand {
        font-size: 1rem;
    }
}

/* 14. ACCESIBILIDAD — RESPETO A LA PREFERENCIA DE MENOS MOVIMIENTO */
@media (prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto;
    }

    *,*:before,*:after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
