@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Inter:wght@300;400;500;600;700;800&display=swap");

body {
  font-family: "Inter", sans-serif;
  background: #fefaf5;
}

.news-card {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.sponsor-banner {
  transition: opacity 0.3s ease;
}

.sponsor-banner:hover {
  opacity: 0.9;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.weather-card {
  animation: fadeIn 0.5s ease-out;
}

.modal-enter {
  animation: fadeIn 0.3s ease-out;
}

.btn-orange {
  background: linear-gradient(90deg, #f97316, #ea580c);
  transition: all 0.2s;
}

.btn-orange:hover {
  transform: scale(0.98);
  background: linear-gradient(90deg, #ea580c, #c2410c);
}

.shadow-orange-sm {
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25);
}

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #f97316;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
  z-index: 40;
}

.logo-img {
  max-height: 140px;
  width: auto;
  display: inline-block;
  transition: transform 0.2s ease;
}

@media (max-width: 768px) {
  .logo-img {
    max-height: 100px;
  }
}
@media (max-width: 480px) {
  .logo-img {
    max-height: 80px;
  }
}

/* Body HTML from Quill editor (news detail) */
.news-body p { margin-bottom: 1rem; line-height: 1.8; }
.news-body h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.75rem; }
.news-body h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }
.news-body h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.news-body ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.news-body ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.news-body li { margin-bottom: 0.35rem; line-height: 1.7; }
.news-body blockquote {
  border-left: 4px solid #f97316;
  padding-left: 1rem;
  font-style: italic;
  color: #6b7280;
  margin-bottom: 1rem;
}
.news-body img { border-radius: 0.75rem; width: 100%; margin: 1rem 0; }
.news-body a { color: #ea580c; text-decoration: underline; }
.news-body strong { font-weight: 700; }
.news-body em { font-style: italic; }

/* ── Embed: YouTube / videos 16:9 ── */
.news-body .video-embed {
  position: relative;
  width: 100%;
  margin: 1.5rem 0;
  overflow: hidden;
  border-radius: 1rem;
  background: #000;
}

/* YouTube usa aspect-ratio 16:9 */
.news-body .video-embed.embed-youtube {
  padding-top: 56.25%;
}
.news-body .video-embed.embed-youtube iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Redes sociales con altura fija (Instagram, TikTok, X, Threads, Facebook) */
.news-body .video-embed:not(.embed-youtube) {
  padding-top: 0;
  height: auto;
  min-height: 300px;
}
.news-body .video-embed:not(.embed-youtube) iframe {
  display: block;
  width: 100%;
  min-height: 500px;
  border: 0;
  /* TikTok y algunos embeds necesitan más altura */
}

/* Altura específica por red */
.news-body .video-embed.embed-tiktok iframe   { min-height: 650px; }
.news-body .video-embed.embed-instagram iframe { min-height: 600px; }
.news-body .video-embed.embed-threads iframe   { min-height: 600px; }
.news-body .video-embed.embed-facebook iframe  { min-height: 600px; }
.news-body .video-embed.embed-x iframe         { min-height: 500px; }

/* ── Embed: Imágenes ── */
.news-body .image-embed {
  margin: 1.5rem 0;
}
.news-body .image-embed img {
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  display: block;
  margin: 0 auto;
}


@media (max-width: 767px) {
  /* Fade de borde derecho */
  .cat-nav-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 48px;
    background: linear-gradient(to right, transparent, white);
    pointer-events: none;
    z-index: 2;
  }

  /* Scroll horizontal, sin scrollbar nativa */
  .cat-nav {
    overflow-x: auto;
    justify-content: flex-start !important;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cat-nav::-webkit-scrollbar {
    display: none;
  }

  /* Pills de categoría en mobile */
  .cat-pill {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    min-height: 44px;
  }
  .cat-pill-active {
    background-color: #e8410a;
    color: white !important;
  }
  .cat-pill-inactive {
    border: 1px solid #ddd;
    color: #374151 !important;
  }

  /* Widgets intercalados en mobile */
  .mobile-widget {
    background: #f5f5f5;
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 16px 0;
    width: 100%;
  }
}