/* =====================================================================
   Royal Place — imóveis de alto padrão
   Paleta: navy profundo + dourado champagne sobre off-white
   ===================================================================== */

:root {
    --navy-900: #061426;
    --navy-800: #0A1B33;
    --navy-700: #0E2542;
    --navy-600: #143054;
    --navy-500: #1D3E68;

    --gold-600: #A8822F;
    --gold-500: #C9A227;
    --gold-400: #D4AF62;
    --gold-300: #E2C486;
    --gold-200: #EFDFB8;

    --cream:    #FAF8F4;
    --cream-2:  #F3EFE7;
    --line:     #E4DED2;
    --line-dark: rgba(212, 175, 98, 0.22);

    --ink:      #16233A;
    --ink-soft: #5A6579;
    --ink-mute: #8B93A3;
    --white:    #FFFFFF;

    --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans:  'Jost', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --shadow-sm: 0 2px 10px rgba(6, 20, 38, 0.06);
    --shadow-md: 0 10px 30px rgba(6, 20, 38, 0.10);
    --shadow-lg: 0 24px 60px rgba(6, 20, 38, 0.18);

    --radius: 3px;
    --container: 1180px;
    --header-h: 74px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

/* Safety net: an inline icon without an explicit size renders at text size
   instead of blowing up to the SVG's intrinsic box. More specific rules win. */
svg { width: 1em; height: 1em; flex: none; }
.inline-icon { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; color: var(--gold-500); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 0.5em;
    letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.6rem, 5.2vw, 4.05rem); }
h2 { font-size: clamp(2rem, 3.6vw, 2.85rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------- Buttons ------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: all 0.32s var(--ease);
    white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.32s var(--ease); }
.btn:hover svg.arrow { transform: translateX(4px); }

.btn-gold {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--navy-900);
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.24);
}
.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-300), var(--gold-400));
    box-shadow: 0 10px 28px rgba(201, 162, 39, 0.34);
    transform: translateY(-2px);
}

.btn-navy { background: var(--navy-800); color: var(--white); }
.btn-navy:hover { background: var(--navy-600); transform: translateY(-2px); }

.btn-outline {
    border-color: rgba(255, 255, 255, 0.42);
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(4px);
}
.btn-outline:hover { border-color: var(--gold-400); color: var(--gold-300); }

.btn-outline-dark { border-color: var(--navy-800); color: var(--navy-800); }
.btn-outline-dark:hover { background: var(--navy-800); color: var(--white); }

.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 10px 18px; font-size: 0.72rem; }

/* -------------------------------- Header ------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--navy-800);
    border-bottom: 1px solid rgba(212, 175, 98, 0.16);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--header-h);
}
/* Nothing in the header may grow: with longer translated labels a growing
   nav pushed past its own box and printed on top of the brand. */
.header-inner > * { flex: 0 0 auto; }
.header-inner > .main-nav { flex: 0 1 auto; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand img, .brand svg { height: 46px; width: auto; flex: none; }
.brand { white-space: nowrap; }
.brand-text {
    font-family: var(--serif);
    font-size: 1.6rem;
    color: var(--white);
    letter-spacing: 0.02em;
    line-height: 1;
}

.main-nav { display: flex; align-items: center; gap: 34px; }
/* Translated labels are longer than the Portuguese ones; without nowrap the
   English menu wraps onto two lines and breaks the header height. */
.main-nav a { white-space: nowrap; }

@media (max-width: 1340px) {
    .main-nav { gap: 18px; }
    .main-nav a { font-size: 0.82rem; }
    .brand-text { font-size: 1.35rem; }
}
@media (max-width: 1150px) {
    .main-nav { gap: 12px; }
    .main-nav a { font-size: 0.78rem; }
    .brand-text { display: none; }
    .header-cta { padding: 10px 14px; }
}

.main-nav a {
    position: relative;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.86);
    padding: 6px 0;
    transition: color 0.28s var(--ease);
}
.main-nav a::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 0;
    width: 0; height: 1px;
    background: var(--gold-400);
    transform: translateX(-50%);
    transition: width 0.32s var(--ease);
}
.main-nav a:hover, .main-nav a.active { color: var(--gold-300); }
.main-nav a.active::after, .main-nav a:hover::after { width: 22px; }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 8px;
    color: var(--white);
}
.nav-toggle span {
    display: block; width: 24px; height: 1.5px; background: currentColor; margin: 5px 0;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --------------------------------- Hero ------------------------------- */

.hero {
    position: relative;
    background: var(--navy-800);
    color: var(--white);
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0 0 0 38%;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(100deg, var(--navy-800) 6%, rgba(10, 27, 51, 0.86) 32%, rgba(10, 27, 51, 0.24) 74%, rgba(10, 27, 51, 0.42) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: clamp(64px, 9vw, 118px) 0 clamp(120px, 13vw, 168px);
    max-width: 560px;
}

.hero h1 { color: var(--white); margin-bottom: 18px; }

.hero p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.02rem;
    max-width: 430px;
    margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Ornamento losango dourado */
.ornament {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 22px;
}
.ornament::before, .ornament::after {
    content: '';
    height: 1px;
    width: 46px;
    background: linear-gradient(90deg, transparent, var(--gold-400));
}
.ornament::after { background: linear-gradient(90deg, var(--gold-400), transparent); }
.ornament i {
    width: 7px; height: 7px;
    background: var(--gold-400);
    transform: rotate(45deg);
    display: block;
}
.ornament.left { justify-content: flex-start; }
.ornament.left::before { display: none; }
.ornament.center { justify-content: center; }

/* ------------------------------ Search bar ---------------------------- */

.search-bar {
    position: relative;
    z-index: 5;
    margin-top: -58px;
    margin-bottom: 72px;
}

.search-panel {
    background: var(--navy-700);
    border: 1px solid var(--line-dark);
    box-shadow: var(--shadow-lg);
    padding: 22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.field label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-300);
    margin-bottom: 8px;
}

.field select, .field input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    color: var(--white);
    font-family: var(--sans);
    font-size: 0.9rem;
    appearance: none;
    transition: border-color 0.28s var(--ease), background 0.28s var(--ease);
}
.field select:focus, .field input:focus {
    outline: none;
    border-color: var(--gold-400);
    background: rgba(255, 255, 255, 0.1);
}
.field select option { background: var(--navy-800); color: var(--white); }

.field.select-wrap { position: relative; }
.field.select-wrap::after {
    content: '';
    position: absolute;
    right: 16px; bottom: 20px;
    width: 8px; height: 8px;
    border-right: 1.5px solid var(--gold-300);
    border-bottom: 1.5px solid var(--gold-300);
    transform: rotate(45deg);
    pointer-events: none;
}

.search-panel .btn { padding: 13px 30px; height: 46px; }

/* ------------------------------- Sections ----------------------------- */

.section { padding: clamp(64px, 8vw, 96px) 0; }
.section-dark { background: var(--navy-800); color: var(--white); }
.section-cream { background: var(--cream-2); }

.section-head { text-align: center; margin-bottom: 48px; }
.section-head.left { text-align: left; }

.eyebrow {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold-600);
    margin-bottom: 6px;
}
.section-dark .eyebrow { color: var(--gold-400); }

.section-head h2 { margin-bottom: 0; }
.section-dark h2 { color: var(--white); }
.section-lead { color: var(--ink-soft); max-width: 620px; margin: 14px auto 0; }
.section-head.left .section-lead { margin-left: 0; }

/* ----------------------------- Property grid -------------------------- */

.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-300);
}

.card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--navy-700);
}
.card-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}
.card:hover .card-media img { transform: scale(1.06); }

.badge {
    position: absolute;
    top: 14px; left: 14px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--navy-900);
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 2px;
}
.badge.badge-sold { background: var(--navy-700); color: var(--gold-300); }

.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }

/* The card heading now carries the property's attributes, so it is long. Side
   by side with the city it was squeezed into a two-word-per-line column; the
   two stack instead, and the heading gets the full card width. */
.card-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 10px;
}
.card-title {
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0;
    line-height: 1.4;
}
.card-place { font-size: 0.78rem; color: var(--ink-mute); white-space: nowrap; }

.card-price {
    font-family: var(--serif);
    font-size: 1.72rem;
    color: var(--navy-800);
    line-height: 1.1;
    margin-bottom: 14px;
}
.card-price small { font-family: var(--sans); font-size: 0.7rem; color: var(--ink-mute); letter-spacing: 0.1em; text-transform: uppercase; display: block; }

.specs {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.79rem;
}
.spec { display: flex; align-items: center; gap: 7px; }
.spec svg { width: 16px; height: 16px; color: var(--gold-600); flex: none; }

.card-link {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    color: var(--gold-600);
    font-weight: 500;
}
.card-link svg { width: 16px; height: 16px; transition: transform 0.32s var(--ease); }
.card:hover .card-link svg { transform: translateX(5px); }

/* -------------------------------- Stats ------------------------------- */

.stats {
    background: var(--navy-800);
    padding: 44px 0;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 6px 20px;
    border-right: 1px solid rgba(212, 175, 98, 0.2);
}
.stat:last-child { border-right: 0; }
.stat svg { width: 34px; height: 34px; color: var(--gold-400); flex: none; }
.stat-value {
    font-family: var(--serif);
    font-size: 2.1rem;
    color: var(--white);
    line-height: 1;
}
.stat-label { font-size: 0.74rem; color: rgba(255, 255, 255, 0.62); line-height: 1.35; }

/* -------------------------------- About ------------------------------- */

.about-grid {
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}
.about-media { position: relative; }
.about-media img {
    width: 100%;
    /* height:auto is required or the HTML height attribute wins over aspect-ratio */
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
}
.about-media::after {
    content: '';
    position: absolute;
    inset: 14px -14px -14px 14px;
    border: 1px solid var(--gold-300);
    border-radius: var(--radius);
    z-index: -1;
}
.about-text p { color: var(--ink-soft); }

/* ------------------------------- Services ----------------------------- */

.service {
    background: var(--white);
    border: 1px solid var(--line);
    padding: 30px 24px;
    text-align: center;
    border-radius: var(--radius);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.service:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--gold-300); }
.service svg { width: 40px; height: 40px; color: var(--gold-500); margin: 0 auto 14px; }
.service h3 { font-size: 1.15rem; color: var(--navy-800); margin-bottom: 8px; }
.service p { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }

/* ----------------------------- Testimonials --------------------------- */

.testimonial {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    padding: 28px 26px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.quote-mark { font-family: var(--serif); font-size: 2.6rem; line-height: 0.6; color: var(--gold-400); }
.testimonial p { color: rgba(255, 255, 255, 0.84); font-size: 0.92rem; margin: 0; flex: 1; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-author img, .avatar-fallback {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
    border: 1px solid var(--gold-400); flex: none;
}
.avatar-fallback {
    display: grid; place-items: center;
    background: var(--navy-600); color: var(--gold-300);
    font-family: var(--serif); font-size: 1.05rem;
}
.testimonial-author strong { display: block; font-size: 0.88rem; font-weight: 500; color: var(--white); }
.testimonial-author span { font-size: 0.76rem; color: rgba(255, 255, 255, 0.55); }

.dots { display: flex; justify-content: center; gap: 9px; margin-top: 34px; }
.dots button {
    width: 9px; height: 9px; border-radius: 50%; padding: 0;
    border: 1px solid var(--gold-400); background: transparent;
    transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.dots button.active { background: var(--gold-400); transform: scale(1.12); }

/* --------------------------------- CTA -------------------------------- */

.cta {
    position: relative;
    padding: clamp(56px, 7vw, 84px) 0;
    color: var(--white);
    background: var(--navy-900);
    overflow: hidden;
}
.cta img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.34;
}
.cta::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--navy-900) 12%, rgba(6, 20, 38, 0.72) 60%, rgba(6, 20, 38, 0.9));
}
.cta-inner {
    position: relative; z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr 1fr auto;
    gap: 34px;
    align-items: center;
}
.cta h2 { color: var(--white); margin: 0; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.cta p { color: rgba(255, 255, 255, 0.78); margin: 0; font-size: 0.95rem; }

/* -------------------------------- Footer ------------------------------ */

.site-footer { background: var(--navy-800); color: rgba(255, 255, 255, 0.72); padding-top: 62px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr;
    gap: 40px;
    padding-bottom: 44px;
}
.footer-about p { font-size: 0.86rem; margin: 18px 0 0; color: rgba(255, 255, 255, 0.6); }
.footer h4, .footer-col h4 {
    font-family: var(--sans);
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-300);
    margin: 0 0 16px;
    font-weight: 500;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a, .footer-col li { font-size: 0.86rem; color: rgba(255, 255, 255, 0.68); transition: color 0.28s var(--ease); }
.footer-col a:hover { color: var(--gold-300); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 16px; height: 16px; color: var(--gold-400); flex: none; margin-top: 3px; }

.socials { display: flex; gap: 12px; margin-bottom: 22px; }
.socials a {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border: 1px solid rgba(212, 175, 98, 0.35);
    border-radius: 50%;
    color: var(--gold-300);
    transition: all 0.3s var(--ease);
}
.socials a:hover { background: var(--gold-400); color: var(--navy-900); border-color: var(--gold-400); }
.socials svg { width: 16px; height: 16px; }

.newsletter p { font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); margin-bottom: 12px; }
.newsletter form { display: flex; gap: 8px; }
.newsletter input {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 0.84rem;
}
.newsletter input:focus { outline: none; border-color: var(--gold-400); }
.newsletter button {
    width: 42px;
    border: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--navy-900);
    display: grid;
    place-items: center;
}
.newsletter button svg { width: 16px; height: 16px; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.5);
}
.footer-bottom a:hover { color: var(--gold-300); }
.footer-bottom-links { display: flex; gap: 20px; }

/* ------------------------------ Page hero ----------------------------- */

.page-hero {
    position: relative;
    background: var(--navy-800);
    color: var(--white);
    padding: 62px 0 58px;
    text-align: center;
    overflow: hidden;
}
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.24; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,20,38,0.7), rgba(6,20,38,0.94)); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--white); font-size: clamp(2.2rem, 4vw, 3.1rem); margin-bottom: 6px; }
.breadcrumb { font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); }
.breadcrumb a:hover { color: var(--gold-300); }

/* ------------------------------- Listing ------------------------------ */

.listing-layout { display: grid; grid-template-columns: 268px 1fr; gap: 34px; align-items: start; }

.filters {
    background: var(--white);
    border: 1px solid var(--line);
    padding: 22px;
    border-radius: var(--radius);
    position: sticky;
    top: calc(var(--header-h) + 18px);
}
.filters h4 {
    font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--gold-600); margin: 0 0 16px;
}
.filters .field { margin-bottom: 14px; }
.filters .field label { color: var(--ink-soft); }
.filters .field select, .filters .field input {
    background: var(--cream);
    border-color: var(--line);
    color: var(--ink);
}
.filters .field.select-wrap::after { border-color: var(--gold-600); }

.listing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    font-size: 0.85rem;
    color: var(--ink-soft);
}
.listing-toolbar select {
    padding: 9px 12px;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: var(--radius);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 0.85rem;
}

.empty-state {
    background: var(--white);
    border: 1px dashed var(--line);
    padding: 56px 24px;
    text-align: center;
    border-radius: var(--radius);
}
.empty-state svg { width: 46px; height: 46px; color: var(--gold-400); margin: 0 auto 14px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: var(--radius);
    font-size: 0.86rem;
    padding: 0 12px;
    transition: all 0.28s var(--ease);
}
.pagination a:hover { border-color: var(--gold-400); color: var(--gold-600); }
.pagination .current { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }

/* ------------------------------- Detail ------------------------------- */

.detail-layout { display: grid; grid-template-columns: 1.65fr 1fr; gap: 38px; align-items: start; }
/* Grid items default to min-width:auto and refuse to shrink below their
   widest child — that is what pushed the page past the viewport on phones. */
.detail-layout > * { min-width: 0; }
.listing-layout > * { min-width: 0; }

.gallery-main {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--navy-700);
    border-radius: var(--radius);
    overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.gallery-thumbs button {
    padding: 0; border: 1px solid transparent; background: none;
    aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px;
}
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs button.active { border-color: var(--gold-400); }

.detail-header {
    display: flex;
    justify-content: space-between;
    gap: 20px 32px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 22px;
}
/* Title takes the room it needs; the price stays pinned to the right edge. */
.detail-header > div:first-child { flex: 1 1 460px; min-width: 0; }
.detail-header .detail-price-box { flex: 0 0 auto; margin-left: auto; }
.detail-header h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 0 0 4px; }
.detail-price { font-family: var(--serif); font-size: 2.3rem; color: var(--navy-800); line-height: 1; }

.spec-grid {
    display: grid;
    /* 105px keeps all six specs on a single row inside the content column */
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 26px 0;
}
.spec-box { background: var(--white); padding: 18px 14px; text-align: center; }
.spec-box svg { width: 22px; height: 22px; color: var(--gold-500); margin: 0 auto 8px; }
.spec-box strong { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--navy-800); line-height: 1; }
.spec-box span { font-size: 0.72rem; color: var(--ink-mute); letter-spacing: 0.08em; text-transform: uppercase; }

.prose { color: var(--ink-soft); }
.prose h3 { color: var(--navy-800); margin-top: 30px; }

.features-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.features-list li { display: flex; gap: 10px; align-items: center; font-size: 0.88rem; color: var(--ink-soft); }
.features-list svg { width: 15px; height: 15px; color: var(--gold-500); flex: none; }

.sidebar-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    position: sticky;
    top: calc(var(--header-h) + 18px);
}
.sidebar-card h3 { font-size: 1.3rem; color: var(--navy-800); }
.sidebar-card .muted { font-size: 0.84rem; color: var(--ink-soft); }

/* -------------------------------- Forms ------------------------------- */

.form-field { margin-bottom: 14px; }
.form-field label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.form-field input, .form-field textarea, .form-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--cream);
    font-family: var(--sans);
    font-size: 0.92rem;
    color: var(--ink);
    transition: border-color 0.28s var(--ease), background 0.28s var(--ease);
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
    outline: none;
    border-color: var(--gold-400);
    background: var(--white);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; }

.alert {
    padding: 13px 16px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 18px;
    border: 1px solid;
}
.alert-success { background: #EFF8F1; border-color: #BCDFC5; color: #1F5B32; }
.alert-error   { background: #FDF1F1; border-color: #EEC6C6; color: #8C2B2B; }

/* ------------------------------ Contact ------------------------------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; align-items: start; }
.contact-info ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; }
.contact-info li { display: flex; gap: 14px; align-items: flex-start; }
.contact-info svg { width: 20px; height: 20px; color: var(--gold-500); flex: none; margin-top: 3px; }
.contact-info strong { display: block; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500; }
.contact-info span { color: var(--ink); font-size: 0.95rem; }

.map-embed { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 30px; }
.map-embed iframe { width: 100%; height: 300px; border: 0; display: block; }

/* ------------------------------- Floating ----------------------------- */

.whatsapp-float {
    position: fixed;
    right: 20px; bottom: 20px;
    z-index: 80;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 27px; height: 27px; }

/* ------------------------------ Animations ---------------------------- */

/* Progressive enhancement: content is only hidden when JS is running,
   so a script failure can never leave the page blank. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

/* ------------------------------ Responsive ---------------------------- */

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 0; }
    .stat:nth-child(2n) { border-right: 0; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-layout { grid-template-columns: 1fr; }
    .sidebar-card { position: static; }
    .listing-layout { grid-template-columns: 1fr; }
    .filters { position: static; }
    .cta-inner { grid-template-columns: 1fr; text-align: left; }
    .hero-media { inset: 0 0 0 28%; }
}

@media (max-width: 860px) {
    .main-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        background: var(--navy-800);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px 24px;
        border-bottom: 1px solid var(--line-dark);
        transform: translateY(-130%);
        transition: transform 0.4s var(--ease);
        z-index: 89;
    }
    .nav-open .main-nav { transform: translateY(0); }
    .main-nav a { padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
    .main-nav a::after { display: none; }
    .nav-toggle { display: block; }
    .header-cta { display: none; }

    .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .about-media::after { display: none; }

    .hero-media { inset: auto 0 0 0; height: 46%; opacity: 0.42; }
    .hero-media::after { background: linear-gradient(180deg, var(--navy-800) 4%, rgba(10, 27, 51, 0.6)); }
    .hero-inner { max-width: none; padding-bottom: 220px; }

    .search-panel { grid-template-columns: 1fr; }
    .search-bar { margin-top: -46px; margin-bottom: 54px; }
    .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
    .footer-bottom { flex-direction: column; }
}

@media (max-width: 560px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat { border-right: 0; justify-content: flex-start; }
    .footer-grid { grid-template-columns: 1fr; }
    .card-top { flex-direction: column; gap: 2px; }
    .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
}

/* ===================== SEO / conteúdo estruturado ====================== */

.breadcrumb-nav { margin-bottom: 20px; font-size: 0.8rem; color: var(--ink-mute); }
.breadcrumb-nav ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumb-nav li { display: flex; align-items: center; gap: 8px; }
.breadcrumb-nav a { color: var(--ink-soft); transition: color 0.25s var(--ease); }
.breadcrumb-nav a:hover { color: var(--gold-600); }
.breadcrumb-nav span[aria-hidden] { color: var(--gold-400); }
.breadcrumb-nav [aria-current] { color: var(--ink); }

.detail-place { color: var(--ink-mute); margin: 0; display: flex; align-items: center; }
.detail-price-box { text-align: right; }
.detail-price-label { font-size: 0.78rem; color: var(--ink-mute); letter-spacing: 0.12em; text-transform: uppercase; }

.detail-figure { margin: 0 0 10px; }
.detail-figure figcaption {
    font-size: 0.82rem;
    color: var(--ink-mute);
    padding: 10px 2px 0;
    border-bottom: 1px solid var(--line);
}

.inline-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 8px 0 4px; }
.inline-gallery img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }

.prose section { margin-bottom: 34px; }
.prose h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    color: var(--navy-800);
    margin: 0 0 14px;
}
.prose h3 { font-size: 1.06rem; color: var(--navy-700); margin: 20px 0 6px; font-family: var(--sans); font-weight: 500; }

.faq h3 {
    position: relative;
    padding-left: 22px;
}
.faq h3::before {
    content: '';
    position: absolute;
    left: 4px; top: 0.55em;
    width: 7px; height: 7px;
    background: var(--gold-400);
    transform: rotate(45deg);
}
.faq p { margin-left: 22px; }

.internal-links {
    background: var(--cream-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 26px;
    margin-top: 34px;
}
.internal-links h2 { font-size: 1.25rem; margin-bottom: 12px; color: var(--navy-800); }
.internal-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.internal-links a {
    color: var(--gold-600);
    font-size: 0.92rem;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s var(--ease);
}
.internal-links a:hover { border-bottom-color: var(--gold-400); }

.hub-intro { max-width: 820px; margin-bottom: 40px; font-size: 1.02rem; }
.hub-intro p { color: var(--ink-soft); }
.hub-intro strong { color: var(--ink); }

.hub-areas { margin-top: 52px; }
.hub-areas h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--navy-800); margin-bottom: 18px; }

.link-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}
.link-grid a {
    display: flex; align-items: center; gap: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.link-grid a:hover { border-color: var(--gold-300); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.link-grid svg { width: 20px; height: 20px; color: var(--gold-500); flex: none; }
.link-grid strong { display: block; font-size: 0.94rem; font-weight: 500; color: var(--ink); }
.link-grid small { font-size: 0.76rem; color: var(--ink-mute); }

.sidebar-title { font-family: var(--serif); font-size: 1.3rem; color: var(--navy-800); margin: 0 0 8px; font-weight: 500; }

@media (max-width: 860px) {
    .inline-gallery { grid-template-columns: 1fr; }
    .detail-price-box { text-align: left; }
    .detail-header { flex-direction: column; align-items: flex-start; }
    /* In a column flex container flex-basis is the HEIGHT — reset it or the
       title block reserves 460px of empty space above the price. */
    .detail-header > div:first-child { flex: 0 0 auto; }
    .detail-header .detail-price-box { margin-left: 0; }
}

/* Rodapé — assinatura de marca.
   Prefixado com .footer-about porque `.footer-about p` já define cor e tamanho
   e venceria uma regra de classe simples por especificidade. */
.footer-about .footer-slogan {
    font-family: var(--serif);
    font-size: 1.12rem;
    color: var(--gold-300);
    margin: 16px 0 8px;
    line-height: 1.4;
}
.footer-about .footer-creci {
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.45);
    margin: 10px 0 0;
}

/* Ficha técnica — lista de definição em duas colunas */
.spec-sheet {
    margin: 0;
    border-top: 1px solid var(--line);
}
.spec-sheet-row {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 18px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}
.spec-sheet dt {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mute);
    font-weight: 500;
}
.spec-sheet dt svg { width: 17px; height: 17px; color: var(--gold-500); flex: none; }
.spec-sheet dd { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }
.spec-sheet dd p { margin: 0 0 6px; }
.spec-sheet dd p:last-child { margin-bottom: 0; }

@media (max-width: 700px) {
    .spec-sheet-row { grid-template-columns: 1fr; gap: 6px; }
}

/* Blocos editoriais de condomínio */
.condo-block { margin-bottom: 44px; }
.condo-block h2 {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    color: var(--navy-800);
    margin-bottom: 16px;
}

.price-m2 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold-400);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 16px;
}
.price-m2 strong {
    font-family: var(--serif);
    font-size: 2.1rem;
    color: var(--navy-800);
    line-height: 1;
}
.price-m2 > span { color: var(--ink-mute); font-size: 0.9rem; }
.price-m2-source {
    flex-basis: 100%;
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: var(--ink-mute);
}
.price-m2-source a { color: var(--gold-600); border-bottom: 1px solid transparent; }
.price-m2-source a:hover { border-bottom-color: var(--gold-400); }

/* Seletor de idioma */
.lang-switch { display: flex; align-items: center; gap: 2px; }
.lang-switch a {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.55);
    padding: 5px 8px;
    border-radius: 2px;
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.lang-switch a:hover { color: var(--gold-300); background: rgba(255, 255, 255, 0.06); }
.lang-switch a.active { color: var(--navy-900); background: var(--gold-400); font-weight: 500; }

@media (max-width: 860px) {
    .lang-switch { margin-left: auto; margin-right: 8px; }
}

/* ===================================================================
   Numerais
   Cormorant Garamond usa numerais old-style por padrão: o "1" sai como
   um traço sem base e lê como "i" — inaceitável em preço de imóvel.
   lining-nums traz a forma com serifa de base; tabular-nums alinha as
   colunas em valores e estatísticas.
   =================================================================== */
.card-price,
.detail-price,
.stat-value,
.spec-box strong,
.price-m2 strong,
.hub-intro strong,
.prose strong {
    font-variant-numeric: lining-nums tabular-nums;
    font-feature-settings: "lnum" 1, "tnum" 1;
}

h1, h2, h3, .brand-text, .card-title, .breadcrumb-nav, .badge, .specs, .features-list {
    font-variant-numeric: lining-nums;
    font-feature-settings: "lnum" 1;
}

/* ============================ Lightbox ============================== */

body.lightbox-open { overflow: hidden; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(6, 20, 38, 0.94);
    display: grid;
    grid-template-columns: 64px 1fr 64px;
    align-items: center;
    justify-items: center;
    padding: 24px;
    animation: lb-in 0.22s var(--ease);
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lb-figure {
    grid-column: 2;
    margin: 0;
    max-width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.lb-figure img {
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    cursor: default;
}
.lb-figure figcaption {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.84rem;
    text-align: center;
    max-width: 62ch;
}

.lightbox button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 98, 0.32);
    color: var(--gold-300);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    font-size: 1.7rem;
    line-height: 1;
    display: grid;
    place-items: center;
    transition: background 0.24s var(--ease), border-color 0.24s var(--ease);
}
.lightbox button:hover { background: var(--gold-400); color: var(--navy-900); border-color: var(--gold-400); }
.lightbox button:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; }

/* `display: grid` on the buttons beats the UA rule for [hidden], so the
   arrows stayed visible on a single-photo gallery. */
.lightbox button[hidden], .lb-counter[hidden] { display: none; }

.lb-close {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 2;
    width: 52px;
    height: 52px;
    font-size: 2rem;
    background: rgba(6, 20, 38, 0.72);
}
/* A hint so the way out is never in doubt. */
.lightbox::after {
    content: attr(data-hint);
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    pointer-events: none;
}
@media (max-width: 720px) { .lightbox::after { display: none; } }
.lb-prev  { grid-column: 1; }
.lb-next  { grid-column: 3; }

.lb-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    font-variant-numeric: lining-nums tabular-nums;
}

@media (max-width: 720px) {
    .lightbox { grid-template-columns: 1fr; padding: 12px; }
    .lb-figure { grid-column: 1; }
    .lb-prev { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); }
    .lb-next { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) { .lightbox { animation: none; } }

/* Indicador de ampliar sobre a foto principal */
.gallery-main { position: relative; }
.gallery-zoom {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    background: rgba(6, 20, 38, 0.62);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.26s var(--ease), border-color 0.26s var(--ease);
}
.gallery-zoom svg { width: 16px; height: 16px; }
.gallery-zoom:hover { background: var(--gold-400); color: var(--navy-900); border-color: var(--gold-400); }
.gallery-main img { cursor: zoom-in; }

/* ==================== Google Preferred Sources ===================== */

.preferred-source {
    display: grid;
    gap: 10px;
    justify-items: start;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.preferred-source--dark { border-top-color: rgba(255, 255, 255, 0.12); }

.ps-text {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--ink-mute);
    max-width: 34ch;
}
.preferred-source--dark .ps-text { color: rgba(255, 255, 255, 0.58); }

/* Google injects its own styled button inside this div; we only reserve
   space so the layout does not jump when it renders. */
.preferred-source [google-add-preferred-source-btn] { min-height: 36px; }

.ps-fallback {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    color: var(--gold-600);
    border-bottom: 1px solid transparent;
}
.ps-fallback:hover { border-bottom-color: var(--gold-400); }
.preferred-source--dark .ps-fallback { color: var(--gold-300); }

/* On the article page it sits in the flow, not in a sidebar column. */
.property-detail .preferred-source,
article .preferred-source { margin-top: 34px; }

/* Legenda nas miniaturas */
.gallery-thumbs button { position: relative; }
.thumb-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 4px 6px;
    background: linear-gradient(transparent, rgba(6, 20, 38, 0.82));
    color: #fff;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}
#galleryCaption { min-height: 1.3em; }

/* Self-hosted tour video. Capped height so a phone-shot vertical clip does not
   push the rest of the page off-screen. */
.property-video {
    width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    background: #0A1B33;
    display: block;
}
