/* ============================================================
   GALERÍA CSS
   ============================================================ */
body {
  background-color: #f8f9fa;
}

/* HERO */
.gal-hero {
  padding: 160px 20px 80px;
  text-align: center;
  background: var(--primary-dark, #1f332c);
  color: white;
}
.gal-hero-eyebrow {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--secondary, #5e9c8e);
  margin-bottom: 10px;
}
.gal-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 15px;
}
.gal-hero h1 span {
  color: var(--secondary, #5e9c8e);
}
.gal-hero p {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
}

/* CONTAINER */
.gal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* FILTERS */
.gal-filters {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}
.gal-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: white;
  padding: 8px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.gal-tab {
  background: none;
  border: none;
  padding: 10px 20px;
  border-radius: 40px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gal-tab:hover {
  background: #f0f0f0;
}
.gal-tab.active {
  background: var(--primary, #476b60);
  color: white;
}
.gal-count {
  background: rgba(0,0,0,0.1);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.8rem;
}
.gal-tab.active .gal-count {
  background: rgba(255,255,255,0.2);
}

/* HEADINGS */
.gal-section-heading {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #333;
}
.gal-sec-count {
  font-size: 1rem;
  background: #eee;
  padding: 2px 10px;
  border-radius: 20px;
  color: #666;
}

/* MASONRY (Images) */
.gal-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  grid-auto-rows: minmax(200px, auto);
}
.gal-img-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s;
}
.gal-img-item:hover {
  transform: translateY(-5px);
}
.gal-img-photo {
  width: 100%;
  height: 100%;
}
.gal-img-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gal-img-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  margin: 0;
  z-index: 2;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.gal-img-item:hover .gal-img-caption {
  opacity: 1;
}
.gal-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.gal-img-item:hover .gal-img-overlay {
  opacity: 1;
}
.gal-img-overlay-icon {
  background: white;
  color: #333;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transform: scale(0.5);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.gal-img-item:hover .gal-img-overlay-icon {
  transform: scale(1);
}

/* VIDEO GRID */
.gal-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}
.gal-vid-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.3s;
}
.gal-vid-item:hover {
  transform: translateY(-5px);
}
.gal-vid-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
}
.gal-vid-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gal-vid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.gal-vid-item:hover .gal-vid-overlay {
  background: rgba(0,0,0,0.4);
}
.gal-play-btn {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.9);
  color: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  padding-left: 4px;
  transition: transform 0.3s;
}
.gal-vid-item:hover .gal-play-btn {
  transform: scale(1.1);
  background: var(--secondary, #5e9c8e);
  color: white;
}
.gal-vid-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
}
.gal-vid-info {
  padding: 15px;
}
.gal-vid-title {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}
.gal-vid-desc {
  font-size: 0.85rem;
  color: #777;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* EMPTY STATE */
.gal-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.gal-empty i {
  font-size: 4rem;
  margin-bottom: 15px;
  color: #ccc;
}
.gal-empty h4 {
  color: #666;
}

/* LIGHTBOX */
.gal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
.gal-lightbox.open {
  display: flex;
}
.gal-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
}
.gal-lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2010;
}
.gal-lb-counter {
  position: absolute;
  top: 25px;
  left: 20px;
  color: white;
  font-size: 1rem;
  z-index: 2010;
}
.gal-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2010;
  transition: background 0.3s;
}
.gal-lb-nav:hover {
  background: rgba(255,255,255,0.3);
}
.gal-lb-prev { left: 20px; }
.gal-lb-next { right: 20px; }
.gal-lb-content {
  position: relative;
  z-index: 2005;
  max-width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gal-lb-img {
  max-width: 100%;
  max-height: calc(80vh - 60px);
  object-fit: contain;
}
.gal-lb-caption {
  color: white;
  margin-top: 15px;
  text-align: center;
  font-size: 1.1rem;
}

/* VIDEO MODAL */
.gal-vmodal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
.gal-vmodal.open {
  display: flex;
}
.gal-vmodal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
}
.gal-vmodal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2010;
}
.gal-vmodal-content {
  position: relative;
  z-index: 2005;
  width: 90%;
  max-width: 900px;
}
.gal-vmodal-video-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: black;
}
.gal-vmodal-video-wrap video {
  width: 100%;
  height: 100%;
}
.gal-vmodal-caption {
  color: white;
  margin-top: 15px;
  text-align: center;
  font-size: 1.1rem;
}

/* FOOTER */
.gal-footer {
  text-align: center;
  padding: 30px;
  background: white;
  border-top: 1px solid #eaeaea;
  margin-top: 40px;
}
.gal-footer p {
  margin: 0;
  color: #666;
}
.gal-footer a {
  color: var(--primary, #476b60);
  text-decoration: none;
  font-weight: 500;
}
.gal-footer a:hover {
  text-decoration: underline;
}
