/* Fundación Todavía hay Esperanza – estilos compartidos */
html {
  scroll-behavior: smooth;
}

body {
  opacity: 0;
  transition: opacity 0.35s ease-in-out;
}

body.loaded {
  opacity: 1;
}

/* Slider (solo index) */
.slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  object-fit: cover;
}

.slide.active {
  opacity: 1;
  z-index: 10;
}

.slider-content {
  position: relative;
  z-index: 20;
  padding-top: 100px;
  padding-bottom: 100px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #0e7b41;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0a5c30;
}

/* WhatsApp popup */
#wa-popup {
  position: fixed;
  bottom: 95px;
  right: 24px;
  z-index: 100;
  background: white;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: waBounce 1s ease infinite alternate;
  border: 1px solid #e2e8f0;
}

@keyframes waBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

#wa-popup p {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
}

#wa-popup .close-wa {
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wa-popup .close-wa:hover {
  color: #ef4444;
}

/* Cookie banner */
#cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(150%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#cookie-banner.show {
  transform: translateY(0);
}

@media (min-width: 768px) {
  #cookie-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
  }
}

.dark #cookie-banner {
  background: rgba(17, 33, 24, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Selector de idioma */
#lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(14, 123, 65, 0.08);
  border: 1px solid rgba(14, 123, 65, 0.15);
  border-radius: 9999px;
  padding: 3px;
}

.lang-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.lang-btn:hover {
  color: #0e7b41;
  background: rgba(14, 123, 65, 0.1);
}

.lang-btn.active {
  background: #0e7b41;
  color: white;
  box-shadow: 0 2px 8px rgba(14, 123, 65, 0.35);
}

/* Google Translate – ocultar widget nativo */
#google_translate_element {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-te-spinner-pos,
.goog-tooltip {
  display: none !important;
}

body {
  top: 0 !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Trailers embebidos (Cine Club) */
.trailer-player {
  position: relative;
}

.trailer-player .trailer-poster {
  position: absolute;
  inset: 0;
}

.trailer-player .trailer-embed {
  position: absolute;
  inset: 0;
}

.trailer-player .trailer-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.trailer-player.is-playing .trailer-poster {
  display: none;
}

.trailer-player.is-playing .trailer-embed {
  display: block !important;
}
