/* REDICT — diseño original del sitio (periódico académico) con la paleta del cliente:
   azul, violeta y verde claro (limón). Tipografía y estructura heredadas del original. */
:root {
  --color-primary: #2743b0;        /* azul (antes verde #119400) */
  --color-primary-dark: #1e3591;
  --color-secondary: #6d28d9;      /* violeta (antes azul #0051a8) */
  --color-lima: #b5de28;           /* verde limón */
  --color-lima-dark: #5c7a00;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f6fa;
  --color-bg-cream: #fafaf6;
  --color-text: #1a1a1a;
  --color-text-light: #6b6b6b;
  --color-text-muted: #999;
  --color-border: #e0e0e0;
  --color-border-light: #eee;
  --color-dark: #0a0a1a;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --max-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { color-scheme: light; scroll-behavior: smooth; }

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

button, a, input, textarea, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }

.skip-link { position: absolute; top: -100%; left: 0; z-index: 9999; background: var(--color-primary); color: #fff; padding: 12px 24px; font-size: 1rem; }
.skip-link:focus { top: 0; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 40px; } }
@media (min-width: 1240px) { .container { padding: 0; } }

/* ---------- Topbar ---------- */

.topbar { border-bottom: 1px solid var(--color-border); padding: 6px 0; font-family: var(--font-body); font-size: 0.8rem; color: var(--color-text-light); letter-spacing: 0.5px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
.topbar-right { display: flex; gap: 16px; align-items: center; }
.topbar-right a { color: var(--color-text-light); font-size: 0.8rem; transition: color 0.3s ease; }
.topbar-right a:hover { color: var(--color-primary); }

/* ---------- Masthead ---------- */

.masthead { padding: 20px 0 16px; border-bottom: 2px solid var(--color-text); text-align: center; position: relative; }
.masthead::before { content: ''; display: block; height: 1px; background: var(--color-text); margin-bottom: 16px; }
.masthead-logo { display: inline-block; margin-bottom: 10px; }
.masthead-logo img { height: 72px; width: auto; margin: 0 auto; }
.masthead-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--color-text);
  line-height: 1.1;
  text-wrap: balance;
}
.masthead-tagline { font-family: var(--font-body); font-size: 0.9rem; color: var(--color-text-light); margin-top: 6px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 400; }

/* ---------- Nav de secciones ---------- */

.sections-nav { border-bottom: 1px solid var(--color-border); background: var(--color-bg); position: sticky; top: 0; z-index: 100; transition: box-shadow 0.3s ease; }
.sections-nav.scrolled { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }
.sections-nav-inner { display: flex; align-items: center; gap: 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.sections-nav-inner::-webkit-scrollbar { display: none; }
.sections-nav-inner a {
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.sections-nav-inner a:hover, .sections-nav-inner a.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
@media (max-width: 768px) {
  .sections-nav-inner a { padding: 12px 14px; font-size: 0.78rem; letter-spacing: 1px; }
}

/* ---------- Breaking bar ---------- */

.breaking-bar { background: var(--color-bg-alt); border-bottom: 1px solid var(--color-border); padding: 8px 0; overflow: hidden; }
.breaking-inner { display: flex; align-items: center; gap: 16px; }
.breaking-label { background: var(--color-lima); color: var(--color-text); font-size: 0.7rem; font-weight: 700; padding: 3px 10px; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; border-radius: 2px; }
.breaking-text { font-family: var(--font-serif); font-size: 0.9rem; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breaking-text a { color: var(--color-text); transition: color 0.3s ease; }
.breaking-text a:hover { color: var(--color-primary); }

/* ---------- Portada: destacado + agenda ---------- */

.main-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding: 32px 0; border-bottom: 1px solid var(--color-border); }
@media (max-width: 900px) { .main-grid { grid-template-columns: 1fr; gap: 24px; } }

.featured-article { position: relative; }
.featured-article .feat-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
.feat-kicker { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--color-primary); margin: 16px 0 8px; font-family: var(--font-body); }
.feat-title { font-family: var(--font-heading); font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.15; color: var(--color-text); margin-bottom: 12px; text-wrap: balance; }
.feat-title a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
.feat-title a:hover { color: var(--color-primary); }
.feat-excerpt { font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.6; color: var(--color-text-light); margin-bottom: 12px; }
.byline { font-size: 0.8rem; color: var(--color-text-muted); font-family: var(--font-body); }

.sidebar-trending { border-left: 1px solid var(--color-border); padding-left: 32px; }
@media (max-width: 900px) { .sidebar-trending { border-left: none; padding-left: 0; border-top: 1px solid var(--color-border); padding-top: 24px; } }
.sidebar-heading { font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--color-text); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--color-lima); }
.trending-item { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--color-border-light); }
.trending-item:last-child { border-bottom: none; }
.trending-num { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--color-primary); line-height: 1; min-width: 32px; }
.trending-info { flex: 1; }
.trending-info .kicker { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--color-secondary); margin-bottom: 4px; display: block; }
.trending-info h3 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; line-height: 1.3; }
.trending-info h3 a { color: var(--color-text); transition: color 0.3s ease; }
.trending-info h3 a:hover { color: var(--color-primary); }
.trending-info .views { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 4px; }

/* ---------- Bloques de sección ---------- */

.section-block { padding: 40px 0; border-bottom: 1px solid var(--color-border); }
.section-block.alt-bg { background: var(--color-bg-alt); }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; padding-bottom: 12px; border-bottom: 1px solid var(--color-border); }
.section-header h2 { font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2.5px; color: var(--color-text); }
.section-header a { font-size: 0.8rem; color: var(--color-primary); font-weight: 500; transition: opacity 0.3s ease; }
.section-header a:hover { opacity: 0.7; }
.section-desc { font-family: var(--font-serif); font-size: 0.95rem; color: var(--color-text-light); margin: -16px 0 24px; }

.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .articles-grid { grid-template-columns: 1fr; } }

.article-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.article-card:hover { transform: translateY(-6px); }
.article-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; margin-bottom: 12px; }
.article-card .card-kicker { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--color-primary); margin-bottom: 6px; display: block; }
.article-card h3 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.article-card .card-excerpt { font-size: 0.9rem; color: var(--color-text-light); line-height: 1.5; margin-bottom: 8px; }
.article-card .byline { font-size: 0.75rem; }

.alt-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.alt-layout .alt-featured { grid-column: 1 / 2; grid-row: 1 / 3; }
.alt-layout .alt-featured img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.alt-layout .alt-featured h3 { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; margin: 8px 0; }
.alt-layout .alt-featured h3 a { color: var(--color-text); }
.alt-layout .alt-side { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--color-border-light); }
.alt-layout .alt-side img { width: 120px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.alt-layout .alt-side-info h3 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.alt-layout .alt-side-info h3 a { color: var(--color-text); transition: color 0.3s ease; }
.alt-layout .alt-side-info h3 a:hover { color: var(--color-primary); }
@media (max-width: 768px) {
  .alt-layout { grid-template-columns: 1fr; }
  .alt-layout .alt-featured { grid-column: 1; grid-row: auto; }
}

.cat-empty {
  font-family: var(--font-serif);
  color: var(--color-text-light);
  border: 1px dashed var(--color-border);
  border-radius: 4px;
  padding: 28px 24px;
  text-align: center;
}
.cat-empty strong { font-family: var(--font-heading); color: var(--color-text); display: block; margin-bottom: 4px; }

.section-sep { height: 1px; background: linear-gradient(to right, transparent, rgba(181, 222, 40, 0.45), transparent); margin: 0; }

/* ---------- Nosotros ---------- */

.about-hero { padding: 40px 0 32px; text-align: center; border-bottom: 1px solid var(--color-border); }
.about-hero h2 { font-family: var(--font-heading); font-size: 2.6rem; font-weight: 800; margin-bottom: 16px; text-wrap: balance; }
.about-hero p { font-family: var(--font-serif); font-size: 1.2rem; color: var(--color-text-light); max-width: 680px; margin: 0 auto; line-height: 1.7; }

.about-content { padding: 40px 0 8px; max-width: 780px; margin: 0 auto; }
.about-content h3 { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; margin: 32px 0 16px; color: var(--color-text); }
.about-content p { font-family: var(--font-serif); font-size: 1.1rem; line-height: 1.8; color: var(--color-text-light); margin-bottom: 16px; text-align: justify; }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 48px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); margin-top: 32px; }
@media (max-width: 768px) { .values-grid { grid-template-columns: 1fr; } }
.value-card { text-align: center; padding: 24px; }
.value-card .material-icons { font-size: 40px; color: var(--color-secondary); margin-bottom: 16px; }
.value-card h3 { font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 8px; }
.value-card p { font-size: 0.95rem; color: var(--color-text-light); line-height: 1.6; }

.team-section { padding: 60px 0 20px; }
.team-section h2 { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; text-align: center; margin-bottom: 40px; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 768px) { .team-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; } }
.team-card { text-align: center; padding: 32px 24px; border: 1px solid var(--color-border-light); border-radius: 8px; transition: transform 0.3s ease, box-shadow 0.3s ease; background: var(--color-bg); }
.team-card:hover { transform: translateY(-6px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); }
.team-card .initials {
  width: 96px; height: 96px; border-radius: 50%;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  font-family: var(--font-heading);
  font-size: 2rem; font-weight: 700;
}
.team-card h3 { font-family: var(--font-heading); font-size: 1.15rem; margin-bottom: 4px; }
.team-card .role { font-size: 0.85rem; color: var(--color-primary); font-weight: 600; margin-bottom: 12px; }

/* ---------- Contacto ---------- */

.contact-header { padding: 40px 0 32px; text-align: center; border-bottom: 1px solid var(--color-border); }
.contact-header h2 { font-family: var(--font-heading); font-size: 2.4rem; font-weight: 800; margin-bottom: 8px; }
.contact-header p { font-size: 1.05rem; color: var(--color-text-light); max-width: 600px; margin: 0 auto; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 48px 0 8px; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--color-primary); }
.form-row textarea { min-height: 140px; resize: vertical; }

.btn-primary {
  padding: 14px 32px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  font-family: var(--font-body);
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); }

.form-success { display: none; padding: 16px; background: rgba(181, 222, 40, 0.14); border: 1px solid rgba(92, 122, 0, 0.3); border-radius: 4px; color: var(--color-lima-dark); font-weight: 500; margin-top: 16px; }
.form-error { display: none; padding: 16px; background: rgba(192, 57, 43, 0.08); border: 1px solid rgba(192, 57, 43, 0.25); border-radius: 4px; color: #b3261e; font-weight: 500; margin-top: 16px; }

.contact-info h3 { font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 20px; }
.info-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; }
.info-item .material-icons { color: var(--color-primary); font-size: 24px; margin-top: 2px; }
.info-item div h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 2px; }
.info-item div p { font-size: 0.9rem; color: var(--color-text-light); overflow-wrap: anywhere; }
.contact-social { display: flex; gap: 16px; margin-top: 24px; }
.contact-social a {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text);
  font-size: 1.1rem;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.contact-social a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.map-container { margin-top: 24px; border-radius: 12px; overflow: hidden; border: 1px solid var(--color-border); }
.map-container iframe { width: 100%; height: 280px; border: 0; }

/* ---------- Newsletter ---------- */

.newsletter-section { padding: 60px 0; background: linear-gradient(135deg, rgba(39, 67, 176, 0.04) 0%, rgba(109, 40, 217, 0.05) 100%); text-align: center; }
.newsletter-section h2 { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.newsletter-section p { font-size: 1rem; color: var(--color-text-light); margin-bottom: 24px; max-width: 500px; margin-left: auto; margin-right: auto; }
.newsletter-form { display: flex; gap: 12px; max-width: 460px; margin: 0 auto; justify-content: center; }
.newsletter-form input { flex: 1; padding: 14px 20px; border: 1px solid var(--color-border); border-radius: 4px; font-size: 1rem; font-family: var(--font-body); }
.newsletter-form button {
  padding: 14px 28px;
  background: var(--color-lima);
  color: var(--color-text);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  font-family: var(--font-body);
}
.newsletter-form button:hover { background: #c6ec4a; transform: translateY(-2px); }
.newsletter-success { display: none; color: var(--color-lima-dark); font-weight: 600; margin-top: 12px; }
@media (max-width: 500px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-form input, .newsletter-form button { width: 100%; }
}

/* ---------- Footer ---------- */

footer { background: var(--color-dark); color: rgba(255, 255, 255, 0.8); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 16px; }
.footer-col p, .footer-col a { font-size: 0.9rem; color: rgba(255, 255, 255, 0.65); line-height: 1.7; }
.footer-col a { display: block; margin-bottom: 6px; transition: color 0.3s ease; }
.footer-col a:hover { color: var(--color-lima); }
.footer-social { display: flex; gap: 16px; margin-top: 12px; }
.footer-social a { color: rgba(255, 255, 255, 0.65); font-size: 1.2rem; transition: color 0.3s ease, transform 0.3s ease; display: inline-block; }
.footer-social a:hover { color: var(--color-lima); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 20px 0; text-align: center; font-size: 0.8rem; color: rgba(255, 255, 255, 0.4); }
.footer-bottom span { display: block; margin-top: 4px; }

/* ---------- WhatsApp flotante ---------- */

.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  background: #25d366; color: #fff;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: waPulse 2s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5); }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.2), 0 0 0 12px rgba(37, 211, 102, 0.08); }
}

/* ---------- Animaciones ---------- */

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
