/* ════════════════════════════════════════════════════════════════════════════
   Lista 464 — Noticias de Uruguay
   Standalone CSS — Vanilla (no Tailwind)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────────────────────────── */
:root {
  /* Core palette (HSL values from original Tailwind config) */
  --background:       hsl(210, 33%, 98%);
  --foreground:       hsl(213, 30%, 12%);
  --card:             hsl(0, 0%, 100%);
  --card-foreground:  hsl(213, 30%, 12%);
  --primary:          hsl(207, 80%, 52%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary:        hsl(207, 40%, 92%);
  --secondary-foreground: hsl(207, 80%, 30%);
  --muted:            hsl(210, 20%, 95%);
  --muted-foreground: hsl(213, 15%, 46%);
  --accent:           hsl(44, 95%, 53%);
  --accent-foreground: hsl(213, 30%, 12%);
  --border:           hsl(210, 25%, 90%);
  --celeste-dark:     hsl(207, 80%, 35%);
  --radius:           0.5rem;

  /* Typography */
  --font-headline: 'Merriweather', Georgia, serif;
  --font-body:     'Source Sans 3', system-ui, sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  line-height: 1.25;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

input {
  font-family: inherit;
}

/* ── Container ─────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.logo {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--primary-foreground);
  transition: opacity 0.2s;
}
.logo:hover {
  opacity: 0.9;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  padding: 0.5rem;
  color: rgba(255,255,255,0.8);
  transition: color 0.2s;
}
.icon-btn:hover {
  color: #fff;
}

.menu-toggle {
  display: block;
}

/* Mobile nav */
.nav-mobile {
  display: none;
  background: var(--primary);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 1rem;
}
.nav-mobile.open {
  display: block;
}

.nav-link-mobile {
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  transition: color 0.2s, background 0.2s;
}
.nav-link-mobile:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: relative;
  height: 70vh;
  min-height: 500px;
}

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(20, 25, 35, 0.9) 0%,
    rgba(20, 25, 35, 0.4) 40%,
    transparent 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding-bottom: 3rem;
  margin: 0 auto;
}

.hero-text {
  max-width: 48rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.badge-accent {
  background: var(--accent);
  color: var(--accent-foreground);
}

.hero h1 {
  font-size: 1.875rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--card);
  margin-bottom: 1rem;
}

.hero-excerpt {
  color: rgba(255,255,255,0.8);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 42rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }
  .hero-excerpt {
    font-size: 1.25rem;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   SECTIONS (shared)
   ════════════════════════════════════════════════════════════════════════════ */
.section {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.section-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 0.5rem;
}

/* ════════════════════════════════════════════════════════════════════════════
   TOP NEWS (Más Leídas)
   ════════════════════════════════════════════════════════════════════════════ */
.top-news-section {
  background: var(--background);
}

.news-grid {
  display: grid;
  gap: 1.5rem;
}

.news-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow 0.3s, transform 0.3s;
}
.news-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.card-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.news-card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

.card-category {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.25rem 0.625rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-views {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(20, 25, 35, 0.7);
  color: var(--card);
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-body {
  padding: 1.25rem;
}

.card-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--card-foreground);
  line-height: 1.35;
  transition: color 0.2s;
}
.news-card:hover .card-body h3 {
  color: var(--primary);
}

.card-time {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-top: 0.75rem;
}

@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   LATEST NEWS (Últimas Noticias)
   ════════════════════════════════════════════════════════════════════════════ */
.latest-news-section {
  background: hsl(207, 40%, 96%);
}

.latest-grid {
  display: grid;
  gap: 2rem;
}

.latest-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.latest-item {
  display: flex;
  gap: 1rem;
  background: var(--card);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  align-items: flex-start;
}
.latest-item:hover {
  border-color: hsla(207, 80%, 52%, 0.3);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.latest-item-content {
  flex: 1;
  min-width: 0;
}

.latest-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.badge-sm {
  padding: 0.125rem 0.5rem;
  border-radius: 2px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-politica {
  background: var(--primary);
  color: var(--primary-foreground);
}

.badge-economia {
  background: var(--celeste-dark);
  color: var(--primary-foreground);
}

.badge-sociedad {
  background: var(--accent);
  color: var(--accent-foreground);
}

.badge-deportes {
  background: var(--foreground);
  color: var(--background);
}

.latest-time {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.latest-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--card-foreground);
  line-height: 1.35;
  margin-bottom: 0.375rem;
  transition: color 0.2s;
}
.latest-item:hover h3 {
  color: var(--primary);
}

.latest-item p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-arrow {
  color: var(--muted-foreground);
  flex-shrink: 0;
  margin-top: 0.25rem;
  transition: color 0.2s;
}
.latest-item:hover .latest-arrow {
  color: var(--primary);
}

/* Sidebar */
.latest-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.sidebar-card-body {
  padding: 1.25rem;
}

.sidebar-card-body h3 {
  font-weight: 700;
  color: var(--card-foreground);
  margin-bottom: 0.5rem;
}

.sidebar-card-body p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  transition: color 0.2s;
}
.link-arrow:hover {
  color: var(--celeste-dark);
}

/* Newsletter */
.newsletter-card {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.newsletter-card h3 {
  font-weight: 700;
  color: var(--primary-foreground);
  margin-bottom: 0.5rem;
}

.newsletter-card p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1rem;
}

.newsletter-card input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--primary-foreground);
  outline: none;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.newsletter-card input::placeholder {
  color: rgba(255,255,255,0.5);
}
.newsletter-card input:focus {
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}

.btn-subscribe {
  width: 100%;
  background: var(--accent);
  color: var(--accent-foreground);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: opacity 0.2s, transform 0.2s;
}
.btn-subscribe:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

@media (min-width: 1024px) {
  .latest-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--foreground);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--background);
  margin-bottom: 0.75rem;
}

.footer-grid p {
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-heading {
  font-weight: 700;
  color: var(--background);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links li {
  font-size: 0.875rem;
}

.footer-links a {
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--background);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════════════════════
   SCROLLBAR
   ════════════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--muted);
}
::-webkit-scrollbar-thumb {
  background: hsl(207, 30%, 75%);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: hsl(207, 30%, 60%);
}

/* ════════════════════════════════════════════════════════════════════════════
   SELECTION
   ════════════════════════════════════════════════════════════════════════════ */
::selection {
  background: hsl(207, 80%, 52%);
  color: #fff;
}
