/* =============================================
   LIFE DEPORTES — Pages Styles (Nosotros & Galería)
   ============================================= */

/* ---------- PAGE HERO ---------- */
.page-hero {
  background: linear-gradient(135deg, #051B36 0%, #0a3060 50%, #051B36 100%);
  padding: 100px 0 60px;
  text-align: center;
  color: #fff;
}
.page-hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 12px;
}
.page-hero-gallery {
  background: url('img/banner-galeria.webp') center/cover no-repeat;
  position: relative;
}
.page-hero-gallery::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5,27,54,.5);
}
.page-hero-gallery .container {
  position: relative;
  z-index: 1;
}
.page-hero p {
  font-size: 1.05rem;
  opacity: .7;
  max-width: 480px;
  margin: 0 auto;
}

/* ---------- MISION / VISION ---------- */
.mv-section {
  padding: 80px 0;
}
.mv-section.alt {
  background: #f7f8fa;
}
.mv-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}
.mv-inner.reverse {
  flex-direction: row-reverse;
}
.mv-image {
  flex: 0 0 420px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.12);
}
.mv-content {
  flex: 1;
}
.mv-content h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #051B36;
  margin-bottom: 20px;
}
.mv-content p {
  color: #555;
  font-size: .95rem;
  line-height: 1.8;
}

/* ---------- STATS ---------- */
.stats {
  padding: 60px 0;
  background: linear-gradient(135deg, #051B36, #0a3060);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat {
  padding: 28px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
.stat strong {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}
.stat span {
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ---------- VALUES ---------- */
.values {
  padding: 80px 0;
  background: #fff;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.value-card {
  background: #081d37;
  border-radius: 18px;
  padding: 36px 28px;
  transition: transform .4s cubic-bezier(.25,.8,.25,1), box-shadow .4s;
}
.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(5,27,54,.3);
}
.value-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 12px;
}
.value-card p {
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
}

/* ---------- GALLERY ---------- */
.gallery {
  padding: 80px 0;
  background: #f7f8fa;
}

.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 11px 28px;
  border: 2px solid #dde1e8;
  border-radius: 50px;
  background: #fff;
  font-size: .85rem;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  min-height: 44px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.filter-btn:hover {
  border-color: #0F385F;
  color: #0F385F;
  box-shadow: 0 4px 16px rgba(15,56,95,.12);
  transform: translateY(-1px);
}
.filter-btn.active {
  background: linear-gradient(135deg, #051B36 0%, #0F385F 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 20px rgba(5,27,54,.28);
  transform: translateY(-1px);
}
@keyframes filterFadeIn {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1); }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4/3;
  position: relative;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 60%, rgba(5,27,54,.5));
  opacity: 0;
  transition: opacity .3s;
}
.gallery-item:hover::after {
  opacity: 1;
}
.gallery-item.hidden {
  display: none;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 16px 64px rgba(0,0,0,.5);
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s;
}
.lightbox-close:hover {
  background: rgba(255,255,255,.25);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s;
}
.lightbox-nav:hover {
  background: rgba(255,255,255,.25);
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

/* ---------- LEGAL PAGES ---------- */
.legal-content {
  padding: 64px 0 80px;
}
.legal-container {
  max-width: 780px;
  margin: 0 auto;
}
.legal-container h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #051B36;
  margin: 48px 0 16px;
  letter-spacing: .01em;
}
.legal-container h2:first-child {
  margin-top: 0;
}
.legal-container p {
  font-family: 'DM Sans', sans-serif;
  color: #555;
  font-size: .95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}
.legal-container ul {
  color: #555;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  line-height: 1.8;
  margin: 8px 0 16px 20px;
  padding: 0;
}
.legal-container ul li {
  margin-bottom: 4px;
}
.legal-container a {
  color: #0F385F;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-container a:hover {
  color: #051B36;
}
.legal-container strong {
  color: #051B36;
}
.legal-updated {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  font-size: .85rem !important;
  color: #999 !important;
  font-style: italic;
}

/* =============================================
   RESPONSIVE — PAGES
   ============================================= */

@media (max-width: 1024px) {
  .mv-inner, .mv-inner.reverse { flex-direction: column; gap: 32px; }
  .mv-image { flex: none; width: 100%; max-width: 500px; margin: 0 auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .page-hero { padding: 80px 0 48px; }
  .mv-section { padding: 56px 0; }
  .mv-content h2 { font-size: 2rem; }
  .stats { padding: 48px 0; }
  .stat strong { font-size: 2.4rem; }
  .values { padding: 56px 0; }
  .values-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .value-card { padding: 28px 20px; }
  .gallery { padding: 56px 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  /* Horizontal scroll bar — no wrapping, full-width swipeable */
  .gallery-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 4px 4px 12px;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    margin-bottom: 32px;
  }
  .gallery-filters::-webkit-scrollbar { display: none; }
  .filter-btn {
    flex-shrink: 0;
    padding: 10px 22px;
    font-size: .82rem;
    min-height: 42px;
  }
  .lightbox { padding: 20px; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 1.1rem; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .values-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-item { border-radius: 10px; }
}
