/* ==========================================================================
   Patrimonio Plus · Locales Centro Comercial Tartessus
   ========================================================================== */

:root {
  --color-primary: #4a6fa1;
  --color-primary-dark: #2c4463;
  --color-primary-darker: #1d2f45;
  --color-accent: #c97b3d;
  --color-accent-dark: #a8622c;
  --color-whatsapp: #25d366;
  --color-whatsapp-dark: #1ebe5b;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fa;
  --color-bg-dark: #1d2f45;
  --color-text: #24303d;
  --color-text-light: #5a6b7d;
  --color-text-inverse: #f5f7fa;
  --color-border: #e1e6ec;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(29, 47, 69, 0.08);
  --shadow-lg: 0 12px 32px rgba(29, 47, 69, 0.18);
  --container-width: 1180px;
  --font-heading: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--color-primary-darker);
}

p {
  margin: 0 0 1em;
}

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

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  max-width: 700px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-header h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.lead {
  font-size: 1.1rem;
  color: var(--color-text-light);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 48px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

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

.btn-whatsapp:hover {
  background: var(--color-whatsapp-dark);
}

.btn-block {
  width: 100%;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  height: 42px;
  width: auto;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary-darker);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span {
  margin: 5px 0;
}

.main-nav {
  position: fixed;
  inset: 72px 0 0 0;
  background: #fff;
  padding: 24px 20px 40px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  overflow-y: auto;
}

.main-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.main-nav ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.main-nav a:not(.btn) {
  display: block;
  padding: 14px 4px;
  text-decoration: none;
  font-weight: 600;
  color: var(--color-primary-darker);
  border-bottom: 1px solid var(--color-border);
}

.header-actions {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: linear-gradient(180deg, rgba(29, 47, 69, 0.35) 0%, rgba(29, 47, 69, 0.55) 55%, rgba(29, 47, 69, 0.9) 100%),
    url("../img/fachadas/fachada-01-conjunto-locales.jpg") center/cover no-repeat;
}

.hero-content {
  padding: 60px 0 56px;
  max-width: 760px;
}

.hero-content .eyebrow {
  color: #f0c9a2;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(2rem, 6vw, 3.4rem);
  margin-bottom: 0.3em;
}

.hero-content .subtitle {
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  color: #e6ebf1;
  margin-bottom: 1.6em;
}

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

.hero-scroll-cue {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  opacity: 0.75;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Presentación ---------- */
.presentation-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 36px;
}

.presentation-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.highlight-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.highlight-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 500;
}

.highlight-list svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--color-accent);
  margin-top: 2px;
}

/* ---------- Ubicación ---------- */
.location-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

.location-text address {
  font-style: normal;
  font-weight: 600;
  color: var(--color-primary-darker);
  margin-bottom: 1em;
}

.location-media {
  display: grid;
  gap: 16px;
}

.location-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

.map-embed iframe {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}

/* ---------- Distribución ---------- */
.distribution-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: start;
}

.plano-figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  cursor: zoom-in;
}

.plano-figure figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--color-text-light);
  text-align: center;
}

.surface-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

table.surface-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 320px;
  background: #fff;
}

table.surface-table caption {
  text-align: left;
  padding: 14px 16px 0;
  font-weight: 600;
  color: var(--color-primary-darker);
}

table.surface-table th,
table.surface-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

table.surface-table thead th {
  background: var(--color-primary-darker);
  color: #fff;
  font-weight: 600;
}

table.surface-table tbody tr:last-child {
  font-weight: 700;
  background: var(--color-bg-alt);
}

.amenity-note {
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--color-text-light);
}

/* ---------- Precios ---------- */
.pricing-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  margin-top: 36px;
}

.price-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.price-card h3 {
  font-size: 1.05rem;
  color: var(--color-text-light);
  font-weight: 600;
  margin-bottom: 6px;
}

.price-card .price {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.pricing-note {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 18px 20px;
  background: #fff8ee;
  border: 1px solid #f0dcb8;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: #6b5327;
}

.pricing-cta {
  text-align: center;
  margin-top: 32px;
}

/* ---------- Galería ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 36px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--color-bg-alt);
  aspect-ratio: 4 / 3;
  border: none;
  padding: 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* ---------- Cierre / CTA banda ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--color-primary-darker), var(--color-primary));
  color: #fff;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  max-width: 640px;
  margin: 0 auto 28px;
  color: #dfe6ee;
}

.cta-band .btn-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Contacto ---------- */
.contact-layout {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}

.contact-info {
  background: var(--color-bg-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px;
}

.contact-info h3 {
  color: #fff;
}

.contact-info .contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-weight: 500;
}

.contact-info .contact-line svg {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary-darker);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text);
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.field-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}

.field-check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}

.field-check label {
  font-weight: 400;
  color: var(--color-text);
}

.field-check a {
  color: var(--color-primary);
  font-weight: 600;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 22px;
  font-weight: 600;
  font-size: 0.92rem;
}

.form-status[data-state="ok"] {
  color: #1f8a4c;
}

.form-status[data-state="error"] {
  color: #c0392b;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-darker);
  color: #cbd6e2;
  padding: 48px 0 24px;
  font-size: 0.9rem;
}

.footer-top {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand img {
  height: 40px;
  margin-bottom: 12px;
  background: #fff;
  padding: 6px 10px;
  border-radius: 6px;
}

.footer-links h4,
.footer-legal h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  text-decoration: none;
  color: #cbd6e2;
}

.footer-links a:hover {
  color: #fff;
}

.footer-disclaimer {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #9fb0c2;
  margin-top: 24px;
  max-width: 900px;
}

.footer-bottom {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #9fb0c2;
}

.footer-bottom a {
  text-decoration: none;
  color: #9fb0c2;
}

.footer-bottom a:hover {
  color: #fff;
}

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  animation: wa-pulse 2.6s ease-in-out infinite;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45); }
  50% { box-shadow: 0 8px 26px rgba(37, 211, 102, 0.75), 0 0 0 8px rgba(37, 211, 102, 0.12); }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(13, 20, 29, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 6px;
  user-select: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 46px;
  height: 46px;
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
  width: 22px;
  height: 22px;
}

.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #cbd6e2;
  font-size: 0.85rem;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1100;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  padding: 20px;
  display: none;
}

.cookie-banner.is-visible {
  display: block;
}

.cookie-banner p {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--color-text-light);
}

.cookie-banner a {
  color: var(--color-primary);
  font-weight: 600;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-actions .btn {
  padding: 10px 18px;
  font-size: 0.86rem;
  min-height: 40px;
}

.btn-ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-ghost:hover {
  background: var(--color-bg-alt);
}

/* ---------- Legal pages ---------- */
.legal-page main {
  padding: 48px 0 80px;
}

.legal-page h1 {
  margin-bottom: 0.3em;
}

.legal-updated {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 2em;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin-top: 2em;
}

.legal-page ul {
  padding-left: 1.2em;
}

.placeholder {
  background: #fff3cd;
  border: 1px dashed #e0b04b;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  background: var(--color-primary-darker);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 2000;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   Breakpoints
   ========================================================================== */
@media (min-width: 640px) {
  .presentation-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .highlight-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    inset: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding: 0;
    background: none;
    overflow: visible;
  }

  .main-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 28px;
    margin: 0;
  }

  .main-nav a:not(.btn) {
    padding: 6px 0;
    border-bottom: none;
    font-size: 0.95rem;
  }

  .header-actions {
    display: flex;
  }

  .main-nav .header-actions-mobile {
    display: none;
  }

  .location-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .distribution-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .contact-layout {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .footer-top {
    grid-template-columns: 1.3fr 1fr 1fr;
  }

  .cookie-banner {
    left: auto;
    right: 20px;
    bottom: 20px;
    width: 380px;
  }
}

@media (min-width: 1100px) {
  .pricing-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}
