/*
Theme Name: GeneratePress Child - Casa Museo
Theme URI: https://www.apartamentoturisticocasamuseo.es/
Description: Tema hijo de GeneratePress para Apartamento Turístico Casa Museo (Mérida) con navegación lateral vertical y diseño editorial con GenerateBlocks.
Author: Synapse
Template: generatepress
Version: 1.0.0
*/

:root {
  --cm-bg: #F7F5F0;
  --cm-surface: #FFFFFF;
  --cm-stone: #EAE6DF;
  --cm-slate: #2A323B;
  --cm-slate-deep: #1E252C;
  --cm-muted: #5C636A;
  --cm-gold: #A68E65;
  --cm-gold-hover: #8E7750;
  --cm-border: rgba(42, 50, 59, 0.10);
  --cm-sidebar-w: 112px;
  --cm-font-serif: 'Cormorant Garamond', Georgia, serif;
  --cm-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--cm-font-sans);
  color: var(--cm-slate);
  background-color: var(--cm-bg);
  line-height: 1.65;
  margin: 0;
  overflow-x: hidden;
}

h1, h2, h3, .cm-serif {
  font-family: var(--cm-font-serif);
  color: var(--cm-slate);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Layout shell: full-bleed edge-to-edge with safe left padding for floating tab on desktop */
@media (min-width: 1025px) {
  body.cm-has-sidebar .cm-page-shell {
    margin-left: 0;
    width: 100%;
  }
  .cm-hero-inner,
  .cm-container,
  .cm-booking-grid,
  .cm-footer-inner,
  .cm-footer-bottom {
    padding-left: 130px !important;
  }
}

.site-content,
.inside-article,
.entry-content {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

.site-main {
  margin: 0 !important;
}

/* Left Vertical Floating Tab (Pestaña) */
.cm-sidebar {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: var(--cm-sidebar-w);
  max-height: calc(100vh - 24px);
  background: rgba(247, 245, 240, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--cm-border);
  border-left: none;
  border-radius: 0 16px 16px 0;
  box-shadow: 0 12px 32px rgba(30, 37, 44, 0.14);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 8px;
  overflow-y: auto;
  scrollbar-width: none;
}

.cm-sidebar::-webkit-scrollbar {
  display: none;
}

.cm-sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}

.cm-sidebar-logo img {
  width: 92px;
  height: auto;
  display: block;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(42, 50, 59, 0.08);
}

.cm-sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin: 0;
}

.cm-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  padding: 8px 6px;
  text-decoration: none;
  color: var(--cm-muted);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.cm-nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cm-nav-item:hover,
.cm-nav-item.is-active {
  color: var(--cm-slate);
  background: rgba(42, 50, 59, 0.06);
}

.cm-nav-item.is-cta {
  color: #fff;
  background: var(--cm-slate);
  margin-top: 2px;
  padding: 7px 4px;
}

.cm-nav-item.is-cta:hover {
  background: var(--cm-gold);
  color: #fff;
}

.cm-sidebar-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid var(--cm-border);
  flex-shrink: 0;
}

.cm-sidebar-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.cm-sidebar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(42, 50, 59, 0.08);
  color: var(--cm-slate);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cm-sidebar-social a:hover {
  background: var(--cm-gold);
  color: #FFFFFF;
}

.cm-sidebar-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: block;
}

/* Mobile Header */
.cm-mobile-bar,
.cm-mobile-drawer {
  display: none;
}

.cm-mobile-drawer svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .cm-sidebar {
    display: none;
  }
  .cm-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--cm-bg);
    border-bottom: 1px solid var(--cm-border);
    padding: 10px 18px;
  }
  .cm-mobile-bar-logo img {
    height: 50px;
    width: auto;
    mix-blend-mode: multiply;
  }
  .cm-mobile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .cm-mobile-book {
    background: var(--cm-slate);
    color: #fff !important;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
  }
  .cm-mobile-toggle {
    background: transparent;
    border: 1px solid var(--cm-border);
    color: var(--cm-slate);
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
  }
  .cm-mobile-drawer {
    display: none;
    position: fixed;
    inset: 61px 0 0 0;
    background: var(--cm-bg);
    z-index: 998;
    padding: 20px 24px;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
  }
  .cm-mobile-drawer.is-open {
    display: flex;
  }
  .cm-mobile-drawer a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--cm-slate);
    font-weight: 500;
    border-bottom: 1px solid var(--cm-border);
  }
}

/* GenerateBlocks Editorial Design Classes */
.cm-hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.cm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 26, 32, 0.88) 0%, rgba(20, 26, 32, 0.66) 48%, rgba(20, 26, 32, 0.20) 100%);
  z-index: 1;
}

.cm-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 72px 48px;
}

.cm-hero-title {
  font-family: var(--cm-font-serif);
  font-size: clamp(2.7rem, 5.2vw, 4.6rem);
  line-height: 1.04;
  color: #FFFFFF;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  margin: 0 0 18px;
  max-width: 580px;
}

.cm-hero-line {
  width: 52px;
  height: 2px;
  background: #D4B98C;
  margin: 0 0 18px;
}

.cm-hero-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
  margin: 0 0 28px;
  max-width: 520px;
}

.cm-subhero {
  position: relative;
  min-height: 270px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* iPhone-compatible Hardware-Accelerated Parallax & Scroll Effects */
.cm-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--cm-gold), #D4B98C);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 1001;
  pointer-events: none;
}

.cm-parallax-bg {
  position: absolute;
  inset: -26% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform: scale(1.06) translate3d(0, 0, 0);
  pointer-events: none;
  z-index: 0;
}

.cm-card-img-wrap img {
  will-change: transform;
  transform: scale(1.16) translate3d(0, 0, 0);
}

.cm-reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.cm-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .cm-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .cm-scroll-progress {
    display: none;
  }
}

.cm-svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cm-svg-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.cm-step-circle .cm-svg-icon svg {
  width: 24px;
  height: 24px;
}

.cm-amenity-item .cm-svg-icon {
  color: var(--cm-gold);
  flex-shrink: 0;
}

.cm-subhero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 37, 44, 0.35) 0%, rgba(30, 37, 44, 0.78) 100%);
  z-index: 1;
}

.cm-subhero .cm-hero-inner {
  padding: 44px 48px;
}

.cm-subhero .cm-hero-title,
.cm-subhero .cm-hero-sub {
  color: #FFFFFF;
}

.cm-section {
  padding: 64px 48px;
  background: var(--cm-bg);
}

.cm-section-white {
  background: var(--cm-surface);
}

.cm-section-stone {
  padding: 56px 48px;
  background: var(--cm-stone);
}

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

.cm-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cm-gold);
  margin: 0 0 8px;
}

.cm-section-head {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 40px;
}

.cm-display-h2 {
  font-family: var(--cm-font-serif);
  font-size: clamp(2rem, 3.2vw, 2.85rem);
  line-height: 1.12;
  margin: 0;
  color: var(--cm-slate);
}

.cm-lead {
  font-size: 15.5px;
  color: var(--cm-muted);
  margin: 0;
}

/* 4-Column Feature Cards (matching reference) */
.cm-cards-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.cm-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.cm-cards-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.cm-card {
  background: var(--cm-surface);
  border: 1px solid var(--cm-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(42, 50, 59, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cm-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(42, 50, 59, 0.08);
}

.cm-card-img-wrap {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: var(--cm-stone);
}

.cm-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cm-card-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cm-slate);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -20px 0 10px 20px;
  position: relative;
  z-index: 2;
  border: 3px solid var(--cm-surface);
  font-size: 16px;
}

.cm-card-body {
  padding: 6px 20px 22px;
}

.cm-card-title {
  font-family: var(--cm-font-serif);
  font-size: 1.35rem;
  margin: 0 0 8px;
  color: var(--cm-slate);
}

.cm-card-text {
  font-size: 14px;
  color: var(--cm-muted);
  margin: 0;
  line-height: 1.55;
}

/* Process / Experience 4-Step Strip */
.cm-process-wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
}

.cm-process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  position: relative;
}

.cm-step {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cm-step-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(42, 50, 59, 0.25);
  background: var(--cm-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--cm-slate);
  margin-bottom: 12px;
}

.cm-step-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cm-slate);
  margin: 0 0 6px;
}

.cm-step-desc {
  font-size: 13px;
  color: var(--cm-muted);
  margin: 0;
  line-height: 1.45;
}

/* Bottom Split Booking Card Section (matching "Book Consultation" in reference) */
.cm-booking-band {
  position: relative;
  min-height: 440px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 56px 48px;
  overflow: hidden;
}

.cm-booking-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 37, 44, 0.52) 0%, rgba(30, 37, 44, 0.28) 100%);
  z-index: 1;
}

.cm-booking-grid {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 390px;
  gap: 40px;
  align-items: center;
}

.cm-booking-quote {
  color: #FFFFFF;
}

.cm-booking-quote h2 {
  font-family: var(--cm-font-serif);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  color: #FFFFFF;
  margin: 0 0 14px;
}

.cm-booking-quote p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15.5px;
  max-width: 480px;
  margin: 0;
}

.cm-booking-card {
  background: var(--cm-surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
}

.cm-booking-card-head {
  background: var(--cm-slate);
  color: #FFFFFF;
  padding: 24px 26px;
}

.cm-booking-card-head h3 {
  font-family: var(--cm-font-serif);
  color: #FFFFFF;
  font-size: 1.65rem;
  margin: 0 0 6px;
}

.cm-booking-card-head p {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
}

.cm-booking-card-body {
  padding: 20px 26px 24px;
}

.cm-booking-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--cm-border);
  text-decoration: none;
  color: var(--cm-slate);
}

.cm-booking-link-row:last-of-type {
  border-bottom: none;
  margin-bottom: 14px;
}

.cm-booking-link-row strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.cm-booking-link-row span {
  display: block;
  font-size: 12.5px;
  color: var(--cm-muted);
}

.cm-btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--cm-gold);
  color: #FFFFFF !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 22px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.cm-btn-gold:hover {
  background: var(--cm-gold-hover);
  color: #FFFFFF !important;
}

.cm-btn-inline {
  width: auto;
  padding: 12px 26px;
}

/* Gallery Grid */
.cm-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.cm-gallery-grid img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Amenity Pills */
.cm-amenity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.cm-amenity-item {
  background: var(--cm-surface);
  border: 1px solid var(--cm-border);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--cm-slate);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Contact Form 7 Clean Styling */
.wpcf7-form p,
.wpcf7-form label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cm-slate);
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(42, 50, 59, 0.2);
  border-radius: 8px;
  background: #FFFFFF;
  font-family: var(--cm-font-sans);
  font-size: 14.5px;
  margin-top: 6px;
  margin-bottom: 14px;
}

.wpcf7-form input[type="submit"] {
  background: var(--cm-gold);
  color: #FFFFFF;
  border: none;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
}

.wpcf7-form input[type="submit"]:hover {
  background: var(--cm-gold-hover);
}

/* Compact Dark Footer */
.cm-footer {
  background: var(--cm-slate-deep);
  color: rgba(255, 255, 255, 0.82);
  padding: 44px 48px 28px;
  font-size: 13.5px;
}

.cm-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1.25fr;
  gap: 36px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cm-footer h4 {
  font-family: var(--cm-font-serif);
  color: #FFFFFF;
  font-size: 1.4rem;
  margin: 0 0 10px;
}

.cm-footer p {
  margin: 0 0 6px;
  line-height: 1.55;
}

.cm-footer-reg {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  word-break: break-all;
  margin-top: 10px !important;
}

.cm-footer-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.cm-footer-badges img {
  height: 116px;
  width: auto;
  border-radius: 8px;
  background: #FFFFFF;
  padding: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.cm-footer-badges img:hover {
  transform: scale(1.04);
}

.cm-footer-bottom {
  max-width: 1180px;
  margin: 18px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.62);
}

.cm-footer-bottom a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  margin-left: 16px;
}

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

/* Responsive adjustments */
@media (max-width: 1120px) {
  .cm-cards-4,
  .cm-gallery-grid,
  .cm-amenity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cm-process-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .cm-booking-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .cm-hero-inner,
  .cm-section,
  .cm-section-stone,
  .cm-booking-band,
  .cm-footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .cm-section-head,
  .cm-cards-4,
  .cm-cards-3,
  .cm-cards-2,
  .cm-process-steps,
  .cm-gallery-grid,
  .cm-amenity-grid,
  .cm-footer-inner {
    grid-template-columns: 1fr;
  }
  .cm-footer-badges {
    justify-content: flex-start;
  }
}
