/**
 * LayosCamp — Mobile & Typography Fixes
 * Comprehensive fix for all pages: home, campamentos, detail, etc.
 */

/* ==============================================
   STICKY DATE BAR: Fixed bottom on ALL screens (desktop + mobile)
   ============================================== */
.page-node-type-detalle-de-campamento .E-sticky-enroll {
  position: fixed !important;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.06);
  border-top: 1px solid #eee;
}

.page-node-type-detalle-de-campamento main {
  padding-bottom: 80px;
}

/* ==============================================
   GALLERY: Flexible grid — expands when few photos,
   wraps naturally when many photos.
   ≤5 photos fill available space; >5 wrap into rows.
   ============================================== */
.E-gallery-section .E-gallery__grid,
.E-gallery-section .view-content {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 16px 16px;
}

.E-gallery-section .E-gallery__item,
.E-gallery-section .views-row {
  flex: 1 1 250px;
  max-width: 400px;
  border-radius: 12px;
  overflow: hidden;
}

.E-gallery-section img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .E-gallery-section .E-gallery__item,
  .E-gallery-section .views-row {
    flex: 1 1 45%;
    max-width: none;
  }
  .E-gallery-section img {
    height: 160px;
  }
}

/* ==============================================
   GLOBAL: Prevent horizontal overflow
   ============================================== */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

.E-home-camps-section,
.E-home-letter__inner,
.E-home-letter__body,
.E-home-news__inner {
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ==============================================
   HOMEPAGE: Title — brand typography, not giant
   ============================================== */
.E-home-camps-section__intro h1,
.E-home-camps-section__intro .G-txt--supergigante {
  font-family: 'Playfair Display', 'Georgia', serif !important;
  font-size: clamp(1.4rem, 4vw, 2.25rem) !important;
  text-transform: none !important;
  line-height: 1.3 !important;
  color: #2D5016 !important;
  font-weight: 700 !important;
}

/* Intro paragraph — compact on mobile */
.E-home-camps-section__intro p {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

@media (max-width: 768px) {
  .E-home-camps-section__intro p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.85rem;
    margin-bottom: 8px;
  }

  .E-home-camps-section {
    padding: 24px 16px !important;
  }
}

/* ==============================================
   HOMEPAGE: VERANO / INTERNACIONAL Tabs
   Segmented control — always fits in viewport
   ============================================== */
.view-selector-en-inicio .view-filters .bef-links {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.view-selector-en-inicio .view-filters .bef-links ul {
  display: flex !important;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  border: 2px solid #8BA841;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.view-selector-en-inicio .view-filters .bef-links ul li {
  margin: 0;
  padding: 0;
}

.view-selector-en-inicio .view-filters .bef-links ul li a {
  display: block;
  padding: 10px 24px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #2D5016;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.view-selector-en-inicio .view-filters .bef-links ul li a:hover {
  background: #F0F4E8;
}

.view-selector-en-inicio .view-filters .bef-links ul li a.bef-link-active {
  background: #8BA841;
  color: #fff;
}

@media (max-width: 768px) {
  .view-selector-en-inicio .view-filters .bef-links ul li a {
    padding: 8px 18px;
    font-size: 0.8rem;
  }
}

/* ==============================================
   HOMEPAGE: Location filter — 3-column grid
   Fits in viewport, no overflow, no scroll
   ============================================== */
.E-home-camps__heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #888;
  text-align: center;
  margin: 0 0 12px;
}

/* Desktop: circular icon buttons (app-icon grid) */
.E-location-filter__tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  justify-content: center !important;
  padding: 0 16px !important;
  margin-bottom: 24px !important;
}

.E-location-filter__tag {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px !important;
  border: none !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #333 !important;
  font-family: 'Inter', sans-serif;
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
  width: 72px !important;
  white-space: normal !important;
  text-align: center;
}

.E-location-filter__tag:hover {
  background: #F0F4E8 !important;
  color: #2D5016 !important;
}

.E-location-filter__tag.active,
.E-location-filter__tag.is-active {
  background: #F0F4E8 !important;
  color: #8BA841 !important;
}

.E-location-filter__icon {
  display: block !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  background: #F0F4E8 !important;
  padding: 8px !important;
  box-sizing: border-box !important;
  transition: transform 0.2s, box-shadow 0.2s;
  object-fit: contain !important;
}

.E-location-filter__tag:hover .E-location-filter__icon {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(139, 168, 65, 0.25);
}

.E-location-filter__tag.active .E-location-filter__icon,
.E-location-filter__tag.is-active .E-location-filter__icon {
  background: #8BA841 !important;
  box-shadow: 0 4px 12px rgba(139, 168, 65, 0.3);
}

/* Mobile: circular icon buttons — slightly smaller */
@media (max-width: 768px) {
  .E-location-filter__tags {
    gap: 12px !important;
    padding: 0 12px !important;
    margin-bottom: 16px !important;
  }

  .E-location-filter__tag {
    width: 64px !important;
    padding: 6px !important;
    font-size: 0.7rem !important;
    gap: 4px !important;
  }

  .E-location-filter__icon {
    width: 38px !important;
    height: 38px !important;
    padding: 5px !important;
  }

  .E-home-camps__heading {
    font-size: 0.75rem;
    margin-bottom: 8px;
  }
}

/* Very small screens: tighter gap */
@media (max-width: 360px) {
  .E-location-filter__tags {
    gap: 8px !important;
    padding: 0 8px !important;
  }

  .E-location-filter__tag {
    width: 56px !important;
    font-size: 0.65rem !important;
  }

  /* Keep 44px minimum for touch target accessibility */
  .E-location-filter__icon {
    width: 44px !important;
    height: 44px !important;
    padding: 8px !important;
  }
}

/* ==============================================
   HOMEPAGE: Carta a padres — responsive fix
   ============================================== */
.E-home-letter__body h4,
.E-home-letter__body .G-txt--xxl {
  font-family: 'Playfair Display', 'Georgia', serif !important;
  font-size: 1.2rem !important;
  text-align: left !important;
}

@media (max-width: 768px) {
  .E-home-letter {
    padding: 32px 16px;
  }

  .E-home-letter__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .E-home-letter__body h4,
  .E-home-letter__body .G-txt--xxl {
    text-align: center !important;
    font-size: 1.1rem !important;
  }

  .E-home-letter__body p {
    text-align: left;
    font-size: 0.85rem;
  }

  .E-home-letter__avatar img {
    width: 72px;
    height: 72px;
  }
}

/* ==============================================
   CAMPAMENTOS LISTING: Tighten spacing
   ============================================== */
.E-camp-filter__title {
  font-family: 'Playfair Display', 'Georgia', serif !important;
  text-transform: none !important;
  font-weight: 700;
  color: #2D5016;
}

@media (max-width: 768px) {
  .E-camp-filter__title {
    font-size: 1.4rem !important;
    margin-bottom: 8px !important;
  }

  .E-camp-catalog {
    padding-top: 90px !important;
  }

  .E-camp-filter {
    padding: 14px !important;
    margin-bottom: 12px !important;
  }

  .E-camp-filter__row {
    margin-bottom: 10px;
  }

  .E-camp-filter__label {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .E-camp-results__counter {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .E-camp-filter__intro,
  .E-camp-catalog > p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.85rem;
    margin-bottom: 10px;
  }
}

/* Type chips segmented control */
#type-chips.E-camp-filter__chips {
  display: flex;
  gap: 0;
  border: 2px solid #8BA841;
  border-radius: 8px;
  overflow: hidden;
  flex-wrap: nowrap;
  padding-bottom: 0;
}

#type-chips .E-camp-filter__chip {
  flex: 1;
  border: none;
  border-radius: 0;
  padding: 10px 12px;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #2D5016;
  transition: background 0.2s, color 0.2s;
}

#type-chips .E-camp-filter__chip + .E-camp-filter__chip {
  border-left: 1px solid #d4e0b6;
}

#type-chips .E-camp-filter__chip:hover {
  background: #F0F4E8;
}

#type-chips .E-camp-filter__chip.is-active {
  background: #8BA841;
  color: #fff;
}

/* ==============================================
   CAMPAMENTOS PAGE: Location filter — text buttons
   Clean, no SVG icons, brand colors
   ============================================== */

/* Hide SVG icons completely */
.E-camp-filter__loc-icon {
  display: none !important;
}

/* Hide the select dropdown — always show buttons */
.E-camp-filter__loc-select {
  display: none !important;
}

/* Desktop: flex wrap, centered */
.E-camp-filter__locations {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.E-camp-filter__loc-tag {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0;
  padding: 8px 18px !important;
  border: 1.5px solid #d4e0c8 !important;
  border-radius: 8px !important;
  background: #F9FBF5 !important;
  color: #2D5016 !important;
  font-family: 'Inter', sans-serif;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap !important;
  cursor: pointer;
}

.E-camp-filter__loc-tag:hover {
  background: #EEF3E4 !important;
  border-color: #8BA841 !important;
  color: #2D5016 !important;
}

.E-camp-filter__loc-tag.is-active {
  background: #8BA841 !important;
  border-color: #8BA841 !important;
  color: #fff !important;
}

/* Hide the plane icon for UK too */
.E-camp-filter__plane {
  display: none !important;
}

/* Mobile: text buttons compact */
@media (max-width: 767px) {
  .E-camp-filter__locations {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }

  .E-camp-filter__loc-tag {
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 360px) {
  .E-camp-filter__loc-tag {
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
    min-height: 44px !important;
  }

  .E-camp-filter__loc-icon {
    display: inline-block !important;
    width: 44px !important;
    height: 44px !important;
  }
}

/* ==============================================
   PAGE HERO: Smooth green transition from header
   Header is #31562d. Hero must blend seamlessly.
   ============================================== */
.E-page-hero--green {
  background: #31562d !important;
  padding-top: 0;
}

/* Kill the overlay gradient that creates the green mismatch */
.E-page-hero--green .E-page-hero__overlay {
  background: none !important;
}

.E-page-hero--green .E-page-hero__content {
  padding-top: 80px;
  padding-bottom: 32px;
}

@media (max-width: 768px) {
  .E-page-hero--green .E-page-hero__content {
    padding-top: 16px;
    padding-bottom: 20px;
  }

  .E-page-hero__title {
    font-size: 1.5rem !important;
  }
}

/* All pages with fixed header: ensure content is not hidden */
@media (max-width: 768px) {
  .E-page-hero .E-page-hero__content {
    padding-top: 100px !important;
  }

  /* Campamentos catalog already handled above */
}

/* Date/age compact */
@media (max-width: 768px) {
  #date-chips .E-camp-filter__chip {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .E-camp-filter__age-btn { width: 44px; height: 44px; } /* Min 44px touch target */
  .E-camp-filter__age-input { width: 48px; font-size: 18px; }
}

/* ==============================================
   CAMP CARDS: Flex layout for equal height +
   CTA buttons always at bottom
   ============================================== */
.E-camp-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* CRITICAL: is-hidden must win over display:flex */
.E-camp-card.is-hidden {
  display: none !important;
}

.E-camp-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.E-camp-card__cta {
  margin-top: auto !important;
}

/* Waitlist price badge in catalog cards — orange */
.E-camp-card__price--waitlist {
  background: rgba(230, 126, 34, 0.9) !important;
}

.E-camp-card__price--waitlist .E-camp-card__price-value {
  font-size: 0.8rem;
  font-weight: 600;
}

/* Waitlist date selector cards — muted, secondary */
.E-fecha-selector__card--waitlist {
  background: #fafafa !important;
  border-color: #e0e0e0 !important;
  border-bottom: 2px solid #e0e0e0 !important;
  opacity: 0.7;
}

.E-fecha-selector__card--waitlist:hover {
  opacity: 0.85;
  background: #f5f5f5 !important;
}

.E-fecha-selector__card--waitlist .E-fecha-selector__title {
  color: #999 !important;
  font-weight: 500 !important;
  font-size: 11px !important;
}

.E-fecha-selector__card--waitlist .E-fecha-selector__price {
  color: #bbb !important;
  font-size: 11px !important;
  text-decoration: line-through;
}

.E-fecha-selector__card--waitlist .G-boton--primario {
  background: transparent !important;
  border: 1px solid #ccc !important;
  color: #999 !important;
  font-size: 10px !important;
  padding: 3px 10px !important;
}

.E-fecha-selector__card--waitlist .G-boton--primario b {
  color: #999 !important;
  font-weight: 500 !important;
}

.E-fecha-selector__card--waitlist .G-boton--primario:hover {
  background: #f0f0f0 !important;
}

/* Brand typography for card titles */
.E-camp-card__title {
  font-weight: 700;
}

.E-camp-card__title a {
  color: #2D5016 !important;
  text-decoration: none;
  font-weight: 700;
}

.E-camp-card__title a:hover {
  color: #8BA841 !important;
}

.E-camp-card__cta {
  background: #2D5016 !important;
  font-weight: 700;
}

.E-camp-card__cta:hover {
  background: #8BA841 !important;
}

/* ==============================================
   INTERNATIONAL CAMPS: Request-only styling
   ============================================== */

/* International price badge — blue info color instead of price */
.E-camp-card__price--intl {
  background: rgba(52, 152, 219, 0.9) !important;
}

.E-camp-card__price--intl .E-camp-card__price-value {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* International CTA button — blue instead of green */
.E-camp-card__cta--intl {
  background: #3498DB !important;
  font-weight: 700;
}

.E-camp-card__cta--intl:hover {
  background: #2980B9 !important;
}

/* International date selector: info button instead of purchase */
.G-boton--info {
  display: inline-block;
  padding: 8px 18px;
  background: #3498DB !important;
  border: none;
  border-radius: 6px;
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
  cursor: pointer;
}

.G-boton--info:hover {
  background: #2980B9 !important;
}

.G-boton--info b {
  color: #fff !important;
}

/* International confirmation notice */
.confirmacion-internacional__notice {
  background: #EBF5FB;
  border-left: 4px solid #3498DB;
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #2C3E50;
}

.confirmacion-internacional__notice strong {
  color: #2C3E50;
}

@media (max-width: 480px) {
  .E-camp-card__image { height: 160px; }
  .E-camp-card__body { padding: 14px !important; }
  .E-camp-card__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* ==============================================
   CAMP DETAIL: Fix giant uppercase titles
   ============================================== */
.page-node-type-detalle-de-campamento .G-txt--mayus {
  text-transform: none !important;
}

.page-node-type-detalle-de-campamento h2.G-txt--xl,
.page-node-type-detalle-de-campamento h2.G-txt--xxl,
.page-node-type-detalle-de-campamento h2.G-txt--supergigante {
  font-family: 'Playfair Display', 'Georgia', serif !important;
  font-size: clamp(1.3rem, 3.5vw, 1.75rem) !important;
  text-transform: none !important;
  font-weight: 700 !important;
  color: #2D5016 !important;
  line-height: 1.3 !important;
}

.page-node-type-detalle-de-campamento .G-color--primario {
  color: #2D5016 !important;
}

@media (max-width: 768px) {
  .page-node-type-detalle-de-campamento h2.G-txt--xl,
  .page-node-type-detalle-de-campamento h2.G-txt--xxl {
    font-size: 1.2rem !important;
    margin-bottom: 12px !important;
  }
}

/* ==============================================
   GLOBAL: Override G-txt--supergigante everywhere
   ============================================== */
h1.G-txt--supergigante,
h2.G-txt--supergigante,
.G-txt--supergigante h1 {
  font-family: 'Playfair Display', 'Georgia', serif !important;
  font-size: clamp(1.4rem, 4vw, 2.5rem) !important;
  text-transform: none !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
}

@media (max-width: 768px) {
  h1.G-txt--supergigante,
  h2.G-txt--supergigante,
  .G-txt--supergigante h1 {
    font-size: 1.3rem !important;
  }

  .G-txt--mayus {
    text-transform: none !important;
  }
}

/* Content page headings */
@media (max-width: 768px) {
  .page-node-type-contacto h1,
  .page-node-type-conocenos h1,
  .page-node-type-colegios h1,
  .page-node-type-pagina-textual h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }
}

/* ==============================================
   FORMS: Brand-styled titles, inputs & contacts
   ============================================== */

/* --- Form titles --- */
.webform-submission-form h2,
.webform-submission-form .form-title {
  font-family: 'Playfair Display', 'Georgia', serif;
  color: #8BA841;
  font-weight: 700;
  font-size: clamp(1.3rem, 3.5vw, 1.75rem);
  line-height: 1.3;
  margin-bottom: 16px;
}

/* --- Contact page title --- */
.path-contacto h1,
.path-contacto .page-title {
  font-family: 'Playfair Display', 'Georgia', serif;
  text-transform: none !important;
  color: #2D5016;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.3;
}

/* --- Form container — centered, padded --- */
.webform-submission-form {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  padding: 24px;
}

/* --- Form labels --- */
.webform-submission-form label,
.webform-submission-form .form-item label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 4px;
  display: block;
}

/* --- Form inputs, textareas, selects --- */
.webform-submission-form input[type="text"],
.webform-submission-form input[type="email"],
.webform-submission-form input[type="tel"],
.webform-submission-form input[type="number"],
.webform-submission-form input[type="url"],
.webform-submission-form input[type="password"],
.webform-submission-form input[type="date"],
.webform-submission-form textarea,
.webform-submission-form select {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px; /* Must be >= 16px to prevent iOS zoom on focus */
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  color: #333;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.webform-submission-form input:focus,
.webform-submission-form textarea:focus,
.webform-submission-form select:focus {
  border-color: #8BA841;
  box-shadow: 0 0 0 3px rgba(139, 168, 65, 0.15);
}

/* --- Submit buttons --- */
.webform-submission-form .form-submit,
.webform-submission-form input[type="submit"],
.webform-submission-form button[type="submit"] {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  background: #8BA841;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.webform-submission-form .form-submit:hover,
.webform-submission-form input[type="submit"]:hover,
.webform-submission-form button[type="submit"]:hover {
  background: #6B8A2F;
  transform: translateY(-1px);
}

.webform-submission-form .form-submit:active,
.webform-submission-form input[type="submit"]:active,
.webform-submission-form button[type="submit"]:active {
  transform: translateY(0);
}

/* --- Error messages --- */
.webform-submission-form .error,
.webform-submission-form .form-item--error-message,
.webform-submission-form .messages--error,
.webform-submission-form .form-item input.error,
.webform-submission-form .form-item textarea.error {
  color: #E74C3C;
  border-color: #E74C3C;
}

.webform-submission-form .messages--error {
  background: rgba(231, 76, 60, 0.06);
  border: 1.5px solid #E74C3C;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* --- Success messages --- */
.webform-submission-form .messages--status {
  background: rgba(39, 174, 96, 0.06);
  border: 1.5px solid #27AE60;
  border-radius: 8px;
  padding: 12px 16px;
  color: #27AE60;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* --- Contact page form spacing on mobile --- */
@media (max-width: 768px) {
  .webform-submission-form {
    padding: 16px;
  }

  .webform-submission-form h2,
  .webform-submission-form .form-title {
    font-size: 1.2rem;
  }

  .path-contacto h1,
  .path-contacto .page-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
  }
}

/* ==============================================
   CAMP DETAIL: Photo gallery as horizontal swipe
   Gallery now appears ABOVE the contact form.
   On mobile, converts from a grid to a horizontal
   scrollable carousel with snap points.
   ============================================== */
@media (max-width: 768px) {
  /* Gallery section: reduce top/bottom spacing */
  .page-node-type-detalle-de-campamento .E-gallery-section {
    padding: 16px 0 8px;
  }

  .page-node-type-detalle-de-campamento .E-gallery-section h2 {
    margin-bottom: 12px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Convert grid to horizontal scroll */
  .page-node-type-detalle-de-campamento .E-gallery__grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 0 16px 16px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    /* Override the grid layout from style.css */
    grid-template-columns: none !important;
  }

  /* Hide scrollbar on webkit */
  .page-node-type-detalle-de-campamento .E-gallery__grid::-webkit-scrollbar {
    display: none;
  }

  /* Each gallery item: fixed width card, no spanning */
  .page-node-type-detalle-de-campamento .E-gallery__item {
    flex: 0 0 280px;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
  }

  /* Override the first-child span (was grid-column: span 2) */
  .page-node-type-detalle-de-campamento .E-gallery__item:first-child {
    grid-column: auto !important;
    grid-row: auto !important;
    flex: 0 0 280px;
  }

  /* Gallery images: consistent size inside carousel */
  .page-node-type-detalle-de-campamento .E-gallery__img {
    width: 280px;
    height: 200px;
    min-height: 200px !important;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
  }

  /* First child image: same size as others in carousel */
  .page-node-type-detalle-de-campamento .E-gallery__item:first-child .E-gallery__img {
    min-height: 200px !important;
    height: 200px;
    width: 280px;
  }

  /* Gallery container: reduce padding */
  .page-node-type-detalle-de-campamento .E-gallery {
    padding: 0 0 8px;
  }
}

/* Slightly larger cards on tablets */
@media (min-width: 481px) and (max-width: 768px) {
  .page-node-type-detalle-de-campamento .E-gallery__item,
  .page-node-type-detalle-de-campamento .E-gallery__item:first-child {
    flex: 0 0 320px;
  }

  .page-node-type-detalle-de-campamento .E-gallery__img,
  .page-node-type-detalle-de-campamento .E-gallery__item:first-child .E-gallery__img {
    width: 320px;
    height: 220px;
    min-height: 220px !important;
  }
}

/* Very small screens: slightly narrower cards */
@media (max-width: 380px) {
  .page-node-type-detalle-de-campamento .E-gallery__item,
  .page-node-type-detalle-de-campamento .E-gallery__item:first-child {
    flex: 0 0 240px;
  }

  .page-node-type-detalle-de-campamento .E-gallery__img,
  .page-node-type-detalle-de-campamento .E-gallery__item:first-child .E-gallery__img {
    width: 240px;
    height: 170px;
    min-height: 170px !important;
  }
}

/* ==============================================
   CAMP DETAIL: Reduce vertical space on mobile
   Tighter sections, smaller gaps, compact layout
   ============================================== */
@media (max-width: 768px) {

  /* --- Hero section: reduce bottom padding --- */
  .page-node-type-detalle-de-campamento .E-page-hero {
    min-height: 45vh;
  }

  .page-node-type-detalle-de-campamento .E-page-hero__content {
    padding-bottom: 24px;
  }

  .page-node-type-detalle-de-campamento .E-page-hero__subtitle {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  /* --- PDF download: compact --- */
  .page-node-type-detalle-de-campamento .E-pdf-download {
    padding: 8px 16px;
  }

  /* --- Activities section: tighter grid --- */
  .page-node-type-detalle-de-campamento .E-listado-actividades {
    gap: 4px !important;
    padding: 0 8px !important;
  }

  .page-node-type-detalle-de-campamento .E-actividad-item {
    padding: 8px 6px !important;
    width: calc(25% - 4px);
    min-width: 70px;
  }

  .page-node-type-detalle-de-campamento .E-actividad-icon {
    width: 40px !important;
    height: 40px !important;
  }

  .page-node-type-detalle-de-campamento .E-actividad-item p {
    font-size: 0.7rem !important;
    margin-top: 4px !important;
    line-height: 1.2 !important;
  }

  /* Activities container: reduce padding */
  .page-node-type-detalle-de-campamento .G-fondo--blanco.G-max--100 > .G-max--1200 {
    padding: 24px 0 !important;
  }

  /* --- Accordion sections: reduce padding --- */
  .page-node-type-detalle-de-campamento .E-pico > .G-max--900,
  .page-node-type-detalle-de-campamento .G-fondo--degra-arriba-blanco > .G-max--900 {
    padding: 40px 16px 40px !important;
  }

  .page-node-type-detalle-de-campamento .accordion-button {
    font-size: 0.9rem;
    padding: 12px 16px;
  }

  .page-node-type-detalle-de-campamento .accordion-body {
    font-size: 0.85rem;
    padding: 12px 16px;
  }

  /* --- Contact form section: more compact --- */
  .page-node-type-detalle-de-campamento .G-fondo--degra-arriba-blanco > .G-max--800 {
    padding: 40px 16px 40px !important;
  }

  .page-node-type-detalle-de-campamento .G-fondo--degra-arriba-blanco .G-txt--xl {
    font-size: 1.1rem !important;
    margin-bottom: 8px !important;
  }

  .page-node-type-detalle-de-campamento .G-fondo--degra-arriba-blanco .G-txt--m {
    font-size: 0.85rem;
    margin-bottom: 16px !important;
  }

  /* Mountain icon above form: smaller on mobile */
  .page-node-type-detalle-de-campamento .G-size--h--xxsupergigante {
    max-height: 60px !important;
    margin-bottom: 8px !important;
  }

  /* --- Sticky enroll bar: mobile specific --- */
  .page-node-type-detalle-de-campamento .E-sticky-enroll {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
  }

  .page-node-type-detalle-de-campamento .E-sticky-enroll__inner {
    padding: 0 12px;
  }

  /* Date cards: fit all in one row, centered, responsive */
  .E-fecha-selector__list {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    justify-content: center !important;
    list-style: none;
    padding: 0 12px !important;
    margin: 0 !important;
    overflow-x: visible !important;
  }

  .E-fecha-selector__item {
    flex: 1 !important;
    max-width: 140px !important;
    min-width: 0 !important;
  }

  .E-fecha-selector__card {
    padding: 6px 8px !important;
    text-align: center;
    border-radius: 8px !important;
    border: 1.5px solid #e0e0e0 !important;
    background: #fff;
  }

  .E-fecha-selector__title {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    margin: 0 0 2px !important;
    line-height: 1.2 !important;
  }

  .E-fecha-selector__price {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #8BA841 !important;
    margin: 0 0 4px !important;
  }

  .E-fecha-selector__cta {
    font-size: 0.65rem;
  }

  .E-fecha-selector__cta a {
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-size: 0.65rem !important;
  }

  .E-fecha-selector__heading {
    font-size: 0.75rem !important;
    margin: 0 0 6px !important;
  }

  /* Add bottom padding to main so content isn't hidden behind fixed bar */
  .page-node-type-detalle-de-campamento main {
    padding-bottom: 120px;
  }

  /* --- Section headings across the detail page --- */
  .page-node-type-detalle-de-campamento h2 {
    margin-bottom: 12px !important;
  }

  .page-node-type-detalle-de-campamento .G-padding--xxm {
    padding: 12px !important;
  }

  .page-node-type-detalle-de-campamento .G-margen--xxm {
    margin-bottom: 12px !important;
  }

  /* --- E-pico decorative peak: reduce height on mobile --- */
  .page-node-type-detalle-de-campamento .E-pico:before,
  .page-node-type-detalle-de-campamento .E-pico:after {
    height: 60px;
    bottom: -30px;
  }
}

/* ==============================================
   DATE SELECTOR: Larger phones / small tablets
   ============================================== */
@media (min-width: 481px) and (max-width: 768px) {
  .E-fecha-selector__item {
    max-width: 160px !important;
  }

  .E-fecha-selector__title {
    font-size: 0.75rem !important;
  }

  .E-fecha-selector__price {
    font-size: 0.8rem !important;
  }
}


/* ==============================================
   BREAKPOINT AUDIT: iPhone SE / 12 Mini (375px)
   ============================================== */
@media (max-width: 375px) {
  /* Ensure no horizontal overflow */
  .E-home-camps-section {
    padding: 20px 12px !important;
  }

  .E-home-camps__cta {
    padding: 12px 16px !important;
    font-size: 0.85rem !important;
  }

  .E-fecha-selector__cta a {
    padding: 4px 6px !important;
    font-size: 0.6rem !important;
  }

  .E-fecha-selector__item {
    max-width: 120px !important;
  }

  .E-page-hero__title {
    font-size: 1.3rem !important;
  }

  /* Camp cards: single column, full bleed */
  .E-camp-card__body {
    padding: 12px !important;
  }

  /* News cards: smaller thumbnails */
  .E-noticia-teaser a.G-fondo--full {
    min-height: 100px !important;
  }

  .E-noticia-teaser h2 {
    font-size: 0.65rem !important;
  }
}

/* ==============================================
   BREAKPOINT AUDIT: iPhone 14/15 (390px)
   ============================================== */
@media (min-width: 376px) and (max-width: 414px) {
  .E-home-camps-section {
    padding: 24px 14px !important;
  }

  .E-fecha-selector__item {
    max-width: 130px !important;
  }

  .E-page-hero__title {
    font-size: 1.4rem !important;
  }
}

/* ==============================================
   BREAKPOINT AUDIT: iPad / Tablet (768px)
   Ensure 2-column layouts work properly
   ============================================== */
@media (min-width: 481px) and (max-width: 768px) {
  /* Camp cards: 2-column grid */
  .view-selector-en-inicio .view-content,
  .view-lista-de-campamentos-por-categoria .view-content {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* News cards: 2-column */
  .view-noticias-de-inicio .item-list ul {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ==============================================
   BREAKPOINT AUDIT: iPad Pro / Small laptop (1024px)
   ============================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .E-home-camps-section {
    padding: 40px 24px;
  }

  .E-camp-catalog {
    padding: 100px 16px 40px;
  }

  /* Camp cards: 2-column on tablets */
  .view-selector-en-inicio .view-content,
  .view-lista-de-campamentos-por-categoria .view-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Sticky enroll bar: comfortable spacing */
  .E-fecha-selector__item {
    max-width: 180px;
  }

  .E-fecha-selector__title {
    font-size: 0.8rem;
  }

  .E-fecha-selector__price {
    font-size: 0.85rem;
  }
}

/* ==============================================
   BREAKPOINT AUDIT: Full HD Desktop (1920px)
   ============================================== */
@media (min-width: 1400px) {
  .E-home-camps-section {
    max-width: 1200px;
    margin: 0 auto;
  }

  .E-camp-catalog {
    max-width: 1400px;
  }

  /* Camp cards: 3-column on large screens */
  .view-selector-en-inicio .view-content,
  .view-lista-de-campamentos-por-categoria .view-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  .E-home-letter__inner {
    max-width: 900px;
  }

  .E-home-news__inner {
    max-width: 1200px;
  }
}

/* ==============================================
   RESPONSIVE IMAGES: Ensure no overflow
   ============================================== */
img {
  max-width: 100%;
  height: auto;
}

/* Background-image divs must not overflow */
[style*="background-image"] {
  background-size: cover;
  background-position: center;
}

/* ==============================================
   RESPONSIVE IFRAMES: Prevent overflow
   ============================================== */
iframe {
  max-width: 100%;
}

/* Inscription form styles moved to inscription-form.css */

/* Mobile: date chips horizontal scroll */
@media (max-width: 767px) {
  .E-camp-filter__chips {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .E-camp-filter__chips::-webkit-scrollbar { display: none; }
  .E-camp-filter__chip {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
  }
  /* Date selector sticky: scroll horizontal */
  .E-fecha-selector__list {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start !important;
  }
  .E-fecha-selector__list::-webkit-scrollbar { display: none; }
  .E-fecha-selector__item {
    min-width: 130px !important;
    flex-shrink: 0 !important;
  }
  .E-fecha-selector__card .G-boton--primario,
  .E-fecha-selector__card button,
  .E-fecha-selector__card input[type="submit"] {
    white-space: nowrap !important;
    font-size: 11px !important;
    padding: 6px 12px !important;
  }
}

/* Mobile: carousel prev/next buttons more visible */
@media (max-width: 767px) {
  .E-gallery-carousel__btn,
  .E-activities-carousel__btn {
    width: 36px !important;
    height: 36px !important;
    border: 1.5px solid #8BA841 !important;
    color: #8BA841 !important;
    background: #fff !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
  }
  .E-gallery-carousel__btn:disabled,
  .E-activities-carousel__btn:disabled {
    border-color: #ddd !important;
    color: #ccc !important;
    box-shadow: none !important;
  }
}

/* Mobile: hide carousel buttons, show swipe hint */
@media (max-width: 767px) {
  .E-gallery-carousel__header,
  .E-activities-carousel__header {
    position: relative;
  }
  .E-gallery-carousel__nav,
  .E-activities-carousel__nav {
    display: none !important;
  }
  /* Swipe hint: appears briefly then fades */
  .E-gallery-carousel__track::after,
  .E-activities-carousel__track::after {
    content: 'Desliza para ver más →';
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 11px;
    color: rgba(0,0,0,0.35);
    font-family: 'Inter', sans-serif;
    pointer-events: none;
    animation: swipeHintFade 4s ease forwards;
  }
  .E-gallery-carousel,
  .E-activities-carousel {
    position: relative;
  }
}
@keyframes swipeHintFade {
  0%, 60% { opacity: 1; }
  100% { opacity: 0; }
}

/* Mobile: fix Seleccionar button overflow */
@media (max-width: 767px) {
  .E-fecha-selector__card .G-boton--primario,
  .E-fecha-selector__card .G-boton--auxiliar,
  .E-fecha-selector__cta .G-boton--primario,
  .E-fecha-selector__cta button,
  .E-sticky-enroll .G-boton--primario,
  .E-sticky-enroll button[type="submit"] {
    font-size: 10px !important;
    padding: 5px 8px !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }
}

/* Mobile: 3+ date cards - ultra compact buttons */
@media (max-width: 767px) {
  .E-fecha-selector__list[data-items="3"] .E-fecha-selector__card .G-boton--primario,
  .E-fecha-selector__list[data-items="3"] .E-fecha-selector__card .G-boton--auxiliar,
  .E-fecha-selector__list[data-items="3"] .E-fecha-selector__cta .G-boton--primario,
  .E-fecha-selector__list[data-items="3"] .G-boton--primario,
  .E-fecha-selector__list[data-items="3"] button {
    font-size: 9px !important;
    padding: 4px 6px !important;
    letter-spacing: 0 !important;
  }
  /* Also reduce card padding and title font */
  .E-fecha-selector__list[data-items="3"] .E-fecha-selector__card,
  .E-fecha-selector__list[data-items="3"] .E-fecha-selector__item > div {
    padding: 8px 6px 10px !important;
  }
  .E-fecha-selector__list[data-items="3"] .E-fecha-selector__title,
  .E-fecha-selector__list[data-items="3"] .E-fecha-selector__card strong,
  .E-fecha-selector__list[data-items="3"] .E-fecha-selector__card b {
    font-size: 11px !important;
  }
  .E-fecha-selector__list[data-items="3"] .E-fecha-selector__price,
  .E-fecha-selector__list[data-items="3"] .E-fecha-selector__card .field--name-field-precio {
    font-size: 11px !important;
  }
}

/* Mobile: date cards always scrollable horizontally */
@media (max-width: 500px) {
  .E-sticky-enroll .E-fecha-selector__list,
  .E-sticky-enroll ul {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .E-sticky-enroll .E-fecha-selector__list::-webkit-scrollbar,
  .E-sticky-enroll ul::-webkit-scrollbar { display: none; }
  .E-sticky-enroll .E-fecha-selector__item,
  .E-sticky-enroll li {
    flex: 0 0 auto !important;
    min-width: 130px !important;
    max-width: 160px !important;
  }
}
