/* Global: ocultar barras de scroll y evitar scroll horizontal */
html, body{ overflow-x: hidden; }
/* Firefox */
html{ scrollbar-width: none; }
/* IE/Edge Legacy */
body{ -ms-overflow-style: none; }
/* WebKit (Chrome, Safari, Edge Chromium) */
html::-webkit-scrollbar, body::-webkit-scrollbar{ width: 0; height: 0; }

/* Eliminado: reglas de reducción condicional del logo para tamaño consistente */

/* === Footer como en indice.html (estilo estiloindice.css) === */
.page-footer{
  /* Imagen de fondo (restaurada) con full-bleed */
  position: relative;
  background-color: #272727 !important; /* fallback */
  background-image: url('../images/vistalluny.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  color: #ffffff !important; /* texto blanco */
  margin-left: calc(50% - 50vw) !important; /* ocupar todo el ancho */
  margin-right: calc(50% - 50vw) !important;
  width: 100vw !important;
}
.page-footer::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.35) 100%);
  z-index: 0;
  display: block !important;
  pointer-events: none; /* no intercepta clics */
}
.page-footer .page-footer-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  align-items: center;
  position: relative; /* por encima del overlay */
  z-index: 1;
}
.footer-left h3{ margin: 0; font-size: 1.1rem; color: #ffffff; }
.footer-left p{ margin: 4px 0 0; color: #ffffff; }
.footer-center{ text-align: center; font-size: 0.9rem; }
.footer-center p{ margin: 6px 0; }
.page-footer a{ color: #98DFC6 !important; text-decoration: none; }
.page-footer a:hover{ color: #8f8f8f !important; }
@media (max-width: 768px){
  .page-footer .page-footer-inner{ grid-template-columns: 1fr; text-align: center; }
  .footer-left{ order: 1; }
  .footer-center{ order: 2; }
}

/* Forzar blanco en el bloque central solicitado */
.footer-center, .footer-center p{ color: #ffffff !important; font-weight: 700; }
.footer-center a{ color: #ffffff !important; text-decoration: underline !important; }
.footer-center a:visited{ color: #ffffff !important; }
.footer-center a:active{ color: #ffffff !important; }
.footer-center a:hover{ color: #ffffff !important; text-decoration: underline; }

/* === Aside como en indice.html === */
.page-aside{
  position: relative;
  background: url('../images/vistalluny.jpg') no-repeat center/cover;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  min-height: 400px;
  color: var(--main-grey-color, #f2f2f2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
}

@media (max-width: 768px){
  .page-footer .page-footer-container{ max-width: 90% !important; }
}

/* === Grid responsive simple para index (2 y 3 columnas) === */
.row{ display:flex; flex-wrap: wrap; gap: 16px; }
.row > .column{ flex: 1 1 100%; }
.row > .card{ flex: 1 1 100%; }

/* >= 768px: dos columnas en el primer bloque y tres en el bloque de actos */
@media (min-width: 768px){
  .row > .column{ flex: 1 1 calc(50% - 16px); }
  .row > .card{ flex: 1 1 calc(33.333% - 16px); }
}

/* === Formulario de contacto moderno === */
.img-half{ width: 50%; height: auto; display: block; margin: 0 auto; }
@media (max-width: 768px){
  .img-half{ width: 100%; }
}

/* Ajustes móviles adicionales */
@media (max-width: 480px){
  .row{ gap: 12px; }
  /* Altura más cómoda del mapa en móviles */
  .row iframe{ height: 360px !important; }
  /* Legibilidad base */
  body{ font-size: 16px; line-height: 1.6; }
  /* Objetivos táctiles mayores en la navegación */
  .page-header a{ font-size: 1rem; padding: 8px; }
  .bt-acceso{ font-size: 1rem; padding: 12px 16px; }
}

/* Botones sutiles en el front */
.btn, a.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text, #1f2937) !important;
  border: 1px solid var(--border, #e5e7eb);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}
.btn:hover, a.btn:hover{ background:#f8fafc; border-color:#d1d5db; box-shadow: 0 2px 6px rgba(0,0,0,0.08); text-decoration: none; }
.btn:active, a.btn:active{ box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.btn.primary, a.btn.primary{ color: #fff !important; background: var(--brand, #2e7d32); border-color: #2e7d32; }
.btn.primary:hover, a.btn.primary:hover{ background: var(--brand-600, #1b5e20); border-color: var(--brand-600, #1b5e20); }

/* Botón "veure més" más sutil, usando variante clara */
.bt-viewmore{ background: transparent; border: 0; padding: 0; }
.bt-viewmore a, a.bt-viewmore{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text, #1f2937) !important;
  border: 1px solid var(--border, #e5e7eb);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
  margin-top: 6px;
}
.bt-viewmore a::after, a.bt-viewmore::after{ content: '›'; font-size: 1.1em; line-height: 1; }
.bt-viewmore a:hover, a.bt-viewmore:hover{ background:#f8fafc; border-color:#d1d5db; box-shadow: 0 2px 6px rgba(0,0,0,0.08); text-decoration: none; }
.bt-viewmore a:active, a.bt-viewmore:active{ box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.bt-viewmore a:focus-visible, a.bt-viewmore:focus-visible{ outline: none; box-shadow: 0 0 0 3px rgba(46,125,50,0.15); }

/* === Tipografías fluidas (mejor legibilidad entre móvil y desktop) === */
h1{ font-size: clamp(1.4rem, 2vw + 1rem, 2.2rem); }
h2{ font-size: clamp(1.1rem, 1.4vw + 0.8rem, 1.6rem); }
h3{ font-size: clamp(1rem, 1.2vw + 0.6rem, 1.3rem); }
p, li{ font-size: clamp(0.95rem, 0.5vw + 0.8rem, 1rem); }

/* === Menú móvil (hamburger) === */
.bt-acceso{ display: none !important; }
.menu-toggle{
  display: none;
  background: transparent;
  border: 0;
  font-size: 1.25rem;
  padding: 8px;
  cursor: pointer;
}
.menu-toggle .hamburger{
  display: none; width: 22px; height: 2px; background: currentColor; position: relative; border-radius: 2px;
}
.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after{
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
}
.menu-toggle .hamburger::before{ top: -6px; }
.menu-toggle .hamburger::after{ top: 6px; }
.sr-only{ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

@media (max-width: 768px){
  .menu-toggle{ display: inline-flex; align-items: center; justify-content: center; color: #1f2937; margin-left: auto; position: relative; z-index: 11; }
  .menu-toggle i{ font-size: 1.4rem; display: inline-block; }
  /* Si Font Awesome no carga, mostramos el fallback */
  .menu-toggle .hamburger{ display: inline-block; margin-right: 6px; }
  /* Ocultar por defecto la lista de navegación en móvil, forzando sobre main.css */
  .page-header ul{ display: none !important; }
  .page-header .nav-links{ position: absolute; left: 0; right: 0; top: 56px; background: #fff; border-bottom: 1px solid var(--border, #e5e7eb); box-shadow: 0 4px 8px rgba(0,0,0,0.08); padding: 8px 16px; flex-direction: column; gap: 8px; z-index: 10; }
  /* Mostrar cuando el botón abre el menú */
  body.nav-open .page-header ul{ display: flex !important; }
  .page-header nav{ position: relative; }
  .bt-acceso{ order: 3; width: auto; }
}

/* Ajustes de tarjetas en móvil para mejor lectura */
@media (max-width: 768px){
  .card{ padding: 12px; }
  .card h4{ font-size: 1rem; }
}

/* === Separadores suaves para columnas sin .card === */
.row > .column:not(.card){
  background: #ffffff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
/* Separación entre título, imagen y listas dentro de las columnas */
.row > .column h2{ margin-top: 6px; margin-bottom: 10px; }
.row > .column img{
  display: block;
  margin: 0 auto 8px;
  max-height: 250px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.row > .column ul{ margin: 0; padding-left: 18px; }
.row > .column ul li + li{ margin-top: 6px; }
.contact-form{
  background: #ffffff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06));
  padding: 16px;
}
.contact-form label{
  display:block;
  font-weight: 600;
  margin: 10px 0 6px;
}
.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-form textarea{ min-height: 160px; resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus{
  outline: none;
  border-color: var(--brand, #2e7d32);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}
.contact-form input[type="submit"]{
  appearance: none;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  background: #ffffff;
  color: var(--text, #1f2937);
  border: 1px solid var(--border, #e5e7eb);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}
.contact-form input[type="submit"]:hover{ background:#f8fafc; border-color:#d1d5db; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.contact-form input[type="submit"]:active{ box-shadow: 0 1px 3px rgba(0,0,0,0.06); }

/* Ayudas responsivas menores */
@media (max-width: 480px){
  .contact-form{ padding: 12px; }
}

/* === Galería pública para activitats === */
.gallery-front{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 6px 0 10px;
}
.gallery-front img{
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
}
@media (max-width: 768px){
  .gallery-front{ grid-template-columns: repeat(2, 1fr); }
}

/* === Filtros de galeria - estilo sutil === */
.filter-row{ gap: 8px; align-items: flex-end; }
.filter-row label{ display:flex; flex-direction: column; gap:6px; }
.filter-input, .filter-date{
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  min-width: 220px;
}
.filter-date{ min-width: 160px; }
.filter-row .btn#filter-reset{
  background: #f1f5f9;
  color: var(--text, #1f2937);
  border-color: #d1d5db;
}
.filter-row .btn#filter-reset:hover{ background:#e8eef5; border-color:#c7ccd3; }

