/* =========================================================
   La Variable · Coworking Granada — estilos
   ========================================================= */
:root {
  --negro: #000;
  --gris-oscuro: #2c2c2c;
  --gris-texto: #646464;
  --gris-claro: #f4f4f4;
  --blanco: #fff;
  --azul: #066aab;
  --estrella: #f6bb06;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --ui: "Rubik", var(--sans);
  --max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); }
h1, h2 { font-family: var(--serif); line-height: 1.25; margin: 0 0 .6em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 8px 12px; z-index: 1000; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Cabecera ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 24px 40px;
}
.logo img { width: 96px; height: 96px; }
.btn-outline {
  font-family: var(--ui); font-weight: 600; font-size: 15px;
  letter-spacing: 1.9px; text-transform: uppercase; text-decoration: none;
  color: #000; background: rgba(255,255,255,.85);
  border: 1px solid #000; padding: 12px 24px; transition: background .2s, color .2s;
}
.btn-outline:hover { background: #000; color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  background: #2a2a2a url("/wp-content/uploads/2017/03/27Sep2016_0029-scaled.jpg") center/cover no-repeat;
  color: #fff; text-align: center;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.38); }
.hero__inner { position: relative; max-width: 640px; padding: 140px 24px 80px; }
.hero__title {
  font-size: clamp(20px, 2.4vw, 26px); font-weight: 300; line-height: 1.55;
  text-shadow: 0 1px 8px rgba(0,0,0,.35); margin: 0;
}

/* ---------- Intro ---------- */
.intro { text-align: center; padding-top: 64px; padding-bottom: 24px; max-width: 820px; }
.intro h2 { font-size: clamp(26px, 3vw, 32px); font-weight: 600; color: var(--gris-texto); }
.intro p { font-family: var(--serif); color: #7a7a7a; font-size: 17px; margin: 0; }

/* ---------- Reseñas ---------- */
.reviews { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: center; padding-top: 32px; padding-bottom: 48px; }
.reviews__summary { text-align: center; }
.reviews__summary p { margin: 2px 0 8px; font-size: 14px; }
.reviews__label { font-family: var(--ui); font-size: 20px; letter-spacing: .5px; }
.google-logo { margin: 0 auto; }
.stars { color: var(--estrella); font-size: 30px; letter-spacing: 2px; line-height: 1.2; }
.stars.small { font-size: 16px; letter-spacing: 1px; }
.reviews__slider { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
.reviews__track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: none; padding: 4px; flex: 1; min-width: 0;
}
.reviews__track::-webkit-scrollbar { display: none; }
.review {
  flex: 0 0 calc((100% - 32px) / 3); scroll-snap-align: start;
  background: var(--gris-claro); border-radius: 8px; padding: 18px; font-family: var(--ui); font-size: 14px;
}
.review header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review header strong { display: block; font-size: 14px; }
.review time { font-size: 12px; color: #888; }
.review p { margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.review.is-open p { -webkit-line-clamp: unset; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #1f6f5c; color: #fff;
  display: grid; place-items: center; font-weight: 600; flex: none;
}
.reviews__nav {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ddd;
  background: #fff; cursor: pointer; font-size: 22px; line-height: 1; color: #555;
}
.reviews__nav:hover { background: #f0f0f0; }
.reviews__more { grid-column: 1 / -1; text-align: right; font-family: var(--ui); font-size: 14px; margin: 0; }
.reviews__more a { color: #333; }

/* ---------- Bloques espacios ---------- */
.spaces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spaces__row { display: grid; grid-template-columns: 45.6% minmax(0, 1fr); height: 300px; }
.spaces img { width: 100%; height: 300px; object-fit: cover; }
.spaces__text { background: #000; color: #fff; padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.spaces__text h2 { font-size: 26px; font-weight: 600; margin-bottom: .5em; }
.spaces__text p { font-family: var(--serif); margin: 0; font-size: 15px; }

/* ---------- Servicios ---------- */
.services { text-align: center; padding-top: 72px; padding-bottom: 72px; }
.services h2 { font-size: clamp(26px, 3vw, 32px); font-weight: 300; color: var(--gris-oscuro); }
.tabs { display: inline-flex; gap: 8px; margin: 12px 0 24px; border-bottom: 1px solid #e5e5e5; }
.tab {
  font: inherit; font-size: 16px; background: none; border: 0; cursor: pointer;
  padding: 12px 22px; color: #555; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tab.is-active { color: #111; border-bottom-color: #111; }
.tab-panel ul { list-style: none; padding: 0; margin: 0; font-family: var(--serif); color: #555; font-size: 17px; }
.tab-panel li { padding: 6px 0; }
.tab-panel strong { font-weight: 400; color: #222; }

/* ---------- Galería ---------- */
.gallery { background: #000; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 10px; }
.gallery a { display: block; overflow: hidden; aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, opacity .3s; }
.gallery a:hover img { transform: scale(1.05); opacity: .9; }

/* ---------- Contacto ---------- */
.contact { text-align: center; padding-top: 64px; padding-bottom: 24px; max-width: 680px; }
.contact h2 { font-size: clamp(26px, 3vw, 32px); font-weight: 300; color: var(--gris-oscuro); }
.contact-form { display: grid; gap: 14px; text-align: left; margin-top: 24px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 14px;
  border: 1px solid #ccc; border-radius: 3px; background: #fff; color: #333;
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--azul); outline-offset: 0; border-color: var(--azul); }
.contact-form .is-invalid { border-color: #c0392b; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: #555; }
.check input { margin-top: 4px; }
.btn-primary {
  justify-self: start; font: inherit; font-size: 17px; font-weight: 500; color: #fff;
  background: var(--azul); border: 0; border-radius: 4px; padding: 10px 26px; cursor: pointer;
}
.btn-primary:hover { background: #055a91; }
.btn-primary[disabled] { opacity: .6; cursor: wait; }
.form-status { margin: 0; min-height: 1.5em; font-size: 15px; }
.form-status.ok { color: #1e7d3a; }
.form-status.error { color: #c0392b; }
.phone { font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); font-weight: 300; color: var(--gris-oscuro); margin: 40px 0 4px; }
.phone a { color: inherit; text-decoration: none; }
.address { font-size: 14px; color: #777; margin: 0; }
.address a { color: inherit; }

.mention { text-align: center; padding-top: 32px; padding-bottom: 40px; font-size: 14px; color: #555; }
.mention a { color: #c2185b; }

/* ---------- Pie ---------- */
.site-footer {
  background: #000; color: #fff; display: flex; justify-content: space-between; align-items: center;
  padding: 22px 40px; font-family: var(--ui); font-size: 14px;
}
.site-footer p { margin: 0; }
.social { display: flex; gap: 8px; }
.social a { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: #333; border-radius: 4px; }
.social a:hover { background: #555; }

/* ---------- WhatsApp ---------- */
.whatsapp {
  position: fixed; right: 24px; bottom: 24px; z-index: 50;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366;
  display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); transition: transform .2s;
}
.whatsapp:hover { transform: scale(1.08); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 90vw; max-height: 88vh; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-size: 44px; line-height: 1; padding: 12px 18px; opacity: .8;
}
.lightbox button:hover { opacity: 1; }
.lightbox__close { top: 8px; right: 12px; }
.lightbox__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .spaces { grid-template-columns: minmax(0, 1fr); }
  .review { flex-basis: calc((100% - 16px) / 2); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .site-header { padding: 16px 20px; }
  .logo img { width: 72px; height: 72px; }
  .btn-outline { font-size: 13px; padding: 10px 16px; }
  .reviews { grid-template-columns: minmax(0, 1fr); }
  .review { flex-basis: 100%; }
  .reviews__more { text-align: center; }
  .spaces__row { grid-template-columns: minmax(0, 1fr); height: auto; }
  .spaces__col { display: flex; flex-direction: column; }
  .spaces__col:last-child .spaces__row img { order: 2; }
  .spaces__text { padding: 40px 28px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 6px; }
  .site-footer { flex-direction: column; gap: 12px; text-align: center; padding: 22px 20px; }
  .whatsapp { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
