/* ============================================================
   Petronas Bienes y Raíces — Estilos base compartidos
   Marca: verde petróleo + dorado · Tema Dark / Light
   ============================================================ */

:root {
  /* Brand colors */
  --petro-900: #082024;
  --petro-800: #0e2a30;
  --petro-700: #14454f;
  --petro-600: #1b5a66;
  --gold-600: #a8821c;
  --gold-500: #c9a227;
  --gold-400: #e2c04e;
  --gold-300: #f0d47d;

  /* Neutrals (light theme) */
  --bg: #f6f8f9;
  --bg-2: #eef2f4;
  --surface: #ffffff;
  --surface-2: #f0f3f5;
  --text: #12262c;
  --text-soft: #4a5c63;
  --muted: #71838a;
  --border: #dde4e7;
  --shadow: 0 10px 30px rgba(8, 32, 36, .10);
  --shadow-lg: 0 24px 60px rgba(8, 32, 36, .18);
  --header-bg: rgba(246, 248, 249, .82);

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1200px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --dur: .28s;
}

[data-theme="dark"] {
  --bg: #0a1a1e;
  --bg-2: #0e2227;
  --surface: #10262b;
  --surface-2: #163238;
  --text: #e8f0f1;
  --text-soft: #b7c8cc;
  --muted: #86a0a6;
  --border: #1f3c43;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  --header-bg: rgba(10, 26, 30, .82);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--dur), color var(--dur);
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; color: var(--text); font-weight: 700; letter-spacing: -.01em; }

.container { width: min(var(--container), 92%); margin-inline: auto; }

/* ---------- Secciones con fondo Petronas ---------- */
.section {
  position: relative;
  padding: 88px 0;
  isolation: isolate;
  overflow: hidden;
}
.section-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: -2;
}
.section-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,32,36,.78), rgba(8,32,36,.62) 55%, rgba(8,32,36,.82));
}
[data-theme="light"] .section-bg::after {
  background: linear-gradient(180deg, rgba(246,248,249,.90), rgba(240,244,245,.82) 55%, rgba(246,248,249,.94));
}
.section-bg.bright::after {
  background: linear-gradient(180deg, rgba(8,32,36,.62), rgba(8,32,36,.48) 55%, rgba(8,32,36,.66));
}
[data-theme="light"] .section-bg.bright::after {
  background: linear-gradient(180deg, rgba(246,248,249,.92), rgba(240,244,245,.78) 55%, rgba(246,248,249,.94));
}

/* ---------- Texto sobre fondo Petronas ---------- */
.hero-content, .section-inner { position: relative; z-index: 1; }
[data-theme="light"] .section .hero-content,
[data-theme="light"] .section .section-inner { color: var(--text); }
[data-theme="dark"] .section .hero-content,
[data-theme="dark"] .section .section-inner { color: var(--text); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700;
  color: var(--gold-500); margin-bottom: .9rem;
}
[data-theme="light"] .eyebrow { color: var(--gold-600); }

.sec-title { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: .5rem; }
.sec-title .gold { background: linear-gradient(120deg, var(--gold-400), var(--gold-600)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sec-sub { color: var(--text-soft); max-width: 620px; margin-inline: auto; font-size: 1.05rem; }
.center { text-align: center; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.7rem; border-radius: 999px; font-weight: 700; font-size: .95rem;
  border: 2px solid transparent; transition: all var(--dur); white-space: nowrap;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #082024; box-shadow: 0 8px 24px rgba(201,162,39,.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(201,162,39,.5); }
.btn-ghost { border-color: var(--gold-500); color: var(--gold-400); }
[data-theme="light"] .btn-ghost { color: var(--petro-800); border-color: var(--gold-600); }
.btn-ghost:hover { background: rgba(201,162,39,.14); }
.btn-solid { background: var(--petro-700); color: #fff; }
.btn-solid:hover { background: var(--petro-600); }
.btn-light { background: #fff; color: var(--petro-800); }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-link { border: none; background: none; color: var(--gold-500); font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; }
[data-theme="light"] .btn-link { color: var(--gold-600); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: transform var(--dur), box-shadow var(--dur);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: .32rem .7rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.badge-gold { background: rgba(201,162,39,.16); color: var(--gold-600); border: 1px solid rgba(201,162,39,.4); }
[data-theme="dark"] .badge-gold { color: var(--gold-300); }
.badge-blue { background: rgba(27,90,102,.14); color: var(--petro-700); }
[data-theme="dark"] .badge-blue { color: #7fc4ce; }
.badge-green { background: rgba(46,160,90,.16); color: #1f7a44; }
[data-theme="dark"] .badge-green { color: #6fdc9b; }
.badge-red { background: rgba(220,60,60,.14); color: #b03333; }
[data-theme="dark"] .badge-red { color: #ff8f8f; }
.badge-neutral { background: var(--surface-2); color: var(--muted); }

/* ---------- Iconos ---------- */
.icon-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); display: inline-block; }

/* ---------- Formularios ---------- */
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: .4rem; color: var(--text-soft); }
.input, .field input, .field textarea, .field select {
  width: 100%; padding: .8rem .95rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  transition: border var(--dur), box-shadow var(--dur);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(201,162,39,.18);
}

/* ---------- Modal (compartido: landing y admin) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  padding: 1.2rem; background: rgba(5,16,19,.7); backdrop-filter: blur(6px);
}
.modal.open { display: flex; animation: fadeIn .25s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal-box { background: var(--surface); border-radius: var(--radius); max-width: 900px; width: 100%; max-height: 92vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(8,32,36,.6); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); cursor: pointer; }
.modal-close svg { width: 20px; height: 20px; }

/* ---------- Rev/scrollbar ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--petro-700); border-radius: 20px; }
::-webkit-scrollbar-track { background: var(--bg-2); }

/* ---------- Animaciones de aparición ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Utilidades ---------- */
.hide { display: none !important; }
.muted { color: var(--muted); }
.gold-text { color: var(--gold-500); }
[data-theme="light"] .gold-text { color: var(--gold-600); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Responsive base ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .section { padding: 60px 0; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
