@charset "UTF-8";

/* ===== ROOT & VARIABLES ===== */
:root {
  --bs-primary: #ee0979;
  --bs-secondary: #ff6a00;
  --bs-dark: #212529;
  --bs-white: #fff;
  --bs-black: #000;
  --bs-body-font-family: Lato, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
  --bs-body-color: #212529;
  --bs-body-bg: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ===== HEADINGS ===== */
h1, h2, h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== CONTAINER & UTILITIES ===== */
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .container { max-width: 540px; }
}

@media (min-width: 768px) {
  .container { max-width: 720px; }
}

@media (min-width: 992px) {
  .container { max-width: 960px; }
}

@media (min-width: 1200px) {
  .container { max-width: 1140px; }
}

@media (min-width: 1400px) {
  .container { max-width: 1320px; }
}

.px-5 { padding-left: 3rem !important; padding-right: 3rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }

.text-center { text-align: center; }
.text-white { color: #fff !important; }

.ms-auto { margin-left: auto !important; }
.m-0 { margin: 0 !important; }

/* ===== HEADER/GALERIA SECTION ===== */
header {
  background-color: var(--bs-body-bg);
  padding: 4rem 0 2rem;
  margin-top: calc(80px + 12px); /* evita overlap con navbar fija */
}

header h1 {
  font-size: clamp(28px, 5vw, 48px);
  margin-bottom: 0;
  color: var(--bs-body-color);
}

/* ===== GALERIA GRID ===== */
/* Contenedor principal de la galería */
.galeria-content {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 3rem;
  padding-right: 3rem;
  box-sizing: border-box;
  margin-top: calc(80px + 50px); /* 80px altura del logo + ~2cm (56px) */
}

/* Título de la galería */
.galeria-content h1 {
  color: rgba(0, 0, 0, 0.89);
  font-size: 40px;
  margin-bottom: 25px;
  text-align: left;
}

/* Grid de imágenes */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  width: 100%;
  grid-auto-rows: 320px;
}

.galeria img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.15s ease-in-out;
}

.galeria img:hover {
  transform: scale(1.03);
  cursor: pointer;
}

/* Mobile: el contenedor ocupa todo el ancho */
@media (max-width: 991px) {
  .galeria-content { 
    padding-left: 1rem; 
    padding-right: 1rem; 
  }

  .galeria {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    grid-auto-rows: 250px;
  }

  .galeria-content h1 {
    font-size: 32px;
  }
}

@media (max-width: 576px) {
  .galeria-content { 
    padding-left: 0.5rem; 
    padding-right: 0.5rem; 
  }

  .galeria {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    grid-auto-rows: 200px;
  }

  .galeria-content h1 {
    font-size: 24px;
  }
}

/* ===== FOOTER ===== */
footer {
  background-color: #000;
  color: #fff;
  padding: 3rem 0;
  text-align: center;
  margin-top: 4rem;
}

/* ===== LIGHTBOX MODAL ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.lightbox.active {
  display: flex;
  opacity: 1;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lightbox-main {
  position: relative;
  width: 100%;
  height: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-main img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  animation: fadeIn 0.3s ease-in-out;
  border-radius: 3px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-prev,
.lightbox-next,
.lightbox-close {
  position: absolute;
  background-color: transparent;
  border: none;
  color: rgb(255, 0, 0);
  font-size: 2rem;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease-in-out;
  z-index: 2010;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
  background-color: rgb(9, 51, 238);
  color: #fff;
  transition: background-color 0.5s ease-in-out, color 0.2s ease-in-out;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

/* Thumbnails en la parte inferior */
.lightbox-thumbnails {
  width: 100%;
  height: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  background-color: rgba(0, 0, 0, 0.5);
}

.thumbnail {
  width: 80px;
  height: 80px;
  border: 3px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  flex-shrink: 0;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  opacity: 0.7;
}

.thumbnail.active img {
  opacity: 1;
}

.thumbnail.active {
  border-color: var(--bs-primary);
  box-shadow: 0 0 10px rgba(238, 9, 121, 0.5);
}

.thumbnail:hover img {
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 1.5rem;
    padding: 10px 15px;
  }

  .lightbox-close {
    font-size: 1.5rem;
    padding: 10px 15px;
  }

  .lightbox-thumbnails {
    height: 12%;
  }

  .thumbnail {
    width: 60px;
    height: 60px;
  }
}