/**
 * Homepage Responsive Enhancement - LayosCamp
 * Fixes mobile layout issues and ensures brand consistency
 * for node--inicio.html.twig (original homepage template)
 */

/* ========================================
   HERO SECTION - Clean photo, no green overlay on mobile
   ======================================== */
.G-fondo--full.G-max--100.E-curva,
.G-fondo--full.G-max--100 {
  min-height: 85vh;
  background-size: cover;
  background-position: center;
  position: relative;
}

.G-fondo--pantalla-completa-cabecera {
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 60px;
}

.E-home-hero__content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 120px 20px 40px;
}

/* Mobile: remove green overlay, hide video button, show clean photo */
@media (max-width: 768px) {
  .page-node-type-inicio .G-fondo--pantalla-completa-cabecera.G-fondo--degra-abajo {
    background-image: none !important;
    background: linear-gradient(0deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 50%) !important;
  }

  .page-node-type-inicio .E-home-hero__content {
    padding: 60px 20px 24px;
  }

  /* Hide the video button on mobile — keep on desktop */
  .page-node-type-inicio .E-hero-play-btn {
    display: none !important;
  }

  /* Make scroll arrow more visible without green overlay */
  .page-node-type-inicio .E-home-hero__scroll {
    display: block;
  }

  .page-node-type-inicio .G-fondo--full.G-max--100 {
    min-height: 60vh;
  }

  .page-node-type-inicio .G-fondo--pantalla-completa-cabecera {
    min-height: 60vh;
    padding-bottom: 30px;
  }
}

/* ========================================
   CAMP SELECTOR SECTION
   ======================================== */
.E-home-camps-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px;
  text-align: center;
}

.E-home-camps-section__intro {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

/* Title */
.E-home-camps__title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #2D5016;
  line-height: 1.2;
  margin: 0 0 20px;
}

/* Text */
.E-home-camps__text {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
  margin: 0 0 12px;
}

/* CTA wrapper */
.E-home-camps__cta-wrapper {
  margin-top: 28px;
}

/* CTA button — big, inviting, brand green */
.E-home-camps__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: #8BA841;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  border: none;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 16px rgba(139, 168, 65, 0.3);
}

.E-home-camps__cta:hover {
  background: #6B8A2F;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(107, 138, 47, 0.35);
}

.E-home-camps__cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(107, 138, 47, 0.2);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .E-home-camps-section {
    padding: 32px 20px;
  }

  .E-home-camps__title {
    font-size: 1.4rem;
  }

  .E-home-camps__text {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .E-home-camps__cta {
    padding: 14px 28px;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
    border-radius: 10px;
  }

  .E-home-camps__cta-wrapper {
    margin-top: 20px;
  }
}

/* ========================================
   CAMP CARDS in selector view
   ======================================== */
.view-selector-en-inicio .view-content,
.view-lista-de-campamentos-por-categoria .view-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.view-selector-en-inicio .views-row,
.view-lista-de-campamentos-por-categoria .views-row {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.view-selector-en-inicio .views-row:hover,
.view-lista-de-campamentos-por-categoria .views-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.view-selector-en-inicio .views-row .G-fondo--full,
.view-selector-en-inicio .views-row .E-img-por-defecto {
  aspect-ratio: 16 / 10;
  min-height: 200px;
  border-radius: 16px 16px 0 0;
}

.view-selector-en-inicio .views-row .node__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}

.view-selector-en-inicio .views-row h2,
.view-selector-en-inicio .views-row .node__title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px;
  line-height: 1.3;
}

.view-selector-en-inicio .views-row .field--name-body,
.view-selector-en-inicio .views-row .field--type-text-with-summary {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #666;
  flex: 1;
  margin-bottom: 16px;
}

/* Price tag inside camp card image */
.E-campamentos-card-precio {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(139, 168, 65, 0.92);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
}

/* CTA button in camp card */
.view-selector-en-inicio .views-row a[href*="inscripcion"],
.view-selector-en-inicio .views-row .btn,
.view-selector-en-inicio .views-row .E-boton {
  display: inline-block;
  background: #8BA841;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: background 0.2s ease;
  margin-top: auto;
}

.view-selector-en-inicio .views-row a[href*="inscripcion"]:hover,
.view-selector-en-inicio .views-row .btn:hover {
  background: #6B8A2F;
}

/* ========================================
   LETTER TO PARENTS
   ======================================== */
.E-home-letter {
  background: linear-gradient(180deg, #FAFAF5 0%, #F0F4E8 100%);
  padding: 64px 24px;
  position: relative;
}

.E-home-letter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8BA841, #A4C256, #6B8A2F);
}

.E-home-letter__inner {
  display: flex;
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
  align-items: flex-start;
}

.E-home-letter__avatar {
  flex-shrink: 0;
}

.E-home-letter__avatar img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #8BA841;
  box-shadow: 0 4px 12px rgba(139, 168, 65, 0.2);
}

.E-home-letter__author {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #2D5016;
  margin: 0 0 4px;
}

.E-home-letter__role {
  font-size: 0.75rem;
  color: #8BA841;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin: 0 0 20px;
}

.E-home-letter__body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #444;
}

.E-home-letter__body h4,
.E-home-letter__body strong {
  color: #2D5016;
}

/* ========================================
   NEWS SECTION
   ======================================== */
.E-home-news {
  background-size: cover;
  background-position: center;
}

.E-home-news__overlay {
  background: linear-gradient(0deg, rgba(45, 80, 22, 0.85) 0%, rgba(45, 80, 22, 0.95) 100%);
  padding: 64px 24px;
}

.E-home-news__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.E-home-news__heading {
  color: #fff;
  text-align: center;
  margin-bottom: 40px;
}

.E-home-news__heading p {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

/* News teaser: ensure the <a> tag renders as block for background-image */
.E-noticia-teaser a.G-fondo--full {
  display: block;
  min-height: 260px;
}

/* ========================================
   RESPONSIVE - TABLET (768px)
   ======================================== */
@media (max-width: 768px) {
  .G-fondo--pantalla-completa-cabecera {
    min-height: 70vh;
  }

  .E-home-hero__content {
    padding: 100px 16px 32px;
  }

  .E-home-camps-section {
    padding: 32px 16px;
  }

  .view-selector-en-inicio .view-content,
  .view-lista-de-campamentos-por-categoria .view-content {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 8px;
  }

  .E-home-letter {
    padding: 40px 16px;
  }

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

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

  .E-home-letter__content {
    text-align: center;
  }

  .E-home-news__overlay {
    padding: 40px 16px;
  }

  .E-home-camps-section__intro h1 {
    font-size: 1.5rem;
  }
}

/* ========================================
   RESPONSIVE - NEWS CARDS: Compact grid on mobile
   ======================================== */
@media (max-width: 768px) {
  /* News list: 2-column grid */
  .view-noticias-de-inicio .item-list ul {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 8px;
    flex-wrap: unset !important;
    justify-content: unset !important;
  }

  /* Each news item: reset max-width from style.css (33.33%) */
  .view-noticias-de-inicio .item-list ul li {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Hide 5th and beyond items */
  .view-noticias-de-inicio .item-list ul li:nth-child(n+5) {
    display: none !important;
  }

  /* Reduce card min-height */
  .E-noticia-teaser a.G-fondo--full {
    min-height: 140px !important;
  }

  .E-noticia-teaser .G-fondo--degra-abajo-blanco {
    min-height: 140px !important;
  }

  /* Smaller title text */
  .E-noticia-teaser h2 {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
  }

  /* News section heading */
  .E-home-news__heading p {
    font-size: 1.2rem !important;
  }
}

/* Very small screens: even more compact news cards */
@media (max-width: 480px) {
  .view-noticias-de-inicio .item-list ul {
    gap: 8px !important;
  }

  .E-noticia-teaser a.G-fondo--full {
    min-height: 120px !important;
  }

  .E-noticia-teaser .G-fondo--degra-abajo-blanco {
    min-height: 120px !important;
  }

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

/* ========================================
   RESPONSIVE - SMALL MOBILE (480px)
   ======================================== */
@media (max-width: 480px) {
  .G-fondo--pantalla-completa-cabecera {
    min-height: 60vh;
  }

  .E-home-hero__content {
    padding: 80px 12px 24px;
  }

  .E-home-camps-section__intro {
    font-size: 14px;
  }

  .E-home-letter__body {
    font-size: 0.875rem;
  }

  .E-home-letter__author {
    font-size: 1.1rem;
  }
}

