/* ============================================
   HOME.CSS
   Estilos específicos para la vista de Inicio.
   ============================================ */

/* Logo respetando proporción y ocupando ancho disponible */
.home-logo {
  width: 90%;
  max-width: 350px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Frase bajo el logo */
.home-slogan {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-primary);
}

/* Titulo de Card */
.home-card-title {
  font-size: 1.5rem;
  text-align: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* Contador */
.counter-card {
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-secondary)
  );
  color: #1f2937;
  padding: 24px 16px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

.counter-start {
  font-size: 0.95rem;
  margin-bottom: 8px;
  opacity: 0.9;
  font-weight: 500;
}

.counter-display {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
  margin: 12px 0;
}

.counter-message {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 8px;
  opacity: 0.9;
}

/* Galería */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Galería con imágenes reales */
.gallery-item {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.lightbox-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.lightbox-content img.active {
  opacity: 1;
  transform: scale(1);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-close {
  top: 10px;
  right: 10px;
}

.lightbox-prev {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-caption {
  color: white;
  margin-top: 12px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-caption.visible {
  opacity: 1;
}

.lightbox-caption small {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Sobre nosotros */
.about-text {
  line-height: 1.8;
  text-align: center;
  font-size: 1rem;
}

/* Redes sociales */
.social-links {
  display: flex;
  justify-content: space-around;
  gap: 24px;
  flex-wrap: wrap;
}

.social-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.social-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 4px;
  text-align: center;
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color var(--transition);
}

.social-link i {
  font-size: 2rem;
}

.social-link:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* Frase */
.phrase-card {
  text-align: center;
  font-style: italic;
  margin-top: 20px;
  padding: 24px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.phrase-text {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.phrase-author {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Footer */
.home-footer {
  text-align: center;
  margin-top: 16px;
  margin-bottom: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
}

.footer-main {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-text);
}

.footer-sub {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* Responsive */
@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .counter-display {
    font-size: 2.5rem;
  }
}
