/* ============================================================
   BRISAS DEL MAR — MAIN STYLESHEET
   Sections:
    1.  Reset & Base
    2.  Layout Chrome       (lang-bar, contact-bar)
    3.  Hero                (index.html)
    4.  Subpage Header
    5.  Navigation          (tab-nav)
    6.  Content             (layout, intro, content-blocks)
    7.  Components          (specs-table, price-reveal, specs-section)
    8.  Galleries           (investor.html image grids)
    9.  Page Intro / Outro  (investor.html centered sections)
   10.  Page-Specific       (lifestyle.html — body.page-lifestyle)
   11.  Responsive — Mobile (@media max-width: 900px)
   12.  Responsive — Desktop (@media min-width: 901px)
   ============================================================ */


/* ============ 1. RESET & BASE ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

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

figcaption {
  margin-top: 4px;
  font-size: 0.9rem;
  color: #777;
  text-align: center;
}


/* ============ 2. LAYOUT CHROME ============ */

/* --- Lang Bar --- */
.lang-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: #1a1a2e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
}

.lang-bar .transparency-link {
  color: #d9366f;
  text-decoration: none;
  padding: 4px 12px;
  font-size: 16px;
  border-radius: 4px;
  font-weight: 500;
}

/* .lang-bar .transparency-link.active {
  color: #fff;
  background: #3a86ff;
} */

.lang-bar .transparency-link:hover:not(.active) {
  color: #fff;
}

.lang-bar .lang-switcher {
  display: flex;
  gap: 4px;
}

.lang-bar .lang-switcher a {
  color: #aaa;
  text-decoration: none;
  padding: 4px 12px;
  font-size: 14px;
  border-radius: 4px;
}

.lang-bar .lang-switcher a.active {
  color: #fff;
  background: #3a86ff;
}

.lang-bar .lang-switcher a:hover:not(.active) {
  color: #fff;
}

/* --- Contact Bar (shown via mobile @media) --- */
.contact-bar {
  display: none;
}

/* --- Lang-bar right group: switcher + contact buttons --- */
.lang-bar-right {
  display: flex;
  align-items: center;
}

/* --- Lang-bar contact links (desktop only, hidden on mobile) --- */
.lang-bar-contact {
  display: none;
}


/* ============ 3. HERO ============ */
.hero {
  margin-top: 36px;
  height: calc(100vh - 36px - 140px);
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  background: linear-gradient(to bottom, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0.6) 100%);
  padding: 20px 20px 40px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: 12px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  font-weight: 300;
  letter-spacing: 0.05em;
}

.hero .tagline {
  color: rgba(255,255,255,0.95);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}


/* ============ 4. SUBPAGE HEADER ============ */
.subpage-header {
  margin-top: 36px;
  padding: 40px 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  text-align: center;
}

.subpage-header h1 {
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  margin-bottom: 8px;
}

.subpage-header p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
}


/* ============ 5. NAVIGATION ============ */
/* Mobile: 2x2 grid. Desktop: 4 across (see section 12). */
.tab-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #ddd;
}

.nav-tile {
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  background: #fff;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 80px;
}

.nav-title {
  display: block;
  color: #333;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
}

.nav-subtitle {
  display: block;
  color: #888;
  font-size: 12px;
  margin-top: 4px;
}

.nav-tile:hover {
  background: #f0f7ff;
}

.nav-tile:hover .nav-title {
  color: #3a86ff;
}

.nav-tile.active {
  background: #f0f7ff;
  box-shadow: inset 0 -3px 0 #3a86ff;
}

.nav-tile.active .nav-title {
  color: #3a86ff;
}


/* ============ 6. CONTENT ============ */
h1 {
  text-align: center;
  line-height: 140%;
  font-size: 28px;
  padding-bottom: 15px;
}
.content {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
}

/* --- Intro --- */
.intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.intro p {
  color: #555;
  margin-bottom: 16px;
}

.cta-hint {
  color: #3a86ff;
  font-weight: 500;
}

/* --- Content Blocks (image + text alternating) --- */
.content-block {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 20px;
  margin-top: 20px;
  align-items: center;
}

.content-block .text {
  flex: 1 1 0;
}

.content-block .image {
  flex: 1 1 0;
  max-width: 420px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.content-block .image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.content-block figure {
  margin: 0;
}

.content-block h2 {
  color: #1a1a2e;
  font-weight: 500;
  text-align: center;
  margin-bottom: 16px;
}

.content-block p {
  color: #555;
  margin-bottom: 12px;
}

.content-block .text ul {
  color: #555;
  padding-left: 20px;
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Full-height images (floor plans, diagrams) — no cropping */
.content-block .image.full-height img {
  aspect-ratio: unset;
  object-fit: contain;
  max-height: 500px;
}

/* Vertical/portrait images — no cropping */
.content-block .image.vertical img {
  aspect-ratio: unset;
  object-fit: contain;
  max-height: 600px;
}

/* Image stack (multiple images on one side of a block) */
.content-block.has-image-stack .image-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 420px;
}

.content-block.has-image-stack .image-stack .image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Text-only sections (no image) */
.text-section {
  margin-bottom: 2rem;
  color: #555;
}


/* ============ 7. COMPONENTS ============ */

/* --- Specs Table --- */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 5px 0;
}

.specs-table th,
.specs-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.specs-table th {
  background: #f9f9f9;
  font-weight: 500;
  color: #333;
}

.specs-table td {
  color: #555;
}

/* Size modifiers */
.specs-table--narrow {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.specs-table--medium {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Price Reveal --- */
.price-reveal {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(to bottom, #f5f5f5, #e8e8e8);
  margin-top: 40px;
}

.price-reveal .price {
  font-size: clamp(2rem, 5vw, 3rem);
  color: #1a1a2e;
  font-weight: 300;
  margin-bottom: 12px;
}

.price-reveal .price-context {
  color: #666;
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* --- Specs Section (titled table block, e.g. "What You Get") --- */
.specs-section {
  margin-top: 10px;
}

.specs-section h2 {
  text-align: center;
  margin-bottom: 30px;
}

/* --- Numbers Section (investor quick stats) --- */
.numbers-section {
  margin-bottom: 40px;
}

.numbers-section h2 {
  text-align: center;
  margin-bottom: 20px;
}


/* ============ 8. GALLERIES ============ */
/* investor.html image grid sections */

.gallery-section {
  margin: 60px 0;
  padding: 30px 0;
}

.gallery-section h2 {
  text-align: center;
  margin-bottom: 40px;
}

.gallery-description {
  text-align: center;
  color: #555;
  max-width: 700px;
  margin: 0 auto 30px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.image-grid--narrow {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}


/* ============ 9. PAGE INTRO / OUTRO ============ */
/* investor.html centered hero + closing text blocks */

.page-intro {
  max-width: 820px;
  margin: 0 auto 50px;
  text-align: center;
}

.page-intro h1 {
  margin-bottom: 20px;
}

.page-intro .lead {
  font-size: 18px;
  line-height: 1.6;
}

.page-intro .sub {
  color: #555;
  max-width: 720px;
  margin: 20px auto 0;
}

.page-outro {
  margin: 70px auto 40px;
  max-width: 850px;
  text-align: center;
}

.page-outro h2 {
  margin-bottom: 20px;
}

.page-outro .highlight {
  font-size: 17px;
  line-height: 1.7;
}

.page-outro .sub {
  color: #555;
  max-width: 720px;
  margin: 20px auto;
}

.page-outro .closing {
  margin-top: 25px;
  font-weight: 500;
}


/* ============ 10. PAGE-SPECIFIC ============ */

/* --- lifestyle.html ---
   Requires <body class="page-lifestyle"> on that page. */
.lifestyle-paragraph {
  margin-bottom: 8px;
}
.page-lifestyle .intro {
  margin-bottom: 3rem;
  font-size: 1.1rem;
  color: #444;
}

.page-lifestyle .content {
  margin-bottom: 4rem;
}

/* Section-level h2s (not inside content-blocks) */
.page-lifestyle .content h2 {
  border-bottom: 2px solid #3a86ff;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.page-lifestyle .content h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Lifestyle specs table: wide label column + top-aligned */
.page-lifestyle .specs-table th {
  width: 180px;
}

.page-lifestyle .specs-table th,
.page-lifestyle .specs-table td {
  vertical-align: top;
}

/* Photo gallery for lifestyle page */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.photo-gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.photo-gallery figure img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.photo-gallery figcaption {
  font-size: 0.82rem;
  color: #666;
  font-style: italic;
  padding: 0.4rem 0.2rem 0;
  line-height: 1.4;
}

/* Single wide gallery image (solo shots that deserve full width) */
.photo-gallery.solo {
  grid-template-columns: 1fr;
  max-width: 680px;
}

.photo-gallery.solo figure img {
  height: 380px;
}

@media (max-width: 600px) {
  .photo-gallery {
    grid-template-columns: 1fr;
  }
  .photo-gallery figure img {
    height: 220px;
  }
  .photo-gallery.solo figure img {
    height: 240px;
  }
}

/* --- transparency.html / transparencia.html ---
   Requires <body class="page-transparency"> on that page. */

/* Jump navigation for transparency page */
.transparency-jump-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: #f0f7ff;
  border-radius: 8px;
  margin: 1.5rem auto;
  max-width: 700px;
  flex-wrap: wrap;
}

.transparency-jump-nav a {
  padding: 0.75rem 1.5rem;
  background: #3a86ff;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.2s;
}

.transparency-jump-nav a:hover {
  background: #2c6fd9;
}

.transparency-content {
  max-width: 800px;
  margin: 0 auto;
}

.transparency-content h2 {
  border-bottom: 2px solid #3a86ff;
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: 80px;
}

.transparency-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #1a1a2e;
}

.transparency-content p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.transparency-content ul {
  color: #555;
  line-height: 1.7;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.transparency-content li {
  margin-bottom: 0.75rem;
}


/* ============ 11. RESPONSIVE — MOBILE ============ */
@media (max-width: 900px) {

  .hero {
    height: calc(100vh - 36px - 160px - 50px);
    min-height: 300px;
  }

  /* Tab nav fixed at bottom */
  .tab-nav {
    position: fixed;
    bottom: 50px;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    gap: 1px;
  }

  .nav-tile {
    padding: 12px 8px;
    min-height: 60px;
  }

  .nav-title {
    font-size: 13px;
  }

  .nav-subtitle {
    font-size: 10px;
  }

  .nav-tile.active {
    box-shadow: inset 0 3px 0 #3a86ff;
  }

  /* Contact bar visible on mobile */
  .contact-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #1a1a2e;
    z-index: 100;
  }

  .contact-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
  }

  .contact-bar a:first-child {
    border-right: 1px solid rgba(255,255,255,0.2);
  }

  .contact-bar a:hover {
    background: rgba(255,255,255,0.1);
  }

  /* Content stacks vertically */
  .content-block {
    flex-direction: column;
    gap: 20px;
  }

  .content-block .image {
    width: 100%;
  }

  .content-block .image img {
    aspect-ratio: 16/10;
  }

  .content-block .image.vertical img,
  .content-block .image.full-height img {
    aspect-ratio: unset;
  }

  .content {
    padding-bottom: 180px; /* space for fixed nav + contact bar */
  }

  .subpage-header {
    padding: 30px 16px;
  }

  /* Responsive tables for lifestyle page only - stack th above td on mobile */
  .page-lifestyle .specs-table,
  .page-lifestyle .specs-table tbody,
  .page-lifestyle .specs-table tr,
  .page-lifestyle .specs-table th,
  .page-lifestyle .specs-table td {
    display: block;
    width: 100%;
  }

  .page-lifestyle .specs-table tr {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 1rem;
  }

  .page-lifestyle .specs-table th {
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    padding: 0 0 0.5rem 0;
    border-bottom: none;
  }

  .page-lifestyle .specs-table td {
    padding: 0.5rem 0 0 0;
    border-bottom: none;
  }
}


/* ============ 12. RESPONSIVE — DESKTOP ============ */
@media (min-width: 901px) {

  /* Lang-bar contact links — visible on desktop, separated from lang switcher */
  .lang-bar-contact {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    padding-left: 14px;
    border-left: 1px solid rgba(255,255,255,0.25);
  }

  .lang-bar-contact a {
    color: #aaa;
    text-decoration: none;
    padding: 4px 20px;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: color 0.2s, border-color 0.2s;
  }

  .lang-bar-contact a:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
  }


  .hero {
    height: 70vh;
    max-height: 600px;
  }

  .tab-nav {
    position: sticky;
    top: 36px;
    grid-template-columns: repeat(4, 1fr);
    max-width: 900px;
    margin: 0 auto;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }

  /* Auto-alternating: odd = image left, even = image right */
  .content > .content-block:nth-of-type(odd) {
    flex-direction: row;
  }

  .content > .content-block:nth-of-type(even) {
    flex-direction: row-reverse;
  }

  /* Manual overrides — declared after nth-of-type so source order wins.
     Use .reverse to force image right, .normal to force image left,
     regardless of position in the flow. */


  /* .content > .content-block.reverse {
    flex-direction: row-reverse;
  } */

  .content > .content-block.normal {
    flex-direction: row;
  }

  /* Image stack */
  .content-block.has-image-stack .image-stack {
    flex: 1 1 0;
  }

  .content-block.has-image-stack .text {
    flex: 1 1 0;
  }
}
