/*
 * Espai d'Art – Remor.es
 * Estilos específicos que complementan index.css
 * Mantiene la paleta de colores: verde (#13FF18), azul (#1fb6d3), rosa (#C448EB)
 * Enfocado en tonos verdes y azules para artes visuales
 */

/* ======== Variables específicas ======== */
:root {
  --verde: #13FF18;
  --azul: #1fb6d3;
  --rosa: #C448EB;
  --verde-t: #13FF1870;
  --azul-t: #1FB6D36E;
  --rosa-t: #C448EB85;
}

/* ======== Estilos específicos del hero ======== */
.hero-content {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px) saturate(1.2);
  border: 2px solid rgba(19, 255, 24, 0.3);
  border-radius: 2rem;
  box-shadow: 
    0 20px 60px rgba(19, 255, 24, 0.2),
    0 8px 32px rgba(31, 182, 211, 0.15);
  padding: 2rem 1.5rem;
  width: 90%;
  max-width: 700px !important;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin-top: 50px;
  margin-bottom: 50px;
  margin-left: auto;
  margin-right: auto;
  min-height: auto;
}

.logo-remor-hero {
  filter: drop-shadow(0 6px 20px rgba(19, 255, 24, 0.4));
  transition: transform 0.3s ease;
}

.logo-remor-hero:hover {
  transform: scale(1.05);
}

/* ======== Botones específicos ======== */
.boton-grad {
  margin: 0.5rem;
  transition: all 0.3s ease;
}

.boton-grad:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(19, 255, 24, 0.35);
}

/* ======== Sección sobre ======== */
.sobre-grid {
  background: linear-gradient(135deg, #ffffff 0%, #f8fffa 100%) !important;
  border: 2px solid rgba(19, 255, 24, 0.2) !important;
  box-shadow: 
    0 8px 32px rgba(19, 255, 24, 0.1),
    0 4px 16px rgba(31, 182, 211, 0.1) !important;
  
  /* Layout moderno y responsive con márgenes */
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 2rem !important;
  align-items: center !important;
  padding: 2rem !important;
  width: 80% !important;
  max-width: 1000px !important;
  margin: 2rem auto !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border-radius: 1.5rem !important;
}

.sobre-texto {
  padding: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Contenedor de la imagen */
.sobre-img {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.sobre-texto h2 {
  background: linear-gradient(90deg, var(--verde), var(--azul));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.2;
}

.sobre-texto p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #333;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

/* ======== Carrusel moderno y responsive ======== */
.espai-art-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 300px;
  aspect-ratio: 16/10;
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow: 
    0 12px 40px rgba(19, 255, 24, 0.15),
    0 6px 20px rgba(31, 182, 211, 0.1);
  border: 2px solid rgba(19, 255, 24, 0.2);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  box-sizing: border-box;
}

.espai-art-carousel:active {
  cursor: grabbing;
}

.espai-art-carousel .sobre-carrusel-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  border-radius: 1.6rem;
  z-index: 1;
}

.espai-art-carousel .sobre-carrusel-img.active {
  opacity: 1;
  z-index: 2;
}

/* Dots del carrusel */
.sobre-carrusel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.sobre-carrusel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid var(--verde);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sobre-carrusel-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--verde);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.sobre-carrusel-dot:hover {
  background: var(--verde-t);
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(19, 255, 24, 0.4);
}

.sobre-carrusel-dot.active {
  background: var(--verde);
  box-shadow: 0 2px 8px var(--verde);
  transform: scale(1.1);
}

.sobre-carrusel-dot.active::before {
  width: 100%;
  height: 100%;
}

/* Overlay gradiente */
.img-gradient-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
  pointer-events: none;
  z-index: 5;
}

/* ======== Responsive moderno ======== */
@media (max-width: 767px) {
  .sobre-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 1.5rem !important;
    width: 90% !important;
    max-width: 500px !important;
    margin: 1.5rem auto !important;
    border-radius: 1rem !important;
  }
  
  .sobre-texto {
    padding: 0.5rem;
  }
  
  .sobre-img {
    padding: 0.5rem;
  }
  
  .espai-art-carousel {
    min-height: 250px;
    aspect-ratio: 4/3;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .sobre-grid {
    width: 85% !important;
    max-width: 800px !important;
    margin: 2rem auto !important;
    padding: 2rem !important;
  }
  
  .espai-art-carousel {
    min-height: 350px;
    aspect-ratio: 16/10;
  }
}

@media (min-width: 1024px) and (max-width: 1399px) {
  .sobre-grid {
    width: 80% !important;
    max-width: 900px !important;
    margin: 2.5rem auto !important;
  }
  
  .espai-art-carousel {
    min-height: 400px;
    aspect-ratio: 16/10;
  }
}

@media (min-width: 1400px) {
  .sobre-grid {
    width: 80% !important;
    max-width: 1000px !important;
    margin: 3rem auto !important;
  }
  
  .espai-art-carousel {
    min-height: 450px;
    aspect-ratio: 16/10;
    max-width: 450px;
  }
}

/* ======== Galería ======== */
.galeria h2 {
  background: linear-gradient(90deg, var(--verde), var(--azul), var(--rosa));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.galeria-carrusel-img {
  border: 2px solid rgba(19, 255, 24, 0.1);
  transition: all 0.3s ease;
}

.galeria-carrusel-img:hover {
  border-color: var(--verde);
  box-shadow: 0 8px 25px rgba(19, 255, 24, 0.3);
}

.galeria-prev,
.galeria-next {
  background: linear-gradient(135deg, var(--blanco), #f8fffa);
  border: 2px solid rgba(19, 255, 24, 0.2);
  transition: all 0.3s ease;
}

.galeria-prev:hover,
.galeria-next:hover {
  background: linear-gradient(135deg, var(--verde), var(--azul));
  color: var(--blanco);
  border-color: var(--verde);
  transform: scale(1.1);
}

.galeria-ver-mas {
  background: linear-gradient(90deg, var(--verde), var(--azul));
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.galeria-ver-mas:hover {
  background: linear-gradient(90deg, var(--azul), var(--rosa));
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(19, 255, 24, 0.4);
}

/* ======== Actividades ======== */
.actividades h2 .grad-text {
  background: linear-gradient(90deg, var(--verde), var(--azul), var(--rosa));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.categoria-tab {
  border: 2px solid rgba(19, 255, 24, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.categoria-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(19, 255, 24, 0.1), transparent);
  transition: left 0.5s ease;
}

.categoria-tab:hover::before {
  left: 100%;
}

.categoria-tab.active {
  background: linear-gradient(90deg, var(--verde), var(--azul));
  border-color: var(--verde);
  transform: translateY(-2px);
}

.actividad-tag {
  border: 2px solid rgba(19, 255, 24, 0.2);
  transition: all 0.3s ease;
}

.actividad-tag:hover {
  border-color: var(--azul);
  transform: translateY(-1px);
}

.actividad-tag.active {
  background: linear-gradient(90deg, var(--verde-t), var(--azul-t));
  border-color: var(--azul);
  transform: scale(1.05);
}

/* ======== Ficha de actividad ======== */
.actividad-ficha {
  border: 2px solid rgba(19, 255, 24, 0.2);
  box-shadow: 
    0 12px 40px rgba(19, 255, 24, 0.15),
    0 6px 20px rgba(31, 182, 211, 0.1);
  transition: all 0.3s ease;
}

.actividad-ficha:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 20px 60px rgba(19, 255, 24, 0.2),
    0 10px 30px rgba(31, 182, 211, 0.15);
}

#actividad-ficha-titulo {
  background: linear-gradient(90deg, var(--verde), var(--azul), var(--rosa));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ======== Efectos de hover y animaciones ======== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.hero-content:hover {
  animation: float 3s ease-in-out infinite;
}

/* ======== Efectos específicos para artes visuales ======== */
@keyframes paintbrush {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(5deg) scale(1.1); }
  50% { transform: rotate(0deg) scale(1); }
  75% { transform: rotate(-5deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

.sobre-texto h2:hover {
  animation: paintbrush 2s ease-in-out infinite;
}

/* ======== Galería específica de Espai d'Art ======== */
.galeria-simple {
  padding: 2rem 0 !important;
}

.galeria-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 2rem !important;
  margin-bottom: 3rem !important;
  padding: 0 1rem !important;
}

.galeria-item {
  position: relative !important;
  border-radius: 1rem !important;
  overflow: hidden !important;
  background: #fff !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  aspect-ratio: 1/1 !important;
}

.galeria-item:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

.galeria-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  filter: brightness(0.9) !important;
}

.galeria-item:hover img {
  transform: scale(1.1) !important;
  filter: brightness(1.1) !important;
}

/* Overlay elegante del CodePen */
.galeria-item::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(
    45deg,
    rgba(19, 255, 24, 0.1),
    rgba(31, 182, 211, 0.1)
  ) !important;
  opacity: 0 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 2 !important;
}

.galeria-item:hover::before {
  opacity: 1 !important;
}

/* Efecto de borde que aparece */
.galeria-item::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  border: 2px solid transparent !important;
  border-radius: 1rem !important;
  background: linear-gradient(45deg, var(--verde), var(--azul)) border-box !important;
  -webkit-mask: 
    linear-gradient(#fff 0 0) padding-box, 
    linear-gradient(#fff 0 0) !important;
  -webkit-mask-composite: destination-out !important;
  mask-composite: exclude !important;
  opacity: 0 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 3 !important;
}

.galeria-item:hover::after {
  opacity: 1 !important;
}

/* Responsive para la galería de Espai d'Art */
@media (max-width: 767px) {
  .galeria-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
    padding: 0 0.5rem !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .galeria-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
  }
}

@media (min-width: 1024px) {
  .galeria-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2rem !important;
  }
}

/* ======== Botón de galería mejorado ======== */
.galeria-boton-container {
  text-align: center !important;
  margin-top: 2rem !important;
}

.galeria-ver-mas {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  background: linear-gradient(45deg, var(--verde), var(--azul)) !important;
  color: white !important;
  padding: 1rem 2rem !important;
  border-radius: 3rem !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 8px 25px rgba(19, 255, 24, 0.3) !important;
  position: relative !important;
  overflow: hidden !important;
}

.galeria-ver-mas::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
  transition: left 0.5s ease !important;
}

.galeria-ver-mas:hover::before {
  left: 100% !important;
}

.galeria-ver-mas:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 15px 35px rgba(19, 255, 24, 0.4) !important;
}

.galeria-ver-mas i {
  font-size: 1.2rem !important;
  transition: transform 0.3s ease !important;
}

.galeria-ver-mas:hover i {
  transform: scale(1.1) !important;
}

/* ======== Mejoras en el carrusel ======== */
.espai-art-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 400px;
  aspect-ratio: 16/10;
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow: 
    0 12px 40px rgba(19, 255, 24, 0.15),
    0 6px 20px rgba(31, 182, 211, 0.1);
  border: 2px solid rgba(19, 255, 24, 0.2);
  transition: all 0.3s ease;
}

.espai-art-carousel:hover {
  box-shadow: 
    0 16px 50px rgba(19, 255, 24, 0.2),
    0 8px 30px rgba(31, 182, 211, 0.15);
}

.espai-art-carousel .sobre-carrusel-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  border-radius: 1.6rem;
  z-index: 1;
}

.espai-art-carousel .sobre-carrusel-img.active {
  opacity: 1;
  z-index: 2;
}

/* Dots del carrusel mejorados */
.sobre-carrusel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 10;
}

.sobre-carrusel-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid var(--verde);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.sobre-carrusel-dot::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(19, 255, 24, 0.3), transparent);
  transition: left 0.5s ease;
}

.sobre-carrusel-dot:hover::before {
  left: 100%;
}

.sobre-carrusel-dot:hover {
  background: var(--verde-t);
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(19, 255, 24, 0.4);
}

.sobre-carrusel-dot.active {
  background: var(--verde);
  border-color: var(--verde);
  box-shadow: 0 4px 15px var(--verde);
  transform: scale(1.1);
}

.sobre-carrusel-dot.active::before {
  width: 100%;
  height: 100%;
}

/* Overlay gradiente mejorado */
.img-gradient-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(
    transparent,
    rgba(0, 0, 0, 0.2) 20%,
    rgba(0, 0, 0, 0.4) 60%,
    rgba(0, 0, 0, 0.6)
  );
  pointer-events: none;
  z-index: 5;
}

/* ======== Responsive mejorado ======== */
@media (max-width: 767px) {
  .espai-art-carousel {
    min-height: 250px;
    aspect-ratio: 4/3;
  }
  
  .sobre-carrusel-dots {
    bottom: 1rem;
  }
  
  .sobre-carrusel-dot {
    width: 12px;
    height: 12px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .espai-art-carousel {
    min-height: 350px;
    aspect-ratio: 16/10;
  }
}

@media (min-width: 1024px) and (max-width: 1399px) {
  .espai-art-carousel {
    min-height: 400px;
    aspect-ratio: 16/10;
  }
}

@media (min-width: 1400px) {
  .espai-art-carousel {
    min-height: 450px;
    aspect-ratio: 16/10;
    max-width: 500px;
  }
}

/* ======== Efectos adicionales ======== */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.espai-art-carousel:hover .sobre-carrusel-dot.active {
  animation: pulse 2s infinite;
}

/* ======== Transiciones suaves ======== */
* {
  transition: all 0.3s ease;
}

.galeria-item,
.filtro-btn,
.sobre-carrusel-dot {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======== GALERÍA CON ESTILOS DEL CODEPEN ======== */
@import url('https://fonts.googleapis.com/css?family=Lobster');

.galeria-codepen {
  margin: 0 auto;
  padding: 1.5rem;
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.galeria-codepen ul {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  text-align: center;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.galeria-codepen li {
  list-style-type: none;
  margin: 0;
  display: flex;
  justify-content: center;
}

.galeria-codepen .image {
  width: 150px;
  height: 150px;
  transform: rotate(45deg);
  position: relative;
}

.galeria-codepen figure {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.galeria-codepen img {
  transform: rotate(-45deg);
  margin-top: -60px;
  margin-left: -60px;
  height: 190%;
  width: 190%;
  transition: 0.3s ease;
  filter: none;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.galeria-codepen .image img:hover {
  filter: none;
  transform: rotate(-45deg) scale(1.1);
}

.galeria-codepen .first {
  margin-top: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.galeria-codepen .second {
  margin-top: 1rem;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.galeria-codepen .third {
  margin-top: 1rem;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ======== Botón de galería mejorado ======== */
.galeria-boton-container {
  text-align: center;
  margin-top: 2rem;
}

.galeria-ver-mas {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(45deg, var(--verde), var(--azul));
  color: white;
  padding: 1rem 2rem;
  border-radius: 3rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px rgba(19, 255, 24, 0.3);
  position: relative;
  overflow: hidden;
}

.galeria-ver-mas::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.galeria-ver-mas:hover::before {
  left: 100%;
}

.galeria-ver-mas:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(19, 255, 24, 0.4);
}

.galeria-ver-mas i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.galeria-ver-mas:hover i {
  transform: scale(1.1);
}

/* ======== RESPONSIVE COMPLETO PARA MÓVIL ======== */

/* ======== Hero Section ======== */
@media (max-width: 767px) {
  .hero-content {
    margin: 2rem auto;
    padding: 1.5rem 1rem;
    width: 95%;
    max-width: 100%;
    margin-top: 50px;
    margin-bottom: 50px;
  }
  
  .hero-content h1 {
    font-size: 1.8rem;
    line-height: 1.3;
  }
  
  .hero-content p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .boton-grad {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    margin: 0.3rem;
  }
}

/* ======== Sobre Section ======== */
@media (max-width: 767px) {
  .sobre-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    width: 90%;
    max-width: 90%;
    margin: 0;
    border-radius: 1rem;
    overflow: hidden;
  }
  
  .sobre-texto {
    padding: 0.5rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .sobre-texto h2 {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    margin-bottom: 1rem;
    line-height: 1.3;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  
  .sobre-texto p {
    font-size: clamp(0.85rem, 3vw, 1rem);
    line-height: 1.5;
    text-align: justify;
    margin-bottom: 0.8rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  
  .sobre-img {
    padding: 0.5rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
  }
  
  .espai-art-carousel {
    min-height: 250px;
    aspect-ratio: 4/3;
    border-radius: 1rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
  }
  
  .sobre-carrusel-dots {
    bottom: 0.8rem;
    gap: 0.4rem;
  }
  
  .sobre-carrusel-dot {
    width: 10px;
    height: 10px;
  }
}

/* ======== Galería Section ======== */
@media (max-width: 767px) {
  .galeria h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
  }
  
  .galeria-codepen {
    padding: 1rem;
    max-width: 100%;
  }
  
  .galeria-codepen ul {
    gap: 1rem;
  }
  
  .galeria-codepen .image {
    width: 120px;
    height: 120px;
  }
  
  .galeria-codepen img {
    margin-top: -50px;
    margin-left: -50px;
  }
  
  .galeria-boton-container {
    margin-top: 1.5rem;
  }
  
  .galeria-ver-mas {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}

/* ======== Actividades Section ======== */
@media (max-width: 767px) {
  .actividades {
    padding: 2rem 1rem;
  }
  
  .actividades h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    text-align: center;
  }
  
  .actividades-categorias {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
  }
  
  .categoria-tab {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 1.5rem;
    text-align: center;
  }
  
  .actividades-etiquetas {
    margin-bottom: 2rem;
  }
  
  /* Ocultar etiquetas no activas */
  .etiquetas-tabs {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }
  
  .etiquetas-tabs.active {
    display: flex;
  }
  
  .actividad-tag {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    border-radius: 1rem;
    white-space: nowrap;
  }
  
  .actividad-ficha {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 1rem;
  }
  
  .actividad-ficha-media {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .actividad-ficha-media img {
    width: 100%;
    height: auto;
    border-radius: 0.8rem;
  }
  
  .actividad-ficha-texto {
    text-align: center;
  }
  
  .actividad-ficha-texto h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
  
  .actividad-ficha-texto p {
    font-size: 0.9rem;
    line-height: 1.6;
  }
}

/* ======== Móvil muy pequeño ======== */
@media (max-width: 480px) {
  .hero-content {
    margin: 1.5rem auto;
    padding: 1rem 0.75rem;
    width: 98%;
  }
  
  .hero-content h1 {
    font-size: 1.5rem;
  }
  
  .hero-content p {
    font-size: 0.85rem;
  }
  
  .boton-grad {
    padding: 0.7rem 1.2rem;
    font-size: 0.8rem;
    margin: 0.2rem;
  }
  
  .sobre-grid {
    padding: 1rem;
    gap: 1rem;
    width: 90% !important;
    max-width: 450px !important;
    margin: 1rem auto !important;
    border-radius: 0.8rem;
    overflow: hidden;
  }
  
  .sobre-texto {
    padding: 0.5rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .sobre-texto h2 {
    font-size: clamp(1.2rem, 6vw, 1.5rem);
    line-height: 1.2;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  
  .sobre-texto p {
    font-size: clamp(0.8rem, 3.5vw, 0.9rem);
    line-height: 1.4;
    text-align: justify;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  
  .sobre-img {
    padding: 0.5rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
  }
  
  .espai-art-carousel {
    min-height: 200px;
    aspect-ratio: 3/2;
    border-radius: 0.8rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
  }
  
  .galeria-codepen .image {
    width: 100px;
    height: 100px;
  }
  
  .galeria-codepen img {
    margin-top: -40px;
    margin-left: -40px;
  }
  
  .galeria-codepen ul {
    gap: 0.75rem;
  }
  
  .actividades {
    padding: 1.5rem 0.75rem;
  }
  
  .actividades h2 {
    font-size: 1.4rem;
  }
  
  .categoria-tab {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .actividad-tag {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
  }
  
  .actividad-ficha {
    padding: 1rem;
    gap: 1rem;
  }
  
  .actividad-ficha-texto h3 {
    font-size: 1.2rem;
  }
  
  .actividad-ficha-texto p {
    font-size: 0.85rem;
  }
}

/* ======== Tablet ======== */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-content {
    margin: 3rem auto;
    padding: 2rem 1.5rem;
    width: 90%;
    max-width: 700px !important;
  }
  
  .sobre-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
  }
  
  .espai-art-carousel {
    min-height: 350px;
    aspect-ratio: 16/10;
  }
  
  .galeria-codepen .image {
    width: 140px;
    height: 140px;
  }
  
  .galeria-codepen img {
    margin-top: -55px;
    margin-left: -55px;
  }
  
  .actividades-categorias {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }
  
  .actividad-ficha {
    flex-direction: row;
    gap: 2rem;
  }
}

/* ======== MEJORAS PARA EXPERIENCIA TÁCTIL ======== */
@media (max-width: 767px) {
  /* Mejorar botones para dedos */
  .boton-grad,
  .categoria-tab,
  .actividad-tag {
    min-height: 44px; /* Tamaño mínimo recomendado para dedos */
    touch-action: manipulation; /* Optimizar para touch */
  }
  
  /* Mejorar navegación táctil */
  .galeria-codepen .image {
    touch-action: pan-x pan-y; /* Permitir scroll táctil */
  }
  
  /* Optimizar carrusel para touch */
  .espai-art-carousel {
    touch-action: pan-x; /* Solo scroll horizontal */
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
  }
  
  /* Mejorar dots para touch */
  .sobre-carrusel-dot {
    min-width: 44px;
    min-height: 44px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Optimizar texto para móvil */
  .hero-content p,
  .sobre-texto p,
  .actividad-ficha-texto p {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }
  
  /* Mejorar espaciado para touch */
  .actividades-categorias,
  .etiquetas-tabs {
    gap: 0.8rem;
  }
  
  /* Optimizar imágenes para móvil */
  .actividad-ficha-media img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  /* ======== FIXES ESPECÍFICOS PARA BOTONES EN MÓVIL ======== */
  
  /* Botones de categorías más pequeños en móvil */
  .categoria-tab {
    font-size: 0.85rem !important;
    padding: 0.4em 1.2em !important;
    margin-bottom: 0.3em !important;
    min-height: 36px !important;
  }
  
  /* Botones de actividades con mejor espaciado */
  .actividad-tag {
    font-size: 0.8rem !important;
    padding: 0.3em 1em !important;
    margin-bottom: 0.5em !important;
    min-height: 32px !important;
  }
  
  /* Contenedor de etiquetas con mejor layout */
  .etiquetas-tabs {
    gap: 0.5rem !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    padding: 0.5rem !important;
  }
  
  /* Contenedor de categorías con mejor espaciado */
  .actividades-categorias {
    gap: 0.6rem !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    padding: 0.5rem !important;
  }
  
  /* Evitar superposición de botones */
  .actividades-etiquetas {
    min-height: auto !important;
    padding: 0.5rem 0 !important;
  }
}

/* ======== ORIENTACIÓN LANDSCAPE EN MÓVIL ======== */
@media (max-width: 767px) and (orientation: landscape) {
  .hero-content {
    margin: 1rem auto;
    padding: 1rem;
  }
  
  .sobre-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  
  .sobre-texto h2 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    text-align: left;
  }
  
  .sobre-texto p {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    text-align: left;
  }
  
  .espai-art-carousel {
    min-height: 200px;
    aspect-ratio: 16/9;
    width: 100%;
    max-width: 100%;
  }
  
  .actividades-categorias {
    flex-direction: row;
    justify-content: center;
  }
  
  .actividad-ficha {
    flex-direction: row;
    gap: 1rem;
  }
}

/* ======== PREVENCIÓN DE OVERFLOW GLOBAL ======== */
* {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ======== CONTAINER PRINCIPAL ======== */
.container,
main,
section,
.hero,
.sobre,
.galeria,
.actividades {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ======== FORZAR CONTAINER SIN OVERFLOW ======== */
@media (max-width: 767px) {
  .container,
  main,
  section,
  .hero,
  .sobre,
  .galeria,
  .actividades {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Forzar que no haya scroll horizontal */
  body {
    position: relative !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ======== PREVENCIÓN DE OVERFLOW EN TEXTO ======== */
.sobre-texto h2,
.sobre-texto p,
.actividades h2,
.actividades p {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  overflow: hidden;
}

/* ======== SOBRE-GRID OVERFLOW FIX ======== */
.sobre-grid {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
}

.sobre-texto,
.sobre-img {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0; /* Forzar que no exceda el contenedor */
}

/* ======== FORZAR LAYOUT VERTICAL EN MÓVIL ======== */
@media (max-width: 767px) {
  .sobre-grid {
    display: block !important;
    padding: 1.5rem !important;
    width: 90% !important;
    max-width: 500px !important;
    margin: 1.5rem auto !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
  }
  
  .sobre-texto {
    padding: 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    min-width: 0 !important;
    display: block !important;
    margin-bottom: 1.5rem !important;
  }
  
  .sobre-img {
    padding: 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    min-width: 0 !important;
    display: block !important;
  }
}

/* ======== CARRUSEL OVERFLOW FIX ======== */
.espai-art-carousel {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.espai-art-carousel .sobre-carrusel-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  box-sizing: border-box;
}

/* ======== FORZAR CARRUSEL SIN OVERFLOW EN MÓVIL ======== */
@media (max-width: 767px) {
  .espai-art-carousel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 250px !important;
    aspect-ratio: 4/3 !important;
    border-radius: 1rem !important;
  }
  
  .espai-art-carousel .sobre-carrusel-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
}
