/* =========================================================
   COMPONENTS.CSS — ELEMENTOS REUTILIZABLES
   ========================================================= */

/* === BOTONES === */
.btn-main {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: bold;
  padding: 0.6rem 1.5rem;
  border-radius: 30px;
  transition: background 0.3s ease, transform 0.2s ease;
}
.btn-main:hover {
  background-color: var(--color-highlight);
  transform: scale(1.05);
}

.btn-news {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: bold;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: background 0.3s ease, transform 0.2s ease;
}
.btn-news:hover {
  background-color: var(--color-highlight);
  transform: scale(1.05);
}

/* === BOTÓN DE CRÉDITOS Y MODAL === */
footer.site-footer .footer-credits-btn {
  margin-left: 1.2rem !important;
  border: none !important;
  background: transparent !important;
  color: #fff !important;
  font-family: var(--font-heading) !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  padding: 0 !important;
  border-radius: 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  transition: color 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-shadow: none !important;
}
footer.site-footer .footer-credits-btn:hover {
  color: var(--color-accent) !important;
  transform: none !important;
}
footer.site-footer .footer-credits-btn:active {
  transform: none !important;
}

.footer-icons + .footer-credits-btn {
  margin-left: 1.5rem !important;
}

/* ---- Modal de Créditos + Aviso Legal ---- */
.credits-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 9999;
}
.credits-modal.active {
  opacity: 1;
  visibility: visible;
}

.credits-modal-content {
  position: relative;
  width: min(92vw, 620px);
  max-height: 84vh;
  background: #121212;
  color: #f5f5f5;
  border: 1px solid rgba(179, 138, 90, 0.18);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  text-transform: none;
  letter-spacing: normal;
  text-align: left;
}

.credits-modal-scroll {
  max-height: 84vh;
  overflow-y: auto;
  padding: 40px 40px 34px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent, #b38a5a) #1a1a1a;
}
.credits-modal-scroll::-webkit-scrollbar { width: 8px; }
.credits-modal-scroll::-webkit-scrollbar-thumb {
  background: var(--color-accent, #b38a5a);
  border-radius: 8px;
}
.credits-modal-scroll::-webkit-scrollbar-track { background: #1a1a1a; }

.credits-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease, background 0.3s ease;
  z-index: 5;
}
.credits-modal-close:hover {
  color: var(--color-highlight, #d1a470);
  background: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}

/* Bloque "Créditos" */
.credits-block {
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.credits-block h3 {
  margin: 0 0 14px;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  text-transform: none;
  letter-spacing: 0;
}
.credits-block p {
  margin: 0 0 6px;
  color: #ccc;
  font-family: var(--font-main);
  font-size: 0.9rem;
  line-height: 1.6;
}
.credits-block p strong {
  color: #e8e8e8;
}

/* Bloque "Aviso Legal" */
.legal-eyebrow {
  font-family: var(--font-heading);
  color: var(--color-highlight, #d1a470);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.legal-block h3 {
  margin: 0 0 10px;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  text-transform: none;
  letter-spacing: 0;
}
.legal-lead {
  margin: 0 0 24px;
  color: #999;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-style: italic;
}
.legal-item {
  margin-bottom: 20px;
}
.legal-item h4 {
  margin: 0 0 6px;
  color: var(--color-highlight, #d1a470);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  text-transform: none;
  letter-spacing: 0;
}
.legal-item p {
  margin: 0;
  color: #bbb;
  font-family: var(--font-main);
  font-size: 0.85rem;
  line-height: 1.65;
}
.legal-item p a {
  color: var(--color-highlight, #d1a470);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-item p a:hover {
  color: #fff;
}
.legal-placeholder {
  color: #f0c98a;
  font-style: italic;
  border-bottom: 1px dashed rgba(240, 201, 138, 0.5);
}
.legal-updated {
  margin: 26px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #777;
  font-family: var(--font-main);
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .credits-modal-scroll {
    padding: 30px 22px 26px;
  }
  .credits-block h3,
  .legal-block h3 {
    font-size: 1.15rem;
  }
}

body.modal-open {
  overflow: hidden;
}

/* === POPUP DE NOTICIAS === */
.news-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  z-index: 9999;
  padding: 20px;
}

.news-popup.active {
  opacity: 1;
  visibility: visible;
}

/* ---- Contenido ---- */
.news-popup-content {
  position: relative;
  width: 720px;
  max-width: 92vw;
  max-height: 82vh;
  background: #121212;
  border: 1px solid rgba(179, 138, 90, 0.18);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(40px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.news-popup.active .news-popup-content {
  transform: translateY(0);
  opacity: 1;
}

.news-popup-scroll {
  overflow-y: auto;
  max-height: 82vh;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) #1a1a1a;
}
.news-popup-scroll::-webkit-scrollbar { width: 8px; }
.news-popup-scroll::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 10px;
}
.news-popup-scroll::-webkit-scrollbar-track { background: #1a1a1a; }

/* ---- Imagen de cabecera ---- */
.news-popup-hero {
  position: relative;
}
.news-popup-hero img.news-popup-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
}
.news-popup-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, #121212 100%);
  pointer-events: none;
}

/* ---- Botón de cierre ---- */
.news-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 1.3rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease, background 0.3s ease;
  z-index: 10;
}
.news-popup-close:hover {
  color: var(--color-accent);
  background: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}

/* ---- Cuerpo del popup ---- */
.news-popup-body {
  padding: 8px 40px 40px;
  margin-top: -52px;
  position: relative;
  z-index: 2;
}

/* ---- Texto e imágenes ---- */
.news-popup-eyebrow {
  font-family: var(--font-heading);
  color: var(--color-highlight);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.news-popup-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1.25;
  color: #fff;
  text-transform: none;
  letter-spacing: 0;
  margin: 0 0 14px;
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-main);
  color: #9a9a9a;
  font-size: 0.85rem;
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.news-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #666;
}
.news-meta-author {
  color: var(--color-highlight);
  font-weight: 600;
}
.news-popup-body-content {
  font-family: var(--font-main);
  color: #dcdcdc;
  font-size: 1.02rem;
  line-height: 1.75;
}
.news-popup-body-content p {
  margin: 0 0 18px;
}
.news-popup-body-content p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3.2rem;
  color: var(--color-highlight);
  float: left;
  line-height: 0.85;
  margin: 6px 8px 0 0;
}
.news-popup-body-content img {
  width: 100%;
  border-radius: 10px;
  margin: 10px 0 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
  .news-popup-hero img.news-popup-image { height: 190px; }
  .news-popup-body { padding: 8px 22px 28px; }
  .news-popup-title { font-size: 1.5rem; }
  .news-popup-body-content { font-size: 0.96rem; }
}

/* ---- Animaciones ---- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
