/* css/press-public.css - Portal Público de Prensa y Detalle Editorial CATURCA */

:root {
  --press-blue-primary: #005eb8;
  --press-blue-dark: #2E3192;
  --press-navy-deep: #002244;
  --press-text-main: #222222;
  --press-text-muted: #666666;
  --press-bg-hero: #f4f7fb;
  --press-border: rgba(0, 0, 0, 0.08);
  --press-card-bg: #ffffff;
  --press-card-shadow: 0 4px 20px rgba(0, 34, 68, 0.05);
  --press-card-shadow-hover: 0 10px 30px rgba(0, 34, 68, 0.12);
}

/* --- Layout Principal --- */
.press-main {
  min-height: calc(100vh - 350px);
  padding-top: 90px;
  background-color: #ffffff;
  color: var(--press-text-main);
  overflow-x: hidden;
}

.press-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

/* --- Hero Institucional --- */
.press-hero {
  background: linear-gradient(135deg, #002244 0%, #2E3192 100%);
  color: #ffffff;
  padding: 4.5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.press-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(0, 94, 184, 0.25) 0%, transparent 60%);
  pointer-events: none;
}

.press-hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.press-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.press-hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Cuadrícula de Noticias (Grid) --- */
.press-section {
  padding: 3.5rem 0 5rem;
}

.press-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 1023px) {
  .press-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 767px) {
  .press-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .press-hero-title {
    font-size: 2rem;
  }
  .press-hero-subtitle {
    font-size: 1rem;
  }
}

/* --- Tarjeta Editorial (Card) --- */
.press-card {
  background: var(--press-card-bg);
  border: 1px solid var(--press-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--press-card-shadow);
  height: 100%;
}

.press-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--press-card-shadow-hover);
  border-color: rgba(0, 94, 184, 0.3);
}

.press-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.press-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.press-category-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: rgba(0, 94, 184, 0.08);
  color: var(--press-blue-primary);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.press-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--press-text-muted);
}

.press-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  color: var(--press-navy-deep);
}

.press-card-title a {
  color: inherit;
  text-decoration: none;
}

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

.press-card-excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 0.925rem;
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.press-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--press-border);
  padding-top: 1rem;
  margin-top: auto;
  font-size: 0.825rem;
}

.press-author {
  font-family: 'Inter', sans-serif;
  color: var(--press-text-muted);
  font-weight: 500;
}

.press-read-more {
  font-family: 'Inter', sans-serif;
  color: var(--press-blue-primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s ease;
}

.press-read-more:hover {
  gap: 0.5rem;
}

.press-read-more:focus-visible,
.press-card-title a:focus-visible,
.page-link:focus-visible,
.btn-institutional:focus-visible {
  outline: 2px solid var(--press-blue-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Paginación --- */
.press-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--press-border);
  border-radius: 8px;
  background-color: #ffffff;
  color: var(--press-navy-deep);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-link:hover:not(.disabled):not(.active) {
  background-color: var(--press-bg-hero);
  border-color: rgba(0, 94, 184, 0.3);
  color: var(--press-blue-primary);
}

.page-link.active {
  background-color: var(--press-blue-primary);
  border-color: var(--press-blue-primary);
  color: #ffffff;
  font-weight: 600;
  cursor: default;
}

.page-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Estado Vacío --- */
.press-empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--press-bg-hero);
  border-radius: 12px;
  border: 1px solid var(--press-border);
  margin: 2rem 0;
}

.press-empty-icon {
  font-size: 3rem;
  color: var(--press-blue-primary);
  margin-bottom: 1.5rem;
}

.press-empty-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--press-navy-deep);
  margin-bottom: 0.75rem;
}

.press-empty-text {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--press-text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Vista de Detalle de Noticia (/prensa/{slug}) --- */
.press-detail-article {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  box-sizing: border-box;
}

.press-breadcrumb {
  margin-bottom: 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--press-text-muted);
}

.press-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
}

.press-breadcrumb li::after {
  content: '/';
  margin-left: 0.5rem;
  color: #a0aec0;
}

.press-breadcrumb li:last-child::after {
  content: '';
}

.press-breadcrumb a {
  color: var(--press-blue-primary);
  text-decoration: none;
}

.press-breadcrumb a:hover {
  text-decoration: underline;
}

.press-breadcrumb [aria-current="page"] {
  color: var(--press-text-muted);
  font-weight: 500;
}

.press-detail-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--press-border);
  padding-bottom: 2rem;
}

.press-detail-header .press-category-badge {
  margin-bottom: 1rem;
}

.press-detail-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--press-navy-deep);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.press-detail-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: #4a5568;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.press-detail-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--press-text-muted);
  flex-wrap: wrap;
}

.press-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Cuerpo de Lectura Tipográfica */
.press-article-body {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #2d3748;
}

.press-article-body p {
  margin-bottom: 1.75rem;
}

.press-article-body h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--press-navy-deep);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.press-article-body h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--press-navy-deep);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.press-article-body h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--press-navy-deep);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.press-article-body blockquote {
  border-left: 4px solid var(--press-blue-primary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background-color: var(--press-bg-hero);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #1a202c;
}

.press-article-body blockquote p:last-child {
  margin-bottom: 0;
}

.press-article-body ul,
.press-article-body ol {
  margin: 1.5rem 0 2rem 1.75rem;
  padding-left: 0.5rem;
}

.press-article-body li {
  margin-bottom: 0.5rem;
}

.press-article-body a {
  color: var(--press-blue-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.press-article-body a:hover {
  color: var(--press-blue-dark);
}

.press-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  display: block;
}

.press-detail-footer {
  margin-top: 3.5rem;
  border-top: 1px solid var(--press-border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-institutional {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--press-navy-deep);
  color: #ffffff;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-institutional:hover {
  background-color: var(--press-blue-primary);
  color: #ffffff;
}

.btn-institutional-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  color: var(--press-navy-deep);
  border: 1px solid var(--press-navy-deep);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-institutional-outline:hover {
  background-color: var(--press-navy-deep);
  color: #ffffff;
}

/* --- Vista de Error 404 Institucional --- */
.press-404-container {
  max-width: 600px;
  margin: 4rem auto;
  padding: 3rem 1.5rem;
  text-align: center;
}

.press-404-code {
  font-family: 'Outfit', sans-serif;
  font-size: 6rem;
  font-weight: 800;
  color: var(--press-blue-primary);
  line-height: 1;
  margin-bottom: 1rem;
}

.press-404-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--press-navy-deep);
  margin-bottom: 1rem;
}

.press-404-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  color: var(--press-text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.press-404-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .press-detail-title {
    font-size: 1.85rem;
  }
  .press-detail-subtitle {
    font-size: 1.05rem;
  }
  .press-article-body {
    font-size: 1rem;
    line-height: 1.7;
  }
}

/* --- Tarjeta con Imagen Destacada (P1-E) --- */
.press-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: #f1f5f9;
  position: relative;
}

.press-card-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.press-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.press-card:hover .press-card-image img {
  transform: scale(1.04);
}

/* --- Figura Destacada en Detalle (P1-E) --- */
.press-detail-featured {
  margin: 2rem 0 2.5rem;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background-color: #f8fafc;
}

.press-detail-featured img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.press-featured-caption {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--press-text-muted);
  padding: 0.75rem 0.25rem 0;
  text-align: left;
  font-style: italic;
  line-height: 1.5;
}

.press-empty-actions {
  margin-top: 1.5rem;
}

/* --- Tarjetas Dinámicas de Prensa en Home (P1-E) --- */
.home-press-card {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 1.25rem;
}

.home-press-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 34, 68, 0.08);
}

.home-press-thumb {
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.home-press-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-press-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home-press-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.home-press-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #718096;
}

.home-press-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #003366;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.home-press-title a {
  color: inherit;
  text-decoration: none;
}

.home-press-title a:hover {
  color: #005eb8;
}

.home-press-excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #4a5568;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .home-press-card {
    flex-direction: column;
  }
  .home-press-thumb {
    width: 100%;
    height: 180px;
  }
}
