* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Fonts loaded via <link> in index.html head */

:root {
  --bg-primary: #0f0f13;
  --bg-secondary: #1a1a24;
  --bg-card: #1e1e2a;
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-secondary: #ec4899;
  --accent-gradient: linear-gradient(135deg, #7c3aed, #ec4899);
  --border: #2a2a3a;
  --header-bg: #1a3a2a;
  --header-yellow: #c5a028;
  --header-yellow-hover: #e0b830;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('https://raw.githubusercontent.com/LeoLaRata35/e-radiomagazine/main/assets/fondo1.png');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(8px);
  transform: scale(1.05);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(15, 15, 19, 0.6);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Banner Carousel */
.banner-carousel {
  background: var(--bg-secondary);
  padding: 20px 0;
  overflow: hidden;
}

.banner-track {
  display: flex;
  transition: transform 0.5s ease;
}

.banner-slide {
  flex: 0 0 100%;
  display: block;
  text-decoration: none;
  outline: none;
  border: none;
  box-shadow: none;
}

.banner-slide img {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 12px;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.3s;
}

.banner-dot.active {
  background: var(--accent);
}

/* Header */
.header {
  background: var(--header-bg);
  border-bottom: 2px solid var(--header-yellow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.5));
}

.logo img {
  height: 60px;
  display: block;
}

.nav-blog-link {
  background: var(--header-yellow);
  color: #1a3a2a !important;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-blog-link:hover {
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(197, 160, 40, 0.5);
}

.logo span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav a {
  text-decoration: none;
  color: var(--header-yellow);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: color 0.2s;
  position: relative;
}

.nav a:hover {
  transform: translateY(-1px);
}

.nav a:hover,
.nav a.active {
  color: var(--header-yellow-hover);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--header-yellow);
  border-radius: 1px;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--header-bg);
  border: 1px solid var(--header-yellow);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 160px;
  list-style: none;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block !important;
}

.nav-dropdown-menu li {
  padding: 0;
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 20px;
  color: var(--header-yellow);
  white-space: nowrap;
  font-size: 0.85rem;
}

.nav-dropdown-menu a:hover {
  background: rgba(197, 160, 40, 0.1);
  color: var(--header-yellow-hover);
}

.nav-live-menu a {
  background: var(--header-yellow);
  color: #1a3a2a;
  border-radius: 20px;
  margin: 4px 8px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-live-menu a:hover {
  background: var(--header-yellow-hover);
  color: #1a3a2a;
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(197, 160, 40, 0.5);
}

/* Search */
.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 8px;
  line-height: 1;
  color: var(--header-yellow);
  transition: transform 0.2s;
}

.search-toggle:hover {
  transform: scale(1.15);
}

.search-panel {
  display: none;
  background: var(--header-bg);
  border-bottom: 2px solid var(--header-yellow);
  padding: 16px 0;
}

.search-panel.open {
  display: block;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--header-yellow);
}

.search-results {
  margin-top: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s, transform 0.2s;
}

.search-result-item:hover {
  border-color: var(--header-yellow);
  transform: translateX(4px);
}

.search-result-item img {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.search-result-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.search-result-info span {
  font-size: 0.8rem;
  color: var(--header-yellow);
}

.search-result-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-no-results {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .nav-dropdown-menu {
    position: static;
    transform: none;
    border: none;
    border-left: 2px solid var(--header-yellow);
    border-radius: 0;
    padding: 0 0 0 16px;
    margin: 8px 0 4px;
    min-width: auto;
    box-shadow: none;
  }

  .nav-dropdown-toggle {
    width: 100%;
  }
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 48px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.hero-featured {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  height: 420px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.dot.active {
  background: white;
  transform: scale(1.3);
}

.dot:hover {
  background: rgba(255,255,255,0.8);
}

.hero-category {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  align-self: flex-start;
  z-index: 1;
}

.hero-slide h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  z-index: 1;
}

.hero-slide p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 20px;
  max-width: 600px;
  z-index: 1;
}

.btn-read {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: gap 0.2s;
}

.btn-read:hover {
  gap: 6px;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-size: cover;
  background-position: center;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}

.hero-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero-item-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-secondary);
  margin-bottom: 8px;
}

.hero-item h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Main articles */
.main {
  padding: 32px 0 64px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.article-card .article-img {
  height: 180px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  width: 100%;
}
.article-card .article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  width: 100%;
  min-width: 0;
}
.article-card .article-content h3 {
  flex-shrink: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.article-card .article-content p {
  flex: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.article-card .read-more {
  margin-top: auto;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.article-img {
  height: 180px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 16px;
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-card);
}

.article-date {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: white;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}


.article-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 8px;
}

.article-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.article-content p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.read-more {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

.read-more:hover {
  text-decoration: underline;
}

/* Newsletter */
.newsletter {
  padding: 64px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.newsletter-content {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.newsletter-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.newsletter-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input:focus {
  border-color: var(--accent);
}

.newsletter-form button {
  padding: 14px 28px;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.newsletter-form button:hover {
  opacity: 0.9;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination .page-num.active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.pagination a {
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.pagination a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination a.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.pagination .page-numbers {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pagination .page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  color: var(--text-secondary);
  font-size: 1rem;
  letter-spacing: 2px;
}

.pagination .page-num.active {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

@media (max-width: 480px) {
  .pagination {
    gap: 8px;
  }
  .pagination a,
  .pagination .page-num.active {
    min-width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
}

/* Footer */
.footer {
  padding: 64px 0 32px;
  background: rgba(15, 15, 19, 0.92);
  backdrop-filter: blur(4px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 16px;
}

.footer-brand .logo img {
  height: 50px;
  display: block;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 360px;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Comments Section */
.comments-section {
  background: var(--bg-secondary);
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.comments-section h3 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.comment-form {
  max-width: 600px;
}

.comment-form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
}

.comment-form textarea {
  resize: vertical;
  margin-bottom: 16px;
}

.comment-submit {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.comment-submit:hover {
  transform: scale(1.03);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-content {
    height: 56px;
  }

  .logo img {
    height: 36px;
  }

  .footer-brand .logo img {
    height: 40px;
  }

  .nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-bottom: 2px solid var(--header-yellow);
    padding: 20px;
  }

  .nav.open {
    display: block;
  }

  .nav ul {
    flex-direction: column;
    gap: 16px;
  }

  .menu-toggle {
    display: block;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-featured {
    height: 300px;
  }

  .hero-slide {
    padding: 28px;
  }

  .hero-slide h1 {
    font-size: 1.5rem;
  }

  .articles-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
