/* =============================================
   IEHL – Instituto de Estudios Históricos de Lima
   Hoja de estilos principal – v2
   ============================================= */

/* ---- RESET & BASE ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --azul:       #1B4F8A;
  --azul-dark:  #0D2F5C;
  --azul-light: #2E6DB4;
  --morado:     #8B6B9E;
  --dorado:     #C9A84C;
  --gris-bg:    #F4F6F9;
  --gris-dark:  #2C2C2C;
  --blanco:     #FFFFFF;
  --texto:      #333333;
  --texto-suave:#666666;
  --sombra:     0 4px 24px rgba(0,0,0,0.10);
  --sombra-lg:  0 8px 40px rgba(0,0,0,0.16);
  --radio:      10px;
  --transicion: all 0.35s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--texto);
  background: var(--blanco);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

.section { padding: 90px 0; }

/* ---- BOTONES ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transicion);
}
.btn-primary {
  background: var(--azul);
  color: var(--blanco);
  border-color: var(--azul);
}
.btn-primary:hover {
  background: var(--azul-dark);
  border-color: var(--azul-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27,79,138,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--blanco);
  border-color: var(--blanco);
}
.btn-outline:hover {
  background: var(--blanco);
  color: var(--azul);
}
.btn-download {
  background: var(--dorado);
  color: var(--blanco);
  border-color: var(--dorado);
  padding: 11px 22px;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-download:hover {
  background: #b8922e;
  border-color: #b8922e;
  transform: translateY(-2px);
}
.btn-full { width: 100%; justify-content: center; }

/* ---- SECTION HEADER ---- */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header p { max-width: 640px; margin: 14px auto 0; color: var(--texto-suave); line-height: 1.7; }
.section-header.light h2, .section-header.light p { color: var(--blanco); }
.section-header.light .section-tag { color: var(--dorado); }

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--azul);
  margin-bottom: 10px;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--azul-dark);
  line-height: 1.25;
}

.divider {
  width: 60px;
  height: 4px;
  background: var(--dorado);
  border-radius: 2px;
  margin: 18px 0 22px;
}

/* =============================================
   NAVBAR
   ============================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(13, 47, 92, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  transition: var(--transicion);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  background: white;
  padding: 4px;
}
.nav-links {
  display: flex;
  gap: 6px;
}
.nav-links a {
  color: rgba(255,255,255,0.88);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: var(--transicion);
}
.nav-links a:hover {
  color: var(--blanco);
  background: rgba(255,255,255,0.12);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--blanco);
  border-radius: 2px;
  transition: var(--transicion);
}

/* =============================================
   HERO SLIDER
   ============================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,47,92,0.82) 0%, rgba(13,47,92,0.45) 100%);
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 8% 0 8%;
  max-width: 760px;
}
.hero-badge {
  display: inline-block;
  background: var(--dorado);
  color: var(--blanco);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 900;
  color: var(--blanco);
  line-height: 1.15;
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-content p {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: rgba(255,255,255,0.88);
  margin-bottom: 34px;
  max-width: 520px;
  line-height: 1.6;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  color: var(--blanco);
  width: 50px; height: 50px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transicion);
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
}
.slider-btn:hover { background: var(--azul); border-color: var(--azul); }
.slider-prev { left: 24px; }
.slider-next { right: 24px; }

.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: var(--transicion);
}
.dot.active { background: var(--dorado); transform: scale(1.3); }

/* =============================================
   STATS BAR
   ============================================= */
.stats-bar {
  background: var(--azul-dark);
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  padding: 28px 5%;
  gap: 20px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--dorado);
}
.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =============================================
   NOSOTROS
   ============================================= */
.nosotros-section { background: var(--gris-bg); }
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.nosotros-images {
  position: relative;
  height: 500px;
}
.nosotros-img-main {
  width: 75%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radio);
  box-shadow: var(--sombra-lg);
  position: absolute;
  top: 0; left: 0;
}
.nosotros-img-secondary {
  width: 68%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radio);
  box-shadow: var(--sombra-lg);
  position: absolute;
  bottom: 0; right: 0;
  border: 5px solid var(--blanco);
}
.nosotros-text h2 { margin-bottom: 0; }
.nosotros-text p {
  color: var(--texto-suave);
  line-height: 1.75;
  margin-bottom: 16px;
  font-size: 0.97rem;
}
.nosotros-cards {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nosotros-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 18px 20px;
  box-shadow: var(--sombra);
}
.nosotros-card i {
  font-size: 1.5rem;
  color: var(--azul);
  margin-top: 2px;
  flex-shrink: 0;
}
.nosotros-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--azul-dark);
  margin-bottom: 4px;
}
.nosotros-card p { font-size: 0.88rem; color: var(--texto-suave); margin: 0; }

/* =============================================
   ACTIVIDADES
   ============================================= */
.actividades-section { background: var(--blanco); }
.actividades-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.actividad-card {
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  transition: var(--transicion);
  background: var(--blanco);
}
.actividad-card:hover { transform: translateY(-6px); box-shadow: var(--sombra-lg); }
.actividad-img {
  height: 180px;
  background-size: cover;
  background-position: center;
}
.actividad-body {
  padding: 22px 20px;
}
.actividad-body i {
  font-size: 1.6rem;
  color: var(--azul);
  margin-bottom: 12px;
}
.actividad-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--azul-dark);
  margin-bottom: 10px;
}
.actividad-body p { font-size: 0.88rem; color: var(--texto-suave); line-height: 1.65; }

/* =============================================
   PASEOS
   ============================================= */
.paseos-section { background: var(--azul-dark); }
.paseos-section .section-tag { color: var(--dorado); }
.paseos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.paseo-item {
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3/4;
}
.paseo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.paseo-item:hover img { transform: scale(1.07); }
.paseo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,47,92,0.88) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 16px;
  opacity: 0;
  transition: var(--transicion);
}
.paseo-item:hover .paseo-overlay { opacity: 1; }
.paseo-overlay h4 { color: var(--blanco); font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.paseo-overlay p  { color: rgba(255,255,255,0.75); font-size: 0.8rem; margin-bottom: 8px; }
.paseo-overlay i  { color: var(--dorado); font-size: 1.2rem; }

/* =============================================
   APOYO
   ============================================= */
.apoyo-section { background: var(--gris-bg); }
.apoyo-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.apoyo-img-col img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radio);
  box-shadow: var(--sombra-lg);
}
.apoyo-text-col h2 { margin-bottom: 0; }
.apoyo-text-col > p {
  color: var(--texto-suave);
  line-height: 1.75;
  margin-bottom: 28px;
  font-size: 0.97rem;
}
.apoyo-items { display: flex; flex-direction: column; gap: 22px; }
.apoyo-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.apoyo-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--dorado);
  line-height: 1;
  width: 44px;
  flex-shrink: 0;
}
.apoyo-item h4 { font-size: 1rem; font-weight: 700; color: var(--azul-dark); margin-bottom: 4px; }
.apoyo-item p  { font-size: 0.9rem; color: var(--texto-suave); line-height: 1.6; }

/* =============================================
   DESCARGAS
   ============================================= */
.descargas-section { background: var(--blanco); }
.descargas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}
.descarga-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--gris-bg);
  border: 1px solid #e0e6ef;
  border-radius: var(--radio);
  padding: 26px 24px;
  transition: var(--transicion);
  box-shadow: var(--sombra);
}
.descarga-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-lg); border-color: var(--azul-light); }
.descarga-icon {
  width: 56px; height: 56px;
  background: var(--azul);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.descarga-icon i { font-size: 1.5rem; color: var(--blanco); }
.descarga-info { flex: 1; }
.descarga-info h4 { font-size: 1rem; font-weight: 700; color: var(--azul-dark); margin-bottom: 6px; }
.descarga-info p  { font-size: 0.85rem; color: var(--texto-suave); line-height: 1.5; margin-bottom: 8px; }
.descarga-badge {
  display: inline-block;
  background: #e74c3c;
  color: var(--blanco);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}

/* =============================================
   REDES SOCIALES
   ============================================= */
.redes-section { background: var(--azul-dark); }
.redes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.red-card {
  border-radius: var(--radio);
  padding: 32px 22px;
  text-align: center;
  transition: var(--transicion);
  color: var(--blanco);
}
.red-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.red-card i { font-size: 2.2rem; margin-bottom: 14px; }
.red-card h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.red-card span { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 10px; opacity: 0.85; }
.red-card p  { font-size: 0.83rem; opacity: 0.75; line-height: 1.5; }
.red-instagram { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }
.red-facebook  { background: #1877F2; }
.red-web       { background: var(--azul); }
.red-whatsapp  { background: #25D366; }

/* =============================================
   CONTACTO
   ============================================= */
.contacto-section { background: var(--gris-bg); }
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}
.contacto-info h2 { margin-bottom: 0; }
.contacto-info > p {
  color: var(--texto-suave);
  line-height: 1.75;
  margin-bottom: 28px;
  font-size: 0.97rem;
}
.contacto-list { display: flex; flex-direction: column; gap: 18px; }
.contacto-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.contacto-icon {
  width: 44px; height: 44px;
  background: var(--azul);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contacto-icon i { color: var(--blanco); font-size: 1rem; }
.contacto-item span { display: block; font-size: 0.78rem; color: var(--texto-suave); text-transform: uppercase; letter-spacing: 1px; }
.contacto-item strong { display: block; font-size: 0.97rem; color: var(--azul-dark); }
.contacto-item small  { display: block; font-size: 0.82rem; color: var(--texto-suave); }
.contacto-item a strong { color: var(--azul); }
.contacto-item a:hover strong { text-decoration: underline; }

.contacto-form-col {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 36px 32px;
  box-shadow: var(--sombra);
}
.contacto-form-col h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--azul-dark);
  margin-bottom: 24px;
}
.contacto-form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--texto); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 1.5px solid #dde3ed;
  border-radius: 8px;
  font-size: 0.93rem;
  font-family: 'Inter', sans-serif;
  color: var(--texto);
  background: var(--gris-bg);
  transition: border-color 0.25s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--azul); background: var(--blanco); }
.form-group textarea { resize: vertical; min-height: 110px; }

/* =============================================
   FOOTER
   ============================================= */
.footer { background: var(--azul-dark); color: rgba(255,255,255,0.80); padding: 60px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 50px;
}
.footer-logo {
  height: 70px;
  width: auto;
  object-fit: contain;
  background: var(--blanco);
  border-radius: 8px;
  padding: 6px;
  margin-bottom: 18px;
}
.footer-brand p { font-size: 0.88rem; line-height: 1.7; max-width: 280px; }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--blanco);
  font-size: 0.95rem;
  transition: var(--transicion);
}
.footer-social a:hover { background: var(--dorado); }
.footer-nav h5, .footer-contact h5 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dorado);
  margin-bottom: 20px;
}
.footer-nav ul li, .footer-contact ul li {
  margin-bottom: 10px;
}
.footer-nav ul li a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  transition: var(--transicion);
}
.footer-nav ul li a:hover { color: var(--dorado); padding-left: 4px; }
.footer-contact ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}
.footer-contact ul li i { color: var(--dorado); width: 16px; }
.footer-contact ul li a { color: rgba(255,255,255,0.75); transition: var(--transicion); }
.footer-contact ul li a:hover { color: var(--dorado); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.5); }

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
#lightboxImg {
  max-width: 88vw;
  max-height: 88vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 8px 60px rgba(0,0,0,0.5);
}
.lb-close {
  position: absolute;
  top: 20px; right: 24px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--blanco);
  font-size: 1.4rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transicion);
}
.lb-close:hover { background: #e74c3c; }
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--blanco);
  font-size: 1.2rem;
  width: 50px; height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transicion);
}
.lb-nav:hover { background: var(--azul); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* =============================================
   BACK TO TOP
   ============================================= */
#backToTop {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 46px; height: 46px;
  background: var(--azul);
  color: var(--blanco);
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(27,79,138,0.4);
  transition: var(--transicion);
  z-index: 900;
}
#backToTop.visible { display: flex; }
#backToTop:hover { background: var(--azul-dark); transform: translateY(-3px); }

/* =============================================
   ANIMACIONES DE ENTRADA
   ============================================= */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .actividades-grid, .redes-grid { grid-template-columns: repeat(2, 1fr); }
  .paseos-grid { grid-template-columns: repeat(2, 1fr); }
  .nosotros-grid, .apoyo-grid, .contacto-grid { grid-template-columns: 1fr; gap: 40px; }
  .nosotros-images { height: 360px; }
  .nosotros-img-main  { width: 70%; height: 280px; }
  .nosotros-img-secondary { width: 60%; height: 220px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .descargas-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: var(--azul-dark); padding: 16px 0; gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 24px; border-radius: 0; }
  .nav-toggle { display: flex; }
  .hero-content { padding: 0 6%; }
  .actividades-grid { grid-template-columns: 1fr; }
  .paseos-grid { grid-template-columns: 1fr 1fr; }
  .redes-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-bar { flex-direction: column; align-items: center; }
  .descarga-card { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .paseos-grid { grid-template-columns: 1fr; }
  .redes-grid  { grid-template-columns: 1fr; }
  .hero-btns   { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .section { padding: 60px 0; }
  .contacto-form-col { padding: 24px 18px; }
}
