/*
Theme Name: Casa Nordés
Theme URI: https://casa-nordes.com/
Author: KPL Grupo
Author URI: https://kplgrupo.com/
Description: Tema WordPress a medida para Casa Nordés — apartamentos turísticos en Pravia, Asturias. Incluye CPT "apartamento", landing page completa y huecos preparados para integrar Lodgify o Smoobu como motor de reservas.
Version: 1.6.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: casa-nordes
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ──── VARIABLES ──── */
:root {
  --azul: #1a4f6e;
  --azul-light: #2d7da8;
  --azul-pale: #e8f4f9;
  --verde: #3d7a5e;
  --arena: #f5f0e8;
  --crema: #faf8f4;
  --texto: #1c2b22;
  --texto-suave: #5a6b62;
  --blanco: #ffffff;
  --radio: 12px;
  --radio-sm: 6px;
}

/* ──── RESET ──── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--crema);
  color: var(--texto);
  font-size: 16px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); }

/* ──── NAV ──── */
.cn-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26,79,110,0.1);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--azul);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo img { max-height: 40px; width: auto; }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--texto-suave);
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--azul); }

.btn-reservar-nav {
  background: var(--azul);
  color: white !important;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-weight: 500 !important;
  transition: background 0.2s !important;
}

.btn-reservar-nav:hover { background: var(--azul-light) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--azul);
  cursor: pointer;
}

/* ──── HERO ──── */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(160deg, #0d3347 0%, #1a4f6e 40%, #2d7da8 100%);
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(61,122,94,0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(45,125,168,0.3) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 3rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  color: white;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-text h1 em {
  font-style: italic;
  color: #9fcde8;
}

.hero-text p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 2rem;
  font-weight: 300;
  max-width: 440px;
}

.hero-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.82rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ──── MOTOR DE RESERVAS ──── */
.booking-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
}

.booking-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--azul);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.booking-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  background: var(--arena);
  border-radius: var(--radio-sm);
  padding: 4px;
}

.booking-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--texto-suave);
  transition: all 0.2s;
}

.booking-tab.active {
  background: white;
  color: var(--azul);
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.field-group { margin-bottom: 1rem; }

.field-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.field-group input,
.field-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid #e0dcd5;
  border-radius: var(--radio-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--texto);
  background: var(--crema);
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.field-group input:focus,
.field-group select:focus {
  outline: none;
  border-color: var(--azul-light);
  background: white;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.guest-selector {
  display: flex;
  align-items: center;
  border: 1.5px solid #e0dcd5;
  border-radius: var(--radio-sm);
  background: var(--crema);
  overflow: hidden;
}

.guest-btn {
  width: 44px;
  height: 42px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  color: var(--azul);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guest-btn:hover { background: var(--azul-pale); }

.guest-count {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  color: var(--texto);
}

.price-preview {
  background: var(--azul-pale);
  border-radius: var(--radio-sm);
  padding: 0.9rem 1rem;
  margin: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label { font-size: 0.85rem; color: var(--azul); }

.price-total {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--azul);
  font-family: 'Playfair Display', serif;
}

.price-nights { font-size: 0.75rem; color: var(--texto-suave); margin-top: 2px; }

.btn-check {
  width: 100%;
  padding: 0.9rem;
  background: var(--azul);
  color: white;
  border: none;
  border-radius: var(--radio-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.01em;
}

.btn-check:hover { background: var(--azul-light); }
.btn-check:active { transform: scale(0.99); }

.booking-note {
  text-align: center;
  font-size: 0.78rem;
  color: #8a9b92;
  margin-top: 0.75rem;
  font-weight: 300;
}

/* Wrapper para shortcodes de Lodgify / Smoobu */
.external-booking-engine {
  min-height: 480px;
}

.external-booking-engine iframe {
  width: 100%;
  min-height: 480px;
  border: 0;
  display: block;
}

/* Cuando el booking-card de la portada lleva un iframe externo,
   ensanchar el card y reducir el padding para que respire */
.booking-card.has-external {
  padding: 1.25rem;
  max-width: 100%;
}

.booking-card.has-external h2 { margin-bottom: 1rem; }

.booking-card.has-external .external-booking-engine { min-height: 540px; }

/* CTA debajo del Calendar para guiar al usuario al BookingTool por apartamento */
.booking-cta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0ece4;
  text-align: center;
  font-size: 0.85rem;
  color: var(--texto-suave);
}

.booking-cta a {
  color: var(--azul);
  font-weight: 500;
  text-decoration: none;
}

.booking-cta a:hover { text-decoration: underline; }

/* ──── SCROLL INDICATOR ──── */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: cn-bounce 2s ease-in-out infinite;
}

@keyframes cn-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 1.5px solid rgba(255,255,255,0.4);
  border-bottom: 1.5px solid rgba(255,255,255,0.4);
  transform: rotate(45deg);
}

/* ──── SECTION GENERIC ──── */
.section {
  padding: 5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-tag {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--verde);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  color: var(--texto);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-sub {
  color: var(--texto-suave);
  max-width: 520px;
  margin-bottom: 3rem;
  font-weight: 300;
  font-size: 1.05rem;
}

/* ──── APARTMENT CARDS ──── */
.apts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.apt-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(26,79,110,0.08);
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.apt-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,79,110,0.12);
}

.apt-card.is-reserved {
  opacity: 0.72;
  cursor: default;
  pointer-events: none;
  position: relative;
}

.apt-card.is-reserved .ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--verde);
  color: white;
  font-size: 0.72rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  z-index: 2;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.apt-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, #c8dfe9 0%, #a8c4d4 100%);
  position: relative;
}

.apt-img-placeholder {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
}

.apt-img-placeholder svg {
  width: 100%;
  height: 100%;
}

.apt-floor-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(26,79,110,0.85);
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  letter-spacing: 0.04em;
}

.apt-body { padding: 1.25rem; }

.apt-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--texto);
  margin-bottom: 0.25rem;
}

.apt-desc {
  font-size: 0.85rem;
  color: var(--texto-suave);
  margin-bottom: 1rem;
  font-weight: 300;
}

.apt-features {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.apt-feat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--texto-suave);
}

.apt-feat-icon {
  width: 16px;
  height: 16px;
  color: var(--azul);
}

.apt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #f0ece4;
}

.apt-price {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--azul);
  font-family: 'Playfair Display', serif;
}

.apt-price span {
  font-size: 0.78rem;
  color: var(--texto-suave);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
}

.btn-apt {
  padding: 0.5rem 1.1rem;
  background: var(--azul-pale);
  color: var(--azul);
  border: 1.5px solid rgba(26,79,110,0.2);
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-apt:hover {
  background: var(--azul);
  color: white;
  border-color: var(--azul);
}

/* ──── ACTIVITIES ──── */
.activities-section {
  background: var(--azul);
  padding: 5rem 3rem;
  color: white;
}

.activities-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.activities-inner .section-tag { color: #9fcde8; }
.activities-inner .section-title { color: white; }
.activities-inner .section-sub { color: rgba(255,255,255,0.65); }

.activities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.act-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: background 0.2s;
}

.act-card:hover { background: rgba(255,255,255,0.14); }

.act-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.act-name {
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: white;
}

.act-detail {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
}

/* ──── ENTORNO ──── */
.entorno-section {
  padding: 5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.entorno-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.stat-box {
  background: var(--arena);
  border-radius: var(--radio);
  padding: 1.25rem;
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--azul);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-lbl {
  font-size: 0.8rem;
  color: var(--texto-suave);
  font-weight: 300;
}

.entorno-visual {
  border-radius: 20px;
  overflow: hidden;
  height: 460px;
  background: linear-gradient(135deg, #a8d4e8, #6ab4c8, #4a9baa, #2d7a8a);
  position: relative;
  display: flex;
  align-items: flex-end;
}

.entorno-caption {
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(13,51,71,0.9), transparent);
  width: 100%;
  color: white;
}

.entorno-caption strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.entorno-caption span {
  font-size: 0.85rem;
  opacity: 0.75;
  font-weight: 300;
}

/* ──── MAP ──── */
.map-section {
  background: var(--arena);
  padding: 4rem 3rem;
  text-align: center;
}

.map-placeholder {
  max-width: 900px;
  margin: 2rem auto 0;
  height: 360px;
  background: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(26,79,110,0.1);
  color: var(--texto-suave);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.map-placeholder iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-pin-label {
  background: var(--azul);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ──── NOSOTROS ──── */
.nosotros-section {
  padding: 5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.team-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(26,79,110,0.08);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--azul-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--azul);
  flex-shrink: 0;
  overflow: hidden;
}

.team-avatar img { width: 100%; height: 100%; object-fit: cover; }

.team-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--texto);
  margin-bottom: 0.2rem;
}

.team-role {
  font-size: 0.8rem;
  color: var(--verde);
  font-weight: 500;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.team-bio {
  font-size: 0.88rem;
  color: var(--texto-suave);
  font-weight: 300;
  line-height: 1.65;
}

/* ──── FOOTER ──── */
.site-footer {
  background: var(--texto);
  color: rgba(255,255,255,0.7);
  padding: 3rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: rgba(255,255,255,0.6);
}

.footer-contact-item a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.footer-contact-item a:hover { color: white; }

.footer-section-title {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}

.footer-links a:hover { color: white; }

.footer-bottom {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

/* ──── PAGE / ARCHIVE / SINGLE ──── */
.page-content,
.entry-content {
  max-width: 800px;
  margin: 8rem auto 4rem;
  padding: 0 1.5rem;
}

.page-content h1,
.entry-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--azul);
  margin-bottom: 1.5rem;
}

.page-content h2,
.entry-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--texto);
  margin: 2rem 0 1rem;
}

.page-content p,
.entry-content p { margin-bottom: 1.2rem; }

/* ──── SINGLE APARTAMENTO ──── */

/* Breadcrumb */
.apt-breadcrumb {
  padding: 6rem 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: var(--texto-suave);
}
.apt-breadcrumb a { color: var(--texto-suave); text-decoration: none; transition: color 0.2s; }
.apt-breadcrumb a:hover { color: var(--azul); }
.apt-breadcrumb-sep { margin: 0 0.5rem; opacity: 0.5; }

/* Hero (texto, no imagen) */
.single-apartamento .apt-intro {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 3rem;
}
.single-apartamento .apt-intro-meta {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--verde);
  margin-bottom: 0.75rem;
}
.single-apartamento .apt-intro h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  color: var(--texto);
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.single-apartamento .apt-intro h1 em {
  font-style: italic;
  color: var(--azul);
}
.single-apartamento .apt-intro-sub {
  font-size: 1.15rem;
  color: var(--texto-suave);
  font-weight: 300;
  max-width: 640px;
}

/* Galería mosaico */
.apt-gallery {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 3rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 240px 240px;
  gap: 0.75rem;
}
.apt-gallery-item {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #c8dfe9 0%, #a8c4d4 100%);
}
.apt-gallery-item:first-child { grid-row: 1 / 3; }
.apt-gallery-item img,
.apt-gallery-item svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.apt-gallery-tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255,255,255,0.92);
  color: var(--azul);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Layout 2 columnas */
.apt-details {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3rem 4rem;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 4rem;
  align-items: start;
}
.apt-main { min-width: 0; }

/* Key facts */
.key-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e8e4dc;
}
.key-fact { text-align: left; }
.key-fact-icon { width: 28px; height: 28px; color: var(--azul); margin-bottom: 0.5rem; }
.key-fact-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--texto);
  line-height: 1;
}
.key-fact-lbl {
  font-size: 0.78rem;
  color: var(--texto-suave);
  margin-top: 0.2rem;
}

/* Secciones dentro */
.apt-section { margin-bottom: 3rem; }
.apt-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--texto);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.apt-section p {
  color: var(--texto-suave);
  font-weight: 300;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.apt-section p strong { color: var(--texto); font-weight: 500; }
.apt-main .entry-content > h2 { font-family: 'Playfair Display', serif; font-size: 1.7rem; font-weight: 400; color: var(--texto); margin: 2rem 0 1rem; }
.apt-main .entry-content p { color: var(--texto-suave); font-weight: 300; margin-bottom: 1rem; }
.apt-main .entry-content p strong { color: var(--texto); font-weight: 500; }

/* Equipamiento */
.equipment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 2rem;
  margin-top: 1rem;
}
.eq-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0ece4;
  font-size: 0.92rem;
  color: var(--texto);
}
.eq-item svg {
  width: 18px;
  height: 18px;
  color: var(--verde);
  flex-shrink: 0;
}

/* Sidebar */
.apt-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
}
.booking-box {
  background: white;
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid rgba(26,79,110,0.08);
  box-shadow: 0 8px 32px rgba(26,79,110,0.08);
}
.booking-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.booking-price-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--azul);
  line-height: 1;
}
.booking-price-unit { font-size: 0.9rem; color: var(--texto-suave); font-weight: 300; }
.booking-price-from { font-size: 0.78rem; color: var(--texto-suave); margin-bottom: 1.5rem; }

.host-card {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f0ece4;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.host-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--azul-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--azul);
  flex-shrink: 0;
}
.host-info { font-size: 0.85rem; }
.host-info strong { display: block; color: var(--texto); font-weight: 500; }
.host-info span { color: var(--texto-suave); font-size: 0.78rem; }

/* Caja "Reservado" para El Nido */
.reserved-box {
  background: var(--arena);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(61,122,94,0.2);
}
.reserved-box .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.reserved-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--verde);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.reserved-box p {
  font-size: 0.88rem;
  color: var(--texto-suave);
  font-weight: 300;
  line-height: 1.55;
}

/* Alrededores */
.surroundings {
  background: var(--arena);
  padding: 4rem 3rem;
  margin-top: 3rem;
}
.surroundings-inner { max-width: 1200px; margin: 0 auto; }
.surroundings h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--texto);
  margin-bottom: 0.5rem;
}
.surroundings-sub { color: var(--texto-suave); font-weight: 300; margin-bottom: 2rem; }
.distance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.dist-box {
  background: white;
  border-radius: var(--radio);
  padding: 1.25rem;
}
.dist-icon { font-size: 1.5rem; margin-bottom: 0.5rem; display: block; }
.dist-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--azul);
  line-height: 1.1;
}
.dist-lbl {
  font-size: 0.8rem;
  color: var(--texto-suave);
  font-weight: 300;
  margin-top: 0.2rem;
}

/* Otros apartamentos */
.other-apts {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 3rem;
}
.other-apts h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--texto);
  margin-bottom: 2rem;
}
.other-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.other-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(26,79,110,0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s;
  display: block;
}
.other-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26,79,110,0.12);
}
.other-img {
  height: 150px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #c8dfe9 0%, #a8c4d4 100%);
}
.other-img img,
.other-img svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.other-floor {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(26,79,110,0.85);
  color: white;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  backdrop-filter: blur(4px);
}
.other-body { padding: 1rem 1.25rem 1.25rem; }
.other-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
  color: var(--texto);
}
.other-desc { font-size: 0.82rem; color: var(--texto-suave); font-weight: 300; }
.other-price {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--azul);
  font-weight: 500;
  font-family: 'Playfair Display', serif;
}

/* Archive */
.archive-header {
  margin-top: 70px;
  padding: 5rem 3rem 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.archive-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3rem 5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* 404 */
.error-404 {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
}

.error-404 h1 {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  color: var(--azul);
  font-weight: 400;
}

.error-404 .btn-check {
  display: inline-block;
  width: auto;
  padding: 0.9rem 2rem;
  margin-top: 2rem;
  text-decoration: none;
  text-align: center;
}

/* ──── RESPONSIVE ──── */
@media (max-width: 900px) {
  .cn-nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: white;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(26,79,110,0.1);
    gap: 1rem;
  }
  .nav-toggle { display: block; }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 7rem 1.5rem 3rem;
    gap: 2rem;
  }

  .booking-card { order: -1; }

  .section { padding: 3rem 1.5rem; }

  .apts-grid { grid-template-columns: 1fr; }
  .activities-grid { grid-template-columns: repeat(2, 1fr); }
  .activities-section { padding: 3rem 1.5rem; }

  .entorno-section {
    grid-template-columns: 1fr;
    padding: 3rem 1.5rem;
    gap: 2rem;
  }

  .team-grid { grid-template-columns: 1fr; }
  .nosotros-section { padding: 3rem 1.5rem; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .site-footer { padding: 2rem 1.5rem; }
  .map-section { padding: 3rem 1.5rem; }

  .apt-details { grid-template-columns: 1fr; padding: 0 1.5rem 3rem; gap: 2rem; }
  .apt-sidebar { position: static; }
  .archive-grid { grid-template-columns: 1fr; padding: 0 1.5rem 3rem; }
  .archive-header { padding: 4rem 1.5rem 1rem; }

  .apt-breadcrumb { padding: 5rem 1.5rem 0.75rem; }
  .single-apartamento .apt-intro { padding: 0 1.5rem; margin-bottom: 2rem; }
  .apt-gallery {
    padding: 0 1.5rem;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px 200px;
    margin-bottom: 2.5rem;
  }
  .apt-gallery-item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 2; }
  .apt-gallery-item:nth-child(2) { grid-row: 2 / 3; }
  .apt-gallery-item:nth-child(3) { grid-row: 2 / 3; }
  .apt-gallery-item:nth-child(4) { grid-column: 1 / 3; grid-row: 3 / 4; }
  .apt-gallery-item:nth-child(5) { display: none; }

  .key-facts { grid-template-columns: repeat(2, 1fr); }
  .equipment { grid-template-columns: 1fr; }
  .surroundings { padding: 3rem 1.5rem; }
  .distance-grid { grid-template-columns: repeat(2, 1fr); }
  .other-apts { padding: 3rem 1.5rem; }
  .other-grid { grid-template-columns: 1fr; }
}

/* ──── MODAL ──── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,51,71,0.85);
  z-index: 200;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 520px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transition: max-width 0.2s;
}

/* Cuando se muestra la vista Smoobu, ensanchar el modal */
.modal:has(.modal-view-smoobu[style*="display: block"]),
.modal:has(.modal-view-smoobu[style*="display:block"]) {
  max-width: 760px;
}

.modal-view-smoobu .smoobu-iframe-wrap {
  margin-top: 1rem;
  background: var(--crema);
  border-radius: 8px;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--arena);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--texto-suave);
}

.modal h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--azul);
  margin-bottom: 0.5rem;
}

.modal-apt-info {
  display: flex;
  gap: 1.5rem;
  background: var(--arena);
  border-radius: var(--radio-sm);
  padding: 1rem;
  margin: 1.25rem 0;
}

.modal-apt-info div { flex: 1; text-align: center; }
.modal-apt-info .lbl { font-size: 0.75rem; color: var(--texto-suave); margin-bottom: 0.2rem; }
.modal-apt-info .val { font-weight: 500; font-size: 0.95rem; color: var(--texto); }

.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid #e0dcd5;
  border-radius: var(--radio-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--texto);
  background: var(--crema);
  margin-bottom: 0.75rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--azul-light);
  background: white;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.btn-confirmar {
  width: 100%;
  padding: 0.9rem;
  background: var(--verde);
  color: white;
  border: none;
  border-radius: var(--radio-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s;
}

.btn-confirmar:hover { background: #2d6047; }

.form-note {
  font-size: 0.78rem;
  color: var(--texto-suave);
  text-align: center;
  margin-top: 0.75rem;
  font-weight: 300;
}

/* Admin bar fix */
.admin-bar .cn-nav { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .cn-nav { top: 46px; }
}
