/* portal/assets/css/style.css - Modern Responsive News Portal */

:root {
  --primary: #dc2626; /* Editorial news red */
  --primary-hover: #b91c1c;
  --accent: #2563eb;
  --bg-body: #ffffff;
  --bg-card: #f8fafc;
  --bg-alt: #f1f5f9;
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --header-bg: #0f172a;
  --header-text: #ffffff;
  --container-w: 1200px;
  --radius: 10px;
  --font-serif: "Merriweather", Georgia, Cambria, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
}

[data-theme="dark"] {
  --bg-body: #0b0f19;
  --bg-card: #131b2e;
  --bg-alt: #1e293b;
  --text-main: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --header-bg: #070a10;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Nav */
.site-header {
  background-color: var(--header-bg);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-logo {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo span {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.menu-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* Nav Bar */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 4px 12px;
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  padding: 4px 6px;
  outline: none;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.6);
}

/* Breaking ticker */
.ticker-wrap {
  background-color: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 13px;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-badge {
  background-color: var(--primary);
  color: #fff;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero Featured Section */
.hero-section {
  padding: 30px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

.main-featured {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.main-featured-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.main-featured:hover .main-featured-img {
  transform: scale(1.02);
}

.featured-content {
  padding: 24px;
}

.badge-cat {
  display: inline-block;
  background-color: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.main-title {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 12px;
}

.main-title a:hover {
  color: var(--primary);
}

.featured-excerpt {
  color: var(--text-body);
  font-size: 16px;
  margin-bottom: 16px;
  line-height: 1.6;
}

.article-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Secondary Hero column */
.secondary-featured {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
  display: flex;
  gap: 14px;
}

.side-card img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.side-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 6px;
}

.side-title a:hover {
  color: var(--primary);
}

/* Grid of Articles */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin: 36px 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 24px;
  background-color: var(--primary);
  border-radius: 2px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.news-card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.news-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  margin: 8px 0 10px 0;
}

.news-card-title a:hover {
  color: var(--primary);
}

.news-card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

/* Article Reading View (articulo.php) */
.article-reading-wrap {
  padding: 40px 0;
}

.article-header {
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.article-headline {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin: 14px 0;
}

.article-bajada {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text-body);
  font-weight: 400;
  margin-bottom: 20px;
}

.article-main-image {
  max-width: 900px;
  margin: 0 auto 30px auto;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-main-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.article-body-content {
  max-width: 760px;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--text-body);
}

.article-body-content p {
  margin-bottom: 24px;
}

.article-body-content h3 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 36px 0 16px 0;
}

.article-body-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 24px;
  margin: 28px 0;
  font-style: italic;
  background-color: var(--bg-alt);
  border-radius: 0 8px 8px 0;
}

.article-body-content ul,
.article-body-content ol {
  margin: 20px 0 24px 28px;
}

.article-body-content li {
  margin-bottom: 8px;
}

/* Social Share Bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.share-wa { background-color: #25d366; }
.share-tw { background-color: #000; }
.share-fb { background-color: #1877f2; }
.share-copy { background-color: var(--bg-alt); color: var(--text-main); border: 1px solid var(--border); cursor: pointer; }

/* Reading progress bar */
.progress-bar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 9999;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  transition: width 0.1s;
}

/* Footer */
.site-footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 48px 0 24px 0;
  margin-top: 60px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  font-size: 13px;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .main-featured-img {
    height: 260px;
  }
  .main-title {
    font-size: 1.6rem;
  }
  .article-headline {
    font-size: 1.85rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle-btn {
    display: block;
  }
  .nav-bar {
    display: none;
    flex-direction: column;
    padding: 16px 0;
    gap: 16px;
  }
  .nav-bar.active {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .search-box {
    width: 100%;
  }
  .article-body-content {
    font-size: 1.05rem;
    line-height: 1.75;
  }
}

