﻿/* ============================================================ */
/* ===== BANNER PRINCIPAL ===== */
/* ============================================================ */

.hero-banner {
  position: relative;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 81, 152, 0.88) 0%, rgba(38, 49, 77, 0.82) 60%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
}

.hero-overlay::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, rgba(240, 242, 245, 1) 0%, transparent 100%);
  z-index: 1;
}

/* Siluetas de bombas petroleras */
.hero-pumps {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pump {
  position: absolute;
  bottom: 0;
  opacity: 0.32;
}

/* Bomba 1 - izquierda */
.pump-1 {
  left: 5%;
  bottom: 0;
}

/* Bomba 2 - centro */
.pump-2 {
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) scaleX(-1);
}

/* Bomba 3 - derecha */
.pump-3 {
  right: 3%;
  bottom: 0;
}

/* Silueta SVG de bomba extractora */
.pump svg {
  width: 220px;
  height: 165px;
  display: block;
  fill: #ffffff;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: #ffffff;
  max-width: 800px;
  padding: 60px 25px 80px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background-size: cover;
  background-position: center bottom;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.hero-content > * {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #3ddc84;
  background: rgba(61, 220, 132, 0.1);
  border: 1px solid rgba(61, 220, 132, 0.25);
  padding: 6px 20px;
  border-radius: 25px;
  margin-bottom: 18px;
}

.hero-content h1 {
  font-size: 44px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.15;
  text-shadow: 0 3px 15px rgba(0, 0, 0, 0.35);
}

.hero-content h1 span {
  color: #3ddc84;
}

.hero-content p {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
  max-width: 650px;
  margin: 0 auto;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

/* ============================================================ */
/* ===== SECCION DE REVISTAS ===== */
/* ============================================================ */

.magazines-section {
  padding: 50px 25px 80px;
}

.magazines-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== FILTRO DE ANOS - PILLS HORIZONTALES ===== */
.year-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.year-filter-label {
  font-size: 13px;
  font-weight: 700;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-right: 6px;
}

.year-pill {
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.year-pill:hover {
  border-color: #005198;
  color: #005198;
  background: #f0f7ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 81, 152, 0.12);
}

.year-pill.active {
  background: #005198;
  color: #ffffff;
  border-color: #005198;
  box-shadow: 0 4px 16px rgba(0, 81, 152, 0.3);
}

.year-pill.active:hover {
  transform: none;
  background: #004589;
}

/* ===== RESULT COUNT ===== */
.magazines-count-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.magazines-count-bar h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
}

.magazines-count-bar h2 i {
  color: #005198;
  margin-right: 8px;
}

.magazines-count-badge {
  font-size: 13px;
  color: #005198;
  background: rgba(0, 81, 152, 0.06);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
}

/* ===== LISTA DE REVISTAS - FILAS ===== */
.magazines-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@keyframes rowReveal {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.magazine-row {
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 32px 0;
  border-bottom: 1px solid #edf2f7;
  transition: background 0.3s ease;
}

.magazine-row.hidden {
  display: none;
}

.animate-rows .magazine-row:not(.hidden) {
  animation: rowReveal 0.45s ease forwards;
}

.animate-rows .magazine-row:not(.hidden):nth-child(1) { animation-delay: 0.00s; }
.animate-rows .magazine-row:not(.hidden):nth-child(2) { animation-delay: 0.06s; }
.animate-rows .magazine-row:not(.hidden):nth-child(3) { animation-delay: 0.12s; }
.animate-rows .magazine-row:not(.hidden):nth-child(4) { animation-delay: 0.18s; }
.animate-rows .magazine-row:not(.hidden):nth-child(5) { animation-delay: 0.24s; }
.animate-rows .magazine-row:not(.hidden):nth-child(6) { animation-delay: 0.30s; }

.magazine-row.reverse {
  flex-direction: row-reverse;
}

/* ===== PORTADA ===== */
.magazine-cover-wrapper {
  flex: 0 0 300px;
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.magazine-cover-wrapper:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.2);
}

.magazine-cover-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.magazine-cover-wrapper:hover img {
  transform: scale(1.04);
}

.cover-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 81, 152, 0.85) 0%, rgba(0, 81, 152, 0.2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 28px;
}

.magazine-cover-wrapper:hover .cover-hover-overlay {
  opacity: 1;
}

.cover-hover-overlay span {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 20px;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ===== INFORMACION ===== */
.magazine-info {
  flex: 1;
  padding: 8px 0;
}

.magazine-info .edition-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #005198;
  background: rgba(0, 81, 152, 0.07);
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.magazine-info h3 {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 6px;
  line-height: 1.2;
}

.magazine-info .issue-number {
  font-size: 13px;
  color: #a0aec0;
  font-weight: 500;
  margin-bottom: 14px;
  display: block;
}

.magazine-info .magazine-excerpt {
  font-size: 14px;
  color: #718096;
  line-height: 1.7;
  margin-bottom: 20px;
}

.magazine-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #005198;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  padding: 11px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-read:hover {
  background: #0b3d78;
  box-shadow: 0 4px 14px rgba(0, 81, 152, 0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #005198;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  padding: 11px 24px;
  border: 2px solid #005198;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-outline:hover {
  background: #005198;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 81, 152, 0.2);
}

/* ===== EMPTY STATE ===== */
.magazines-empty {
  text-align: center;
  padding: 80px 20px;
  color: #a0aec0;
}

.magazines-empty i {
  font-size: 56px;
  display: block;
  margin-bottom: 18px;
  opacity: 0.3;
}

.magazines-empty h3 {
  font-size: 18px;
  font-weight: 700;
  color: #4a5568;
  margin-bottom: 8px;
}

.magazines-empty p {
  font-size: 14px;
}

/* ============================================================ */
/* ===== VISOR DE PDF ===== */
/* ============================================================ */

.pdf-viewer {
  display: none;
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  flex-direction: column;
}

.pdf-viewer.active {
  display: flex;
}

.pdf-viewer-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 20px;
  flex-shrink: 0;
}

.pdf-viewer-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  font-size: 26px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.25s ease;
}

.pdf-viewer-close:hover {
  background: #ff4444;
  color: #ffffff;
}

.pdf-viewer-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
  background: #525659;
}

/* ============================================================ */
/* ===== LIGHTBOX ===== */
/* ============================================================ */

.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #ffffff;
  font-size: 38px;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 1;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.lightbox-close:hover {
  color: #ff4444;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ============================================================ */
/* ===== RESPONSIVE ===== */
/* ============================================================ */

@media (max-width: 992px) {
  .pump svg { width: 150px; height: 140px; }

  .magazine-row { gap: 30px; }
  .magazine-cover-wrapper { flex: 0 0 220px; }
  .magazine-info h3 { font-size: 20px; }
}

@media (max-width: 768px) {
  .hero-banner { min-height: 340px; }
  .hero-content h1 { font-size: 32px; }
  .hero-content p { font-size: 14px; }
  .pump svg { width: 120px; height: 110px; }
  .pump-1 { left: -10px; }
  .pump-3 { right: -10px; }

  .magazines-section { padding: 30px 18px 50px; }

  .magazine-row,
  .magazine-row.reverse {
    flex-direction: column;
    gap: 20px;
    padding: 24px 0;
    align-items: stretch;
  }

  .magazine-cover-wrapper { flex: 0 0 auto; max-width: 280px; margin: 0 auto; }
  .magazine-cover-wrapper img { aspect-ratio: 3/4; }
  .magazine-info { text-align: center; }
  .magazine-info h3 { font-size: 20px; }
  .magazine-actions { justify-content: center; }
  .magazines-count-bar { flex-direction: column; gap: 10px; align-items: flex-start; }
  .year-filter { gap: 6px; }
  .year-pill { padding: 7px 16px; font-size: 12px; }
  .year-filter-label { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .hero-banner { min-height: 280px; }
  .hero-content { padding: 45px 18px 60px; }
  .hero-content h1 { font-size: 26px; }
  .hero-content p { font-size: 13px; line-height: 1.6; }
  .hero-badge { font-size: 10px; letter-spacing: 2px; padding: 5px 14px; }
  .pump svg { width: 90px; height: 85px; }
  .pump-2 { display: none; }

  .magazines-section { padding: 24px 14px 40px; }
  .magazines-count-bar h2 { font-size: 17px; }
  .magazine-cover-wrapper { max-width: 220px; }
  .magazine-info h3 { font-size: 18px; }
  .magazine-info .magazine-excerpt { font-size: 13px; }
  .btn-read, .btn-outline { padding: 10px 18px; font-size: 12px; }
}
