:root {
  --navy: #0b1f3a;
  --navy-2: #13305a;
  --navy-3: #1d4278;
  --gold: #c9a45c;
  --gold-2: #b38a3e;
  --sand: #f6f1e7;
  --ink: #1c2433;
  --muted: #5d6779;
  --line: #e4e7ee;
  --bg: #ffffff;
  --bg-alt: #f7f8fb;
  --ok: #1f8a5b;
  --warn: #b7791f;
  --error: #c0392b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 31, 58, .08);
  --shadow-lg: 0 20px 50px rgba(11, 31, 58, .16);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::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.6; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-3); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-2); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--navy); margin: 0 0 .6em; }
h1 { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3, .h3 { font-size: 1.2rem; font-family: var(--sans); font-weight: 700; }
.h4 { font-size: 1.05rem; font-family: var(--sans); }
p { margin: 0 0 1em; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--navy); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--gold-2); margin-bottom: .6em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 760px; }
.lead p { margin-bottom: .7em; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.4em; border-radius: 999px; border: 1px solid transparent; font: 600 .98rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #d6b46f; color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--navy); }
.btn-wa { background: #25d366; color: #073b1d; }
.btn-wa:hover { color: #073b1d; }
.btn-sm { padding: .6em 1em; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.link-arrow { font-weight: 600; text-decoration: none; color: var(--navy-3); }
.link-arrow::after { content: " →"; }

/* Encabezado */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: var(--gold); font: 700 1rem var(--serif); letter-spacing: .02em; }
.brand-text { font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; }
.brand-text strong { font-weight: 700; }
.brand-light, .brand-light:hover { color: #fff; }
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.main-nav a:not(.btn):hover { color: var(--gold-2); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: .2s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav { position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 18px; transform: translateY(-120%); transition: transform .25s; box-shadow: var(--shadow); }
  .main-nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .main-nav .btn { margin-top: 14px; }
  .nav-open .main-nav { transform: none; }
}

/* Migas */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0 0; margin: 0; font-size: .88rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: #aab1bf; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold-2); }

/* Hero */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--navy); }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(11, 31, 58, .96) 25%, rgba(11, 31, 58, .55)); }
.hero-inner { position: relative; padding: clamp(64px, 10vw, 120px) 0 clamp(48px, 8vw, 90px); }
.hero h1 { color: #fff; max-width: 820px; }
.hero .lead { color: #d5dcea; }
.hero .eyebrow { color: var(--gold); }
.search-box { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; background: #fff; padding: 8px; border-radius: 18px; box-shadow: var(--shadow-lg); max-width: 900px; margin-top: 28px; }
.search-box input, .search-box select { border: 0; background: var(--bg-alt); border-radius: 12px; padding: 14px 16px; font: inherit; color: var(--ink); min-width: 0; }
.search-box-inline { grid-template-columns: 1fr auto; margin: 24px 0; }
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 28px; padding: 0; margin: 30px 0 0; color: #c7d0e0; }
.hero-stats strong { color: var(--gold); font: 700 1.6rem var(--serif); margin-right: 6px; }
@media (max-width: 760px) { .search-box { grid-template-columns: 1fr; } }

/* Secciones */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--bg-alt); }
.section-tight { padding: 12px 0 40px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { margin: 0; }
.page-head { padding: 28px 0 22px; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }

/* Rejillas y tarjetas */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 10px rgba(11, 31, 58, .04); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10.5; background: var(--sand); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-noimg { display: grid; place-items: center; height: 100%; color: var(--muted); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; display: block; }
.card-title { font-size: 1.15rem; margin: 2px 0 4px; font-weight: 700; color: var(--navy); display: block; line-height: 1.3; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.dev-card, .post-card { position: relative; }
.card-price { font: 700 1.2rem var(--serif); color: var(--navy); margin: 4px 0; }
.card-price small { font: 500 .78rem var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card-meta { list-style: none; padding: 0; margin: auto 0 0; font-size: .88rem; color: var(--muted); }
.card-text { color: var(--muted); font-size: .95rem; margin: 6px 0 0; }
.card-meta-line { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.badge { position: absolute; top: 14px; left: 14px; background: var(--navy); color: #fff; font-size: .75rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; letter-spacing: .02em; }
.dev-header .badge { position: static; display: inline-block; margin-bottom: 12px; }
.badge-preventa { background: var(--gold); color: var(--navy); }
.badge-en-construccion { background: var(--navy-3); }
.badge-entrega-inmediata { background: var(--ok); }

.prov-card { padding: 20px; }
.prov-card:hover { transform: translateY(-3px); }
.prov-head { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.prov-head::after { content: ""; position: absolute; inset: 0; }
.prov-card { position: relative; }
.prov-head img, .prov-initial { width: 64px; height: 64px; border-radius: 12px; object-fit: contain; background: var(--bg-alt); border: 1px solid var(--line); flex: none; }
.prov-initial { display: grid; place-items: center; font: 700 1.6rem var(--serif); color: var(--gold-2); }

.city-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.city-chip { display: flex; flex-direction: column; padding: 18px 20px; background: #fff; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--navy); font-weight: 600; transition: .2s; }
.city-chip small { color: var(--muted); font-weight: 400; }
.city-chip:hover { border-color: var(--gold); box-shadow: var(--shadow); color: var(--navy); }

.intl-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--radius); text-decoration: none; color: #fff; background: linear-gradient(150deg, var(--navy), var(--navy-3)); min-height: 170px; transition: .2s; }
.intl-card:hover { color: #fff; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.intl-card small { color: #c9d3e6; }
.intl-flag { font-size: 1.9rem; }
.intl-name { font: 700 1.2rem var(--serif); }
.intl-count { color: var(--gold) !important; font-weight: 600; }
.intl-card-lg { min-height: 200px; }
.link-card { padding: 22px; gap: 6px; text-decoration: none; color: inherit; }

.chip-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); color: var(--navy); text-decoration: none; font-size: .92rem; font-weight: 500; }
.chip small { color: var(--muted); }
a.chip:hover, .chip-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-active small, a.chip:hover small { color: #c9d3e6; }

.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px 38px; border-radius: 20px; background: var(--sand); margin-top: 24px; }
.cta-band h2 { margin-bottom: .3em; font-size: 1.6rem; }
.cta-band p { margin: 0; color: var(--muted); }
.cta-dark { background: var(--navy); }
.cta-dark h2 { color: #fff; }
.cta-dark p { color: #c9d3e6; }
@media (max-width: 700px) { .cta-band { flex-direction: column; align-items: flex-start; padding: 26px; } }

/* Carrusel de asesores */
.advisors { overflow: hidden; }
.marquee { overflow: hidden; padding: 10px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee + .marquee { margin-top: 6px; }
.marquee-track { display: flex; gap: 18px; width: max-content; animation: marquee var(--speed, 40s) linear infinite; }
.marquee-rev .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 9px)); } }
.adv-card { flex: none; width: 190px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 20px 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--navy); transition: transform .2s, box-shadow .2s, border-color .2s; }
.adv-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); color: var(--navy); }
.adv-card img, .adv-initial { width: 112px; height: 112px; border-radius: 50%; object-fit: contain; padding: 6px; background: #fff; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--gold); }
.adv-initial { display: grid; place-items: center; font: 700 2.4rem var(--serif); color: var(--gold-2); }
.adv-name { font-weight: 700; font-size: 1rem; line-height: 1.25; margin-top: 8px; }
.adv-meta { font-size: .85rem; color: var(--muted); }
@media (max-width: 600px) { .adv-card { width: 150px; padding: 16px 10px; } .adv-card img, .adv-initial { width: 88px; height: 88px; } }
@media (prefers-reduced-motion: reduce) { .marquee { overflow-x: auto; } .marquee-track { animation: none; } }

/* Filtros */
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-items: end; padding: 18px; background: var(--bg-alt); border-radius: var(--radius); border: 1px solid var(--line); }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); }
.filters input, .filters select, .lead-form input, .lead-form textarea, .admin-form input, .admin-form select, .admin-form textarea, .login input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.result-count { color: var(--muted); margin: 20px 0 14px; font-size: .95rem; }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 32px 0 0; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--navy); }
.pagination span { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--bg-alt); border-radius: var(--radius); }

/* Ficha de desarrollo */
.dev-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 24px 0 20px; flex-wrap: wrap; }
.dev-header h1 { margin-bottom: .2em; }
.dev-location { color: var(--muted); font-size: 1.05rem; margin: 0; }
.dev-price { text-align: right; }
.dev-price small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.dev-price strong { font: 700 clamp(1.5rem, 3vw, 2rem) var(--serif); color: var(--navy); }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 10px; border-radius: 18px; overflow: hidden; }
.gallery-item { position: relative; padding: 0; border: 0; cursor: zoom-in; background: var(--sand); overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-main { grid-row: span 2; }
.gallery-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11, 31, 58, .55); color: #fff; font-weight: 700; font-size: 1.1rem; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 120px 120px; }
  .gallery-main { grid-column: span 2; grid-row: auto; }
  .gallery-item:nth-child(n+6) { display: none; }
}
.dev-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; margin-top: 34px; }
.dev-main section { margin-bottom: 36px; }
.dev-aside { position: sticky; top: 90px; align-self: start; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 960px) { .dev-layout { grid-template-columns: 1fr; } .dev-aside { position: static; } }
.facts { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.facts li { padding: 14px 16px; background: var(--bg-alt); border-radius: 12px; display: flex; flex-direction: column; }
.facts span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts strong { color: var(--navy); }
.rich { font-size: 1.03rem; }
.rich h2 { margin-top: 1.4em; }
.rich h3 { margin-top: 1.2em; }
.rich img { border-radius: 12px; margin: 1em 0; }
.rich blockquote { border-left: 3px solid var(--gold); margin: 1.2em 0; padding: .2em 1.2em; color: var(--muted); }
.units { display: grid; gap: 14px; }
.unit { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); align-items: center; }
.unit img { border-radius: 10px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.unit h3 { margin-bottom: .3em; }
.unit ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); }
.unit-price { color: var(--navy) !important; font-weight: 700; }
@media (max-width: 560px) { .unit { grid-template-columns: 1fr; } }
.amenities { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.amenities li { padding: 10px 14px 10px 36px; position: relative; background: var(--bg-alt); border-radius: 10px; }
.amenities li::before { content: "✓"; position: absolute; left: 14px; color: var(--gold-2); font-weight: 700; }
.map { width: 100%; height: 340px; border: 0; border-radius: var(--radius); }

.lead-form { display: flex; flex-direction: column; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.lead-form label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.lead-form .check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.lead-form .check input { width: auto; margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 0 0 12px; }
.alert-ok { background: #e6f5ee; color: var(--ok); }
.alert-error { background: #fdecea; color: var(--error); }
.alert-warn { background: #fdf3e1; color: var(--warn); margin-top: 12px; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: 1.05rem; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Proveedores */
.prov-hero { display: flex; gap: 26px; align-items: center; padding: 26px 0; flex-wrap: wrap; }
.prov-logo { width: 120px; height: 120px; border-radius: 18px; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 8px; }
.prov-hero h1 { margin-bottom: .2em; }
.photo-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px; margin-bottom: 30px; }
.photo-strip img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: 12px; scroll-snap-align: start; }
.prov-page section { margin-bottom: 34px; }
.service-card .card-media { aspect-ratio: 16 / 10; }

/* Blog */
.post { max-width: 820px; padding-bottom: 40px; }
.post-head { padding: 26px 0 10px; }
.post-date { color: var(--muted); }
.post-cover { border-radius: 18px; margin-bottom: 30px; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.post-body { font-size: 1.08rem; line-height: 1.75; }

.contact { display: grid; grid-template-columns: 1fr 420px; gap: 40px; padding: 30px 0 60px; align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.notfound { text-align: center; padding: 70px 0; }
.notfound .lead { margin-inline: auto; }
.notfound .search-box { margin-inline: auto; max-width: 520px; }
.notfound .chip-list { justify-content: center; }

/* Pie */
.site-footer { background: var(--navy); color: #c9d3e6; margin-top: 40px; padding: 60px 0 0; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 30px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: #c9d3e6; text-decoration: none; }
.footer-grid a:hover { color: var(--gold); }
.footer-title { font: 600 .85rem var(--sans); color: #fff; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.footer-brand p { margin-top: 14px; }
.ally a { color: var(--gold) !important; font-weight: 600; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding: 20px 0 28px; font-size: .85rem; }
.footer-bottom a { color: var(--gold); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: span 2; } }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 10px 30px rgba(37, 211, 102, .45); transition: transform .2s; }
.wa-float:hover { transform: scale(1.07); color: #fff; }

/* Visor de fotos */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(5, 12, 24, .94); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 8px; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-count { position: absolute; bottom: 20px; color: #c9d3e6; font-size: .9rem; }

/* Animación al hacer scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } * { scroll-behavior: auto !important; } }

/* Panel de administración */
.admin { background: var(--bg-alt); }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 20px; background: var(--navy); }
.admin-bar nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.admin-bar nav a, .admin-bar nav button { color: #c9d3e6; text-decoration: none; padding: 8px 12px; border-radius: 8px; font: 500 .92rem var(--sans); background: none; border: 0; cursor: pointer; }
.admin-bar nav a.on, .admin-bar nav a:hover, .admin-bar nav button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.admin-bar form { margin: 0; }
.admin-main { padding: 28px 0 80px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.8rem; margin: 0; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 14px; }
.admin-form .muted { font-weight: 400; }
.admin-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
@media (max-width: 960px) { .admin-cols { grid-template-columns: 1fr; } }
.narrow { max-width: 640px; }
.editor { min-height: 420px; background: #fff; font-size: 1.02rem; }
.admin-thumb { border-radius: 10px; margin-top: 8px; max-height: 160px; object-fit: cover; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .93rem; }
.admin-table th { background: var(--bg-alt); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.admin-table .actions { display: flex; gap: 12px; align-items: center; }
.admin-table form { margin: 0; }
.admin-table tr.unread td { background: #fffaf0; font-weight: 600; }
@media (max-width: 760px) { .admin-table { display: block; overflow-x: auto; } }
.pill { padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.pill-publicado { background: #e6f5ee; color: var(--ok); }
.pill-borrador { background: #eef1f6; color: var(--muted); }
.link-danger { background: none; border: 0; color: var(--error); cursor: pointer; font: inherit; padding: 0; }
.link-row { display: grid; grid-template-columns: 1.3fr .8fr 1.5fr 1.6fr; gap: 8px; border: 0; padding: 0; margin: 0 0 8px; }
@media (max-width: 760px) { .link-row { grid-template-columns: 1fr; padding-bottom: 10px; border-bottom: 1px dashed var(--line); } }
.sticky-save { position: sticky; bottom: 16px; box-shadow: var(--shadow-lg); }
.login { max-width: 420px; margin: 10vh auto; }
.login h1 { font-size: 1.6rem; }
.login label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; margin-bottom: 16px; }
.upload input { padding: 8px; background: var(--bg-alt); }
