/* ==========================================================================
   Málaga Center — Hoja de estilos principal
   Paleta: dorado #C9A24B / negro #111111 / blanco #FFFFFF
   ========================================================================== */

:root {
  --gold: #c9a24b;
  --gold-dark: #a9843a;
  --gold-text: #8f6e2f; /* gold shade with AA contrast (4.5:1) for text on white/light backgrounds */
  --gold-light: #e6cf9a;
  --black: #111111;
  --charcoal: #1c1c1c;
  --grey: #6b6b6b;
  --grey-light: #f4f2ee;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.10);
  --shadow-lift: 0 20px 50px rgba(0, 0, 0, 0.16);
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Poppins", Arial, sans-serif;
  --booking-bar-h: 0px;
}

/* Visible focus outline for keyboard navigation (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: 2px;
}

/* Skip-to-content link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--black);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { text-decoration: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 16px; color: var(--grey); }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section--tight { padding: 48px 0; }
.section--dark { background: var(--black); color: var(--white); }
.section--dark p { color: #cfcfcf; }
.section--grey { background: var(--grey-light); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.78rem;
  color: var(--gold-text);
  font-weight: 600;
  margin-bottom: 14px;
}

.section--dark .eyebrow { color: var(--gold); }

.text-center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--black);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--outline {
  border-color: var(--gold);
  color: var(--black);
  background: transparent;
}
.btn--outline:hover { background: var(--gold); color: var(--black); }
.btn--outline-light {
  border-color: var(--gold);
  color: var(--white);
}
.btn--outline-light:hover { background: var(--gold); color: var(--black); }
.btn--full { width: 100%; justify-content: center; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 17, 17, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(201, 162, 75, 0.25);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.logo img { height: 42px; width: auto; }
.logo span { color: var(--gold); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  color: #e8e8e8;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  position: relative;
  padding: 4px 0;
}
.main-nav a:hover { color: var(--gold); }
.main-nav a.active { color: var(--gold); }

.lang-switch {
  display: flex;
  gap: 6px;
  margin-left: 8px;
}
.lang-switch a {
  font-size: 0.78rem;
  font-weight: 700;
  color: #999;
  border: 1px solid #444;
  padding: 3px 9px;
  border-radius: 4px;
}
.lang-switch a.active,
.lang-switch a:hover {
  color: var(--black);
  background: var(--gold);
  border-color: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--gold);
  display: block;
}

/* Hero */
.hero {
  --hero-img: none;
  position: relative;
  min-height: 88vh;
  min-height: 88svh; /* avoids mobile browsers (iOS Safari/Chrome) resizing the viewport on scroll and leaving gaps */
  display: flex;
  align-items: center;
  color: var(--white);
  background-color: var(--black);
  background-image: linear-gradient(180deg, rgba(17,17,17,0.6), rgba(17,17,17,0.88)), var(--hero-img);
  background-size: cover;
  background-position: center;
  text-align: center;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { color: var(--white); }
.hero .gold-rule {
  width: 70px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 22px;
}
.hero p.lead {
  max-width: 620px;
  margin: 0 auto 32px;
  color: #d8d8d8;
  font-size: 1.1rem;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero--small {
  min-height: 46vh;
  min-height: 46svh;
}

/* Floating quick-filter bar (REMS-style search card overlapping the hero) */
.search-float {
  position: relative;
  z-index: 5;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  margin-top: -46px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.search-float .sf-field {
  flex: 1;
  min-width: 160px;
  padding: 8px 22px;
  border-right: 1px solid #eee;
}
.search-float .sf-field:last-of-type { border-right: none; }
.search-float .sf-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 4px;
}
.search-float .sf-value {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--black);
}
.search-float .btn {
  margin-left: 14px;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .search-float { flex-direction: column; align-items: stretch; margin-top: 20px; }
  .search-float .sf-field { border-right: none; border-bottom: 1px solid #eee; padding: 12px 6px; }
  .search-float .btn { margin: 14px 0 0; }
}

/* Grid / cards */
.grid {
  display: grid;
  gap: 32px;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #eee;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lift); }

.card-img {
  aspect-ratio: 3/2;
  background: linear-gradient(135deg, #2a2a2a, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  font-size: 0.85rem;
  text-align: center;
  padding: 10px;
  position: relative;
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }

.rating-chip {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.95);
  color: var(--black);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  z-index: 2;
}
.rating-chip .star { color: var(--gold-dark); }

.card-body { padding: 24px; }
.card-body .tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-text);
  font-weight: 700;
  margin-bottom: 8px;
}
.card-body h3 { margin-bottom: 6px; }

.stat-icons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
  margin: 14px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.stat-icons .stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--black);
  font-weight: 500;
}
.stat-icons .stat .ic {
  font-size: 1rem;
}

.card-body .meta {
  display: flex;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--grey);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* Feature list */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}
.feature-list li {
  padding-left: 26px;
  position: relative;
  font-size: 0.95rem;
  color: var(--black);
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold-dark);
  font-weight: 700;
}

/* Amenity chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--grey-light);
  border: 1px solid #e5e0d6;
  color: var(--black);
  padding: 8px 16px;
  border-radius: 40px;
  font-size: 0.85rem;
}

/* Gallery placeholder */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 40px;
}
.gallery .g-item {
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery .g-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 1/1;
}
.placeholder-img {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 10px, #222 10px, #222 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 0.72rem;
  text-align: center;
  padding: 8px;
  border: 1px dashed var(--gold);
}

/* Two column layout */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }

/* POI list */
.poi-list { list-style: none; padding: 0; margin: 0; }
.poi-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}
.poi-list li span.dist {
  color: var(--gold-text);
  font-weight: 600;
  white-space: nowrap;
}

.map-embed {
  width: 100%;
  aspect-ratio: 16/10;
  border: 0;
  border-radius: var(--radius);
  filter: grayscale(20%);
}

.map-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  background: var(--grey-light);
  border: 1px dashed #d8d2c4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
}
.map-placeholder p { margin: 0; color: var(--grey); font-size: 0.85rem; max-width: 320px; }
.map-embed[style*="16/6"], .map-placeholder[style*="16/6"] { aspect-ratio: 16/6; }

/* FAQ accordion */
.faq-group h3 {
  color: var(--gold-dark);
  margin: 40px 0 18px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
details.faq {
  border-bottom: 1px solid #e2ddd0;
  padding: 16px 0;
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 1.02rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  color: var(--gold-dark);
  font-size: 1.4rem;
  margin-left: 12px;
}
details.faq[open] summary::after { content: "–"; }
details.faq p { margin-top: 14px; }

/* Testimonials */
.testimonial {
  background: var(--white);
  border: 1px solid #eee;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.testimonial .stars { color: var(--gold); margin-bottom: 10px; letter-spacing: 2px; }
.testimonial .who { font-weight: 700; margin-top: 12px; font-size: 0.9rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}
.form-field textarea { resize: vertical; min-height: 130px; }

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 26px;
}
.contact-info-item .icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--black);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  background: var(--black);
  color: #ccc;
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.site-footer h4 { color: var(--white); font-size: 1rem; }
.site-footer a { color: #bbb; }
.site-footer a:hover { color: var(--gold); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: #777;
}

/* Sticky booking bar (apartment pages) */
.booking-bar {
  position: sticky;
  bottom: 0;
  z-index: 90;
  background: var(--black);
  color: var(--white);
  padding: 16px 0;
  border-top: 2px solid var(--gold);
}
.booking-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.booking-bar .price-hint { font-size: 0.85rem; color: #ccc; }
.booking-bar strong { color: var(--gold); font-family: var(--font-serif); font-size: 1.1rem; }

/* Utilities */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.small { font-size: 0.85rem; color: var(--grey); }
.badge {
  display: inline-block;
  background: var(--black);
  color: var(--gold);
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-right: 8px;
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .split .split-media { order: -1 !important; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--black);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 30px;
    gap: 18px;
    transform: translateY(-130%);
    transition: transform 0.3s ease;
    border-bottom: 1px solid rgba(201,162,75,0.25);
  }
  .main-nav.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .g-item:first-child { grid-column: span 2; grid-row: span 1; aspect-ratio: 2/1; }
  .feature-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}

/* Fix: make gallery + framed photos fill their box instead of stretching/overflowing */
.gallery .g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
  cursor: pointer;
}
.gallery .g-item:hover img {
  transform: scale(1.15);
}
.photo-frame {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
  cursor: pointer;
}
.photo-frame:hover img {
  transform: scale(1.1);
}

/* Same hover zoom for apartment cards on the home page */
.card-img img {
  transition: transform 0.45s ease;
}
.card:hover .card-img img {
  transform: scale(1.1);
}

/* ==========================================================================
   Añadido: WhatsApp flotante, banner de cookies, sellos de confianza,
   política de cancelación, buscador funcional, footer legal, blog
   ========================================================================== */

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  bottom: calc(24px + var(--booking-bar-h, 0px));
  right: 24px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  transition: transform 0.25s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; fill: #fff; }

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: var(--booking-bar-h, 0px);
  z-index: 300;
  background: var(--black);
  color: #ddd;
  padding: 18px 24px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 2px solid var(--gold);
}
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; color: #ccc; font-size: 0.85rem; max-width: 640px; }
.cookie-banner a { color: var(--gold); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner .btn { padding: 10px 20px; font-size: 0.82rem; }

/* Trust badges (valoraciones reales Airbnb/Booking) */
.trust-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 30px 0 10px;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid #eee;
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--black);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.trust-badge:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.trust-badge .score { color: var(--gold-text); font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; }
.trust-badge .platform { text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.5px; color: var(--grey); display: block; }

/* Cancellation policy note */
.policy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--grey-light);
  border: 1px solid #e5e0d6;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 18px 0;
  font-size: 0.9rem;
  color: var(--black);
}
.policy-note .ic { font-size: 1.25rem; flex-shrink: 0; line-height: 1; }
.policy-note strong { color: var(--black); }
.policy-note p { margin: 0; color: var(--black); font-size: 0.9rem; }

/* Functional guest filter inside the search-float bar */
.search-float select#guestFilter {
  border: none;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--black);
  width: 100%;
  cursor: pointer;
  padding: 0;
}
.search-float select#guestFilter:focus { outline: none; }

/* Footer legal row */
.footer-legal { display: flex; gap: 12px; flex-wrap: wrap; }

/* Blog / guides */
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #eee;
}
.blog-card .blog-card-body { padding: 24px; }
.blog-card h3 { margin-bottom: 10px; }
.blog-card-img { aspect-ratio: 3/2; overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 700px) {
  .whatsapp-float { bottom: calc(16px + var(--booking-bar-h, 0px)); right: 16px; width: 52px; height: 52px; }
  .cookie-banner { justify-content: flex-start; padding: 16px; }
  .lang-switch a { padding: 8px 12px; font-size: 0.82rem; }
  .search-float select#guestFilter { padding: 6px 0; min-height: 44px; }
  .booking-bar { padding: 12px 0; }
  .booking-bar .container { gap: 10px; }
  .booking-bar .price-hint { display: none; }
  .booking-bar .btn { padding: 12px 22px; font-size: 0.88rem; }
}
