/* ============================================================
   GPWEB VirtualProperty — Public site stylesheet
   Design tokens, layout, components. WCAG 2.2, dark mode, responsive
   ============================================================ */

:root {
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e5e7eb;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-soft: #eff6ff;
  --accent: #0f766e;
  --whatsapp: #16a34a;
  --whatsapp-hover: #15803d;
  --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1180px;
  --header-h: 66px;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-alt: #0f172a;
  --surface: #111a2e;
  --surface-2: #1a2440;
  --border: #283350;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-soft: #16233f;
  --accent: #2dd4bf;
  --whatsapp: #22c55e;
  --whatsapp-hover: #16a34a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 4px 16px rgba(0, 0, 0, .45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, h5 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }

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

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

.skip-link {
  position: absolute; top: -60px; left: 16px; z-index: 200;
  background: var(--primary); color: #fff; padding: 10px 16px;
  border-radius: 0 0 8px 8px; transition: top .2s;
}
.skip-link:focus { top: 0; }

.muted { color: var(--text-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  font-size: .95rem; font-weight: 600; line-height: 1.2;
  transition: transform .12s ease, background .18s, color .18s, border-color .18s, box-shadow .18s;
  text-align: center;
}
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; box-shadow: var(--shadow); }

.btn-outline { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost { color: var(--primary); background: transparent; }
.btn-ghost:hover { background: var(--primary-soft); }

.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: var(--whatsapp-hover); color: #fff; box-shadow: var(--shadow); }

.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text-2); padding: 8px 12px; font-size: .9rem; font-weight: 600;
  transition: border-color .18s, color .18s, background .18s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand-mark { color: var(--primary); }
.brand-logo { width: 38px; height: 38px; flex: none; border-radius: 10px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-tag { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }

.main-nav { display: flex; gap: 4px; }
.nav-link { padding: 8px 14px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: .95rem; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active { color: var(--primary); background: var(--primary-soft); }

.header-actions { display: flex; gap: 8px; align-items: center; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, var(--primary-soft), transparent 60%),
    radial-gradient(700px 380px at 8% 110%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    var(--bg);
  padding: 72px 0 84px;
}
.hero-inner { text-align: center; }
.hero-title { font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 820px; margin: 0 auto .6rem; }
.hero-sub { color: var(--text-2); max-width: 620px; margin: 0 auto 34px; font-size: 1.06rem; }

.hero-search {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  padding: 12px; border-radius: 16px; box-shadow: var(--shadow-lg);
  max-width: 860px; margin: 0 auto;
}
.search-field { flex: 1 1 150px; min-width: 150px; }
.search-field input, .search-field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: .95rem; font-family: inherit;
}
.search-field input:focus, .search-field select:focus { outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.btn-search { padding: 12px 28px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
.link-more { font-weight: 600; }

/* ---------- Cards ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }

.badge {
  position: absolute; top: 10px; left: 10px; display: inline-block;
  padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  text-transform: capitalize; color: #fff; letter-spacing: .02em;
}
.badge-op { background: var(--primary); }
.badge-featured { left: auto; right: 10px; background: #d97706; }
.badge-sold { top: auto; bottom: 10px; left: 10px; background: rgba(15,23,42,.75); backdrop-filter: blur(4px); }
.badge-type { background: var(--accent); position: static; }
.badge-ghost { background: var(--surface-2); color: var(--text-2); position: static; }

.card-body { padding: 16px 18px 18px; }
.card-price { font-size: 1.22rem; font-weight: 800; color: var(--primary); }
.card-title { font-size: 1.05rem; margin: 4px 0 2px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }
.card-loc { display: flex; align-items: center; gap: 5px; color: var(--text-3); font-size: .88rem; margin: 4px 0 10px; }
.card-meta { display: flex; gap: 14px; color: var(--text-2); font-size: .85rem; border-top: 1px solid var(--border); padding-top: 10px; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- City chips ---------- */
.city-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.city-chip {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 20px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); transition: border-color .18s, transform .18s, box-shadow .18s;
}
.city-chip:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.city-chip-name { font-weight: 700; color: var(--text); }
.city-chip-count { color: var(--text-3); font-size: .85rem; }

/* ---------- CTA strip ---------- */
.cta-strip { background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent))); }
.cta-inner { text-align: center; color: #fff; }
.cta-title { font-size: clamp(1.5rem, 3vw, 2.1rem); color: #fff; }
.cta-sub { opacity: .9; margin-bottom: 22px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-strip .btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }
.cta-strip .btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Page hero / breadcrumbs ---------- */
.page-hero { padding: 40px 0 10px; }
.page-title { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.breadcrumbs { font-size: .88rem; margin: 10px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; flex-wrap: wrap; }
.breadcrumbs li::before { content: '/'; margin-right: 8px; color: var(--text-3); }
.breadcrumbs li:first-child::before { content: ''; margin: 0; }
.breadcrumbs a { color: var(--text-2); }
.breadcrumbs [aria-current] { color: var(--text-3); }

/* ---------- Listing layout ---------- */
.listing-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }

.filters { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.filter-group { margin-bottom: 14px; }
.filter-group label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: 5px; color: var(--text-2); }
.filter-group input, .filter-group select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font-size: .9rem; font-family: inherit;
}
.filter-group input:focus, .filter-group select:focus { outline: 3px solid var(--primary); border-color: var(--primary); }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 4px; }

.listing-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.result-count { font-weight: 600; color: var(--text-2); margin: 0; }
.sort-wrap { position: relative; display: flex; align-items: center; gap: 10px; }
.sort-wrap select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-family: inherit; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.page-link {
  min-width: 40px; padding: 9px 12px; text-align: center; border-radius: 9px;
  border: 1px solid var(--border); color: var(--text-2); font-weight: 600;
}
.page-link.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }

.empty-state { grid-column: 1 / -1; text-align: center; color: var(--text-3); padding: 40px; }

/* ---------- Property detail ---------- */
.prop-detail .container { max-width: 1240px; }
.prop-header { margin: 18px 0 24px; }
.prop-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.prop-title { font-size: clamp(1.5rem, 3vw, 2.2rem); max-width: 760px; }
.prop-location { display: flex; align-items: center; gap: 6px; color: var(--text-2); margin: 8px 0; }
.prop-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.prop-price { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--primary); margin-top: 12px; }

/* Gallery */
.gallery { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface-2); }
.gallery-main { aspect-ratio: 16 / 9; background: var(--surface-2); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-prev, .gallery-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(15,23,42,.55); color: #fff; font-size: 1.5rem; line-height: 1;
  backdrop-filter: blur(6px); transition: background .18s;
}
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }
.gallery-prev:hover, .gallery-next:hover { background: rgba(15,23,42,.85); }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: var(--bg); }
.thumb { flex: 0 0 96px; height: 68px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--primary); }
.thumb:focus-visible { outline: 3px solid var(--primary); }

/* Layout */
.prop-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; margin-top: 28px; align-items: start; }
.prop-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.prop-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--header-h) + 16px); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.panel-title { font-size: 1.15rem; margin-bottom: 14px; }
.rich-text { color: var(--text-2); }
.rich-text p { margin: 0 0 12px; }
.rich-text ul, .rich-text ol { padding-left: 20px; }

.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.spec { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.spec dt { font-size: .78rem; color: var(--text-3); font-weight: 600; }
.spec dd { margin: 2px 0 0; font-weight: 700; font-size: 1.02rem; }

.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border-radius: 999px; padding: 6px 13px;
  font-size: .88rem; color: var(--text-2);
}
.chip svg { color: var(--primary); flex: none; }

.strength-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.strength-list li { display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); }
.strength-list svg { color: #d97706; flex: none; margin-top: 3px; }

.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.map-wrap { position: relative; }
.map { height: 340px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.map-cta {
  position: absolute; right: 12px; bottom: 12px; background: var(--primary); color: #fff;
  padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: .85rem; box-shadow: var(--shadow);
}
.map-cta:hover { background: var(--primary-hover); color: #fff; }

/* Agent + contact cards */
.agent-card { text-align: center; }
.agent-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; border: 3px solid var(--primary-soft); }
.agent-photo-placeholder { display: flex; align-items: center; justify-content: center; color: var(--text-3); background: var(--surface-2); }
.agent-name { margin-bottom: 2px; }
.agent-role { margin: 0 0 10px; font-size: .9rem; }
.agent-bio { font-size: .88rem; color: var(--text-2); margin-bottom: 14px; }
.agent-actions { display: grid; gap: 8px; }
.agent-actions .btn { justify-content: center; }

.contact-form { display: grid; gap: 12px; }
.form-field label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 5px; color: var(--text-2); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); font-size: .95rem; font-family: inherit;
}
.form-field textarea { resize: vertical; min-height: 90px; }
.form-field input:focus, .form-field textarea:focus { outline: 3px solid var(--primary); border-color: var(--primary); }
.form-error { color: var(--danger); font-size: .88rem; margin: 0; min-height: 0; }
.form-success { color: #16a34a; font-size: .92rem; font-weight: 600; margin: 0; }

/* ---------- Contact page ---------- */
.contact-layout { display: grid; grid-template-columns: 380px 1fr; gap: 32px; align-items: start; }
.agent-summary { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.agent-summary .agent-photo { width: 64px; height: 64px; margin: 0; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-list a { color: var(--text-2); font-weight: 600; }
.contact-list a:hover { color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 48px 20px 28px; }
.footer-title { font-size: .95rem; margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a, .footer-address a { color: var(--text-2); }
.footer-links a:hover, .footer-address a:hover { color: var(--primary); }
.footer-address p { margin: 0 0 6px; color: var(--text-2); font-style: normal; }
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a { color: var(--text-3); }
.social-row a:hover { color: var(--primary); }
.footer-bottom { padding: 16px 20px 28px; border-top: 1px solid var(--border); }
.footer-bottom p { margin: 0; font-size: .85rem; }

/* ---------- Error ---------- */
.center-col { text-align: center; padding: 60px 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.error-code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 900; color: var(--primary-soft); line-height: 1; }
[data-theme="dark"] .error-code { color: #1e2b4f; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .listing-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .prop-grid { grid-template-columns: 1fr; }
  .prop-side { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hero { padding: 48px 0 56px; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 10px 16px; display: none; box-shadow: var(--shadow-lg);
  }
  .main-nav.is-open { display: flex; }
  .menu-toggle { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; }
  .search-field { width: 100%; flex: none; }
  .btn-search { width: 100%; }
  .gallery-thumbs { display: none; }
  .section { padding: 40px 0; }
  .listing-toolbar { flex-direction: column; align-items: stretch; }
}

/* ---------- Share popover ---------- */
.share-popover {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 8px; min-width: 220px;
  display: none; flex-direction: column; gap: 2px;
}
.share-popover.is-open { display: flex; animation: fadeUp .18s ease both; }
.share-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 8px; color: var(--text); font-size: .9rem; font-weight: 600;
}
.share-item:hover { background: var(--surface-2); color: var(--text); }
.share-ico { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); }
.share-whatsapp { background: #25d366; color: #fff; border-radius: 7px; }
.share-facebook { background: #1877f2; }
.share-twitter { background: #000; }
.share-telegram { background: #229ed9; }
.share-linkedin { background: #0a66c2; }
.share-pinterest { background: #e60023; }
.share-mail { background: #64748b; }
.share-ico::after { content: ''; width: 13px; height: 13px; }
.share-ico { position: relative; }
.share-ico::before { content: ''; position: absolute; width: 13px; height: 13px; background: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.share-whatsapp::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a9 9 0 0 0-7.8 13.5L3 21l4.6-1.2A9 9 0 1 0 12 3Zm-4 6.2c.2-.7.8-.7 1.1-.7h.4c.2 0 .4 0 .6.5l.7 1.6c.1.2.1.4 0 .6l-.5.7c-.1.1-.1.3 0 .4.4.7 1 1.3 1.6 1.7.2.1.4.1.6 0l.7-.5c.2-.2.4-.1.6 0l1.6.7c.4.2.6.4.5.7-.1.6-.7 1.2-1.3 1.2-1 .1-2.3-.4-3.9-1.8-1.7-1.4-2.7-3-2.9-3.9-.2-.6-.3-1-.2-1.3 0-.3.1-.4.4-.7Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a9 9 0 0 0-7.8 13.5L3 21l4.6-1.2A9 9 0 1 0 12 3Zm-4 6.2c.2-.7.8-.7 1.1-.7h.4c.2 0 .4 0 .6.5l.7 1.6c.1.2.1.4 0 .6l-.5.7c-.1.1-.1.3 0 .4.4.7 1 1.3 1.6 1.7.2.1.4.1.6 0l.7-.5c.2-.2.4-.1.6 0l1.6.7c.4.2.6.4.5.7-.1.6-.7 1.2-1.3 1.2-1 .1-2.3-.4-3.9-1.8-1.7-1.4-2.7-3-2.9-3.9-.2-.6-.3-1-.2-1.3 0-.3.1-.4.4-.7Z'/%3E%3C/svg%3E"); }
.share-facebook::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 8h3V5h-3c-2.2 0-4 1.8-4 4v2H7v3h3v6h3v-6h2.5l.5-3H13V9c0-.6.4-1 1-1Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 8h3V5h-3c-2.2 0-4 1.8-4 4v2H7v3h3v6h3v-6h2.5l.5-3H13V9c0-.6.4-1 1-1Z'/%3E%3C/svg%3E"); }
.share-twitter::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.7 3h3.1l-6.8 7.8L22 21h-6.3l-4.9-6.4L5.2 21H2.1l7.3-8.3L2 3h6.4l4.4 5.9L17.7 3Zm-1.1 16h1.7L7.4 4.7H5.6L16.6 19Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.7 3h3.1l-6.8 7.8L22 21h-6.3l-4.9-6.4L5.2 21H2.1l7.3-8.3L2 3h6.4l4.4 5.9L17.7 3Zm-1.1 16h1.7L7.4 4.7H5.6L16.6 19Z'/%3E%3C/svg%3E"); }
.share-telegram::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m20 4-3 15-6.5-4L9 18l-1.5-3.5L18 6.5 6.5 12 3.5 10.8 20 4Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m20 4-3 15-6.5-4L9 18l-1.5-3.5L18 6.5 6.5 12 3.5 10.8 20 4Z'/%3E%3C/svg%3E"); }
.share-linkedin::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 9v8M6.5 6v.01M10.5 17v-5a2.5 2.5 0 0 1 5 0v5M10.5 11v6' fill='none' stroke='currentColor' stroke-width='2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 9v8M6.5 6v.01M10.5 17v-5a2.5 2.5 0 0 1 5 0v5M10.5 11v6' fill='none' stroke='currentColor' stroke-width='2'/%3E%3C/svg%3E"); }
.share-pinterest::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a9 9 0 0 0-3.3 17.4c-.1-.8-.2-2 .1-2.9l1-4.3s-.3-.6-.3-1.4c0-1.3.8-2.3 1.7-2.3.8 0 1.2.6 1.2 1.3 0 .8-.5 2-.8 3.1-.2.9.5 1.7 1.4 1.7 1.7 0 2.9-2.2 2.9-4.7 0-2-1.3-3.4-3.6-3.4a4 4 0 0 0-4.2 4c0 .8.2 1.3.6 1.8.2.2.2.3.1.5l-.2.9c-.1.3-.3.4-.5.3-1.2-.5-1.8-1.9-1.8-3.4 0-2.5 2.1-5.5 6.2-5.5 3.3 0 5.5 2.4 5.5 4.9 0 3.3-1.9 5.8-4.7 5.8-.9 0-1.8-.5-2.1-1.1l-.6 2.3c-.2.8-.7 1.7-1.1 2.4A9 9 0 1 0 12 3Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a9 9 0 0 0-3.3 17.4c-.1-.8-.2-2 .1-2.9l1-4.3s-.3-.6-.3-1.4c0-1.3.8-2.3 1.7-2.3.8 0 1.2.6 1.2 1.3 0 .8-.5 2-.8 3.1-.2.9.5 1.7 1.4 1.7 1.7 0 2.9-2.2 2.9-4.7 0-2-1.3-3.4-3.6-3.4a4 4 0 0 0-4.2 4c0 .8.2 1.3.6 1.8.2.2.2.3.1.5l-.2.9c-.1.3-.3.4-.5.3-1.2-.5-1.8-1.9-1.8-3.4 0-2.5 2.1-5.5 6.2-5.5 3.3 0 5.5 2.4 5.5 4.9 0 3.3-1.9 5.8-4.7 5.8-.9 0-1.8-.5-2.1-1.1l-.6 2.3c-.2.8-.7 1.7-1.1 2.4A9 9 0 1 0 12 3Z'/%3E%3C/svg%3E"); }
.share-mail::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16v12H4V6Z' fill='none' stroke='currentColor' stroke-width='2'/%3E%3Cpath d='m4 7 8 6 8-6' fill='none' stroke='currentColor' stroke-width='2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16v12H4V6Z' fill='none' stroke='currentColor' stroke-width='2'/%3E%3Cpath d='m4 7 8 6 8-6' fill='none' stroke='currentColor' stroke-width='2'/%3E%3C/svg%3E"); }
.prop-actions { position: relative; }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.page-home .hero-inner { animation: fadeUp .5s ease both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* ============================================================
   GPWEB — Portada corporativa
   ============================================================ */

.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-sm { padding: 8px 15px; font-size: .86rem; }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: #f1f5f9; color: var(--primary-hover); box-shadow: var(--shadow); }

.eyebrow {
  display: inline-block; margin-bottom: 22px; padding: 6px 16px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero-gp {
  display: flex; align-items: center;
  min-height: 600px; padding: 80px 0;
}
.hero-gp-inner {
  width: 100%; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  animation: fadeUp .6s cubic-bezier(.16,.84,.44,1) both;
}
.hero-gp .hero-title {
  margin: 0 0 1.1rem; max-width: 20ch;
  font-size: clamp(1.9rem, 4.6vw, 3.35rem);
  line-height: 1.16; letter-spacing: .01em; font-weight: 800;
  text-transform: uppercase; text-wrap: balance;
}
.hero-gp .hero-sub {
  margin: 0; max-width: 62ch;
  font-size: clamp(1rem, 1.5vw, 1.16rem); line-height: 1.68; color: var(--text-2);
}
.hero-canales {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.hero-canales li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .9rem; font-weight: 600; color: var(--text-2);
  box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.16,.84,.44,1), border-color .25s, color .25s;
}
.hero-canales li:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  color: var(--text);
}
.hero-canales span { font-size: 1rem; line-height: 1; }

.hero-cta { margin-top: 30px; }

/* ---------- Encabezados de sección ---------- */
.section-head--center { display: block; text-align: center; margin-bottom: 46px; }
.section-head--center .section-title { margin: 0 auto .55rem; max-width: 720px; text-wrap: balance; }
.section-sub { color: var(--text-2); max-width: 600px; margin: 0 auto; font-size: 1.02rem; }

/* ============================================================
   Sistema de tarjetas horizontales
   Icono a la izquierda, texto a la derecha. Rejilla proporcional.
   ============================================================ */
.card-row { display: grid; gap: 20px; align-items: stretch; }
.card-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps-row { list-style: none; margin: 0; padding: 0; }

.hcard {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-start; gap: 18px;
  padding: 26px 24px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .3s cubic-bezier(.16,.84,.44,1), box-shadow .3s, border-color .3s;
}
/* Halo que sigue al cursor */
.hcard::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--primary) 11%, transparent), transparent 60%);
  transition: opacity .35s;
}
.hcard:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--border));
}
.hcard:hover::before { opacity: 1; }

/* Icono / número */
.hcard-icon, .hcard-num {
  display: grid; place-items: center; flex: none;
  width: 54px; height: 54px; border-radius: 15px;
  transition: transform .3s cubic-bezier(.16,.84,.44,1), box-shadow .3s;
}
.hcard-icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--accent) 15%, transparent));
}
.hcard-num {
  font-size: 1.2rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 30%, transparent);
}
.hcard:hover .hcard-icon { transform: scale(1.08) rotate(-5deg); box-shadow: var(--shadow); }
.hcard:hover .hcard-num { transform: scale(1.08) translateY(-2px); }

/* Texto */
.hcard-body { flex: 1; min-width: 0; }
.hcard-body h3 {
  font-size: 1.03rem; margin: 0 0 .4rem; letter-spacing: -.01em;
  line-height: 1.32; text-wrap: balance;
}
.hcard-body p { color: var(--text-2); margin: 0; font-size: .92rem; line-height: 1.62; }

/* Línea inferior animada */
.hcard-line {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform .38s cubic-bezier(.16,.84,.44,1);
}
.hcard:hover .hcard-line { transform: scaleX(1); }

/* Variante ancha (2 columnas): más aire y flecha */
.hcard--wide { padding: 28px 28px; gap: 20px; }
.hcard--wide .hcard-icon { width: 58px; height: 58px; font-size: 1.6rem; }
.hcard--wide .hcard-body h3 { font-size: 1.1rem; }
.hcard--wide .hcard-body p { font-size: .94rem; }
.hcard--wide::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  transform: scaleY(0); transform-origin: top;
  transition: transform .38s cubic-bezier(.16,.84,.44,1);
}
.hcard--wide:hover::after { transform: scaleY(1); }

.hcard-arrow {
  flex: none; align-self: center; color: var(--primary);
  font-size: 1.3rem; font-weight: 700; line-height: 1;
  opacity: 0; transform: translateX(-8px);
  transition: opacity .3s, transform .34s cubic-bezier(.16,.84,.44,1);
}
.hcard:hover .hcard-arrow { opacity: 1; transform: translateX(0); }

/* Pasos: 4 columnas estrechas → tarjeta más compacta y ancha */
.hcard--step { padding: 22px 20px; gap: 15px; }
.hcard--step .hcard-icon,
.hcard--step .hcard-num { width: 46px; height: 46px; border-radius: 13px; font-size: 1.05rem; }
.hcard--step .hcard-body h3 { font-size: .98rem; margin-bottom: .3rem; }
.hcard--step .hcard-body p { font-size: .875rem; line-height: 1.55; }

/* Pasos: círculo decorativo de fondo */
.hcard--step::after {
  content: ''; position: absolute; right: -14px; top: -20px; z-index: -1;
  width: 86px; height: 86px; border-radius: 50%;
  background: var(--primary-soft); opacity: .5;
  transition: transform .38s cubic-bezier(.16,.84,.44,1), opacity .3s;
}
.hcard--step:hover::after { transform: scale(1.3); opacity: .75; }

/* ---------- Footer ---------- */
.footer-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.footer-about .brand { margin-bottom: 14px; }
.footer-text { color: var(--text-2); font-size: .94rem; line-height: 1.68; max-width: 52ch; margin: 0 0 16px; }
.footer-address p { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 9px; }
.footer-address svg { color: var(--primary); flex: none; margin-top: 3px; }
.footer-contact .btn { margin-top: 8px; }
.footer-cta { margin-bottom: 18px; }

/* ============================================================
   Responsive: se reduce el número de columnas, nunca el formato
   ============================================================ */
@media (max-width: 1080px) {
  .card-row--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 940px) {
  .card-row--2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  /* El botón del header se oculta en móvil y tablet: no hay espacio suficiente
     junto al logo. El hero y el footer mantienen su propio botón. */
  .header-cta { display: none; }
}
@media (max-width: 700px) {
  .card-row--3, .card-row--4 { grid-template-columns: 1fr; }
  .hero-gp { min-height: 520px; padding: 60px 0; }
  .hero-cta { width: 100%; max-width: 320px; }
  .brand-logo { width: 34px; height: 34px; }
  .hcard { padding: 22px 20px; gap: 15px; }
  .hcard-icon, .hcard-num { width: 48px; height: 48px; font-size: 1.3rem; }
  .hcard-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hcard, .hcard-icon, .hcard-num, .hcard-line, .hcard-arrow,
  .hcard--wide::after, .hcard--step::after {
    transition: none !important; transform: none !important;
  }
}
