/* ================================
   Reset y configuración base mejorada
================================ */
:root {
  --primary-color: #2c5aa0;
  --secondary-color: #e74c3c;
  --accent-color: #8fb2d4;
  --dark-color: #1a1f2b;
  --light-color: #f8f9fa;
  --text-color: #333;
  --text-light: #fff;
  --gradient-primary: linear-gradient(135deg, #397bd8, #3463c2);
  --gradient-secondary: linear-gradient(135deg, #e74c3c, #c0392b);
  --gradient-dark: linear-gradient(135deg, #1a1f2b, #2c3e50);
  --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.2);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================================
   Utilidades mejoradas
================================ */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 3rem;
  color: var(--primary-color);
  position: relative;
  font-weight: 700;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--secondary-color);
  margin: 20px auto;
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-light);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2d426d, #2e5ab0);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid #abaeb3;
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
}

.btn-inscripcion {
  background: var(--secondary-color);
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: 25px;
}

.btn-inscripcion:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

/* ================================
   Header / Navbar Moderno
================================ */
.header {
  background: rgba(255, 255, 255, 0.98);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar {
  padding: 0;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-img {
  width: 100px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-img:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
  margin: 0;
  height: 100%;
}

.nav-menu li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  padding: 28px 20px;
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 1rem;
  letter-spacing: 0.3px;
}

.nav-menu a:not(.btn-inscripcion)::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(135deg, #2c5aa0, #e74c3c);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px 2px 0 0;
}

.nav-menu a:not(.btn-inscripcion):hover {
  color: #2c5aa0;
}

.nav-menu a:not(.btn-inscripcion):hover::before {
  width: 80%;
}

.nav-menu a.active {
  color: #2c5aa0;
}

.nav-menu a.active::before {
  width: 80%;
  background: #2c5aa0;
}

/* Estilo especial para el botón de inscripción */
.nav-menu .btn-inscripcion {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  margin-left: 15px;
  border-radius: 50px;
  padding: 12px 28px;
  height: auto;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
  border: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.nav-menu .btn-inscripcion::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.nav-menu .btn-inscripcion:hover::before {
  left: 100%;
}

.nav-menu .btn-inscripcion:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
  background: linear-gradient(135deg, #c0392b, #a93226);
}

/* Indicador de página activa */
.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #2c5aa0;
  border-radius: 2px 2px 0 0;
  transition: all 0.3s ease;
  z-index: 1;
}

/* ================================
   Menú Hamburguesa Mejorado
================================ */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  background: rgba(44, 90, 160, 0.1);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.hamburger:hover {
  background: rgba(44, 90, 160, 0.2);
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #2c5aa0;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active {
  background: rgba(44, 90, 160, 0.2);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
  background: #e74c3c;
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
  background: #e74c3c;
}

/* ================================
   Efecto de scroll en el header
================================ */
.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

/* ================================
   Hero Section mejorada
================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6)),
              url('assets/images/biblioteca_unap.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  padding: 120px 20px 80px;
  position: relative;
  text-align: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 900;
  color: var(--text-light);
  text-align: center;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  text-shadow: 0 3px 8px rgba(0,0,0,0.6);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--accent-color);
  text-align: center;
  margin-bottom: 2rem;
}

.hero-info {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #eee;
}

.info-item i {
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-buttons .btn-primary,
.hero-buttons .btn-secondary {
  background: var(--gradient-secondary);
  color: var(--text-light);
  border: none;
  border-radius: 30px;
  padding: 12px 28px;
  font-weight: 600;
}

.hero-buttons .btn-primary:hover,
.hero-buttons .btn-secondary:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-2px);
}

/* ================================
   About Section mejorada
================================ */
.about {
  padding: 80px 0;
  background: white;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: #555;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  background: var(--light-color);
  border-radius: 10px;
  transition: var(--transition);
}

.stat:hover {
  transform: translateY(-5px);
}

.stat h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
  font-weight: 700;
}

.stat p {
  color: #666;
  font-weight: 500;
  margin-top: 0.5rem;
}

.about-image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 15px;
}

/* ================================
   Program Preview mejorada
================================ */
.program-preview {
  padding: 80px 0;
  background: linear-gradient(135deg, #2c5aa0, #1e4082);
  color: white;
}

.program-preview .section-title {
  color: white;
}

.program-preview .section-title::after {
  background: var(--secondary-color);
}

.program-days {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.day-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.day-card:hover {
  transform: translateY(-5px);
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 1rem;
}

.day-header h3 {
  font-size: 1.5rem;
}

.day-header span {
  background: var(--secondary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
}

.day-content ul {
  list-style: none;
}

.day-content li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.day-content li::before {
  content: '✓';
  color: var(--secondary-color);
  font-weight: bold;
  margin-right: 0.5rem;
}

.program-cta {
  text-align: center;
}

/* ================================
   Speakers Section mejorada
================================ */
.speakers {
  padding: 80px 0;
  background: var(--light-color);
}

.speakers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.speaker-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.speaker-card:hover {
  transform: translateY(-10px);
}

.speaker-card img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: none;
}

.speaker-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.speaker-card p {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.speaker-card span {
  color: #666;
  font-size: 0.9rem;
}

.speakers-cta {
  text-align: center;
}

/* ================================
   Registration Section mejorada
================================ */
.registration {
  padding: 80px 0;
  background: white;
}

.registration-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
}

.pricing-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.price-card {
  background: var(--light-color);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  border: 3px solid transparent;
  transition: var(--transition);
}

.price-card.featured {
  border-color: var(--secondary-color);
  transform: scale(1.05);
  background: linear-gradient(135deg, #2c5aa0, #1e4082);
  color: white;
}

.price-card:hover {
  transform: translateY(-5px);
}

.price-card.featured:hover {
  transform: scale(1.05) translateY(-5px);
}

.price-card h4 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.price-card.featured h4 {
  color: white;
}

.price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.price-card.featured .price {
  color: #fff;
}

.price-card ul {
  list-style: none;
  text-align: left;
}

.price-card li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.price-card li::before {
  content: '✓';
  color: var(--secondary-color);
  font-weight: bold;
  margin-right: 0.5rem;
}

.registration-form {
  background: var(--light-color);
  padding: 2rem;
  border-radius: 15px;
}

.registration-form h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.registration-form input,
.registration-form select {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

.registration-form input:focus,
.registration-form select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* ================================
   Location Section mejorada
================================ */
.location {
  padding: 80px 0;
  background: var(--light-color);
}

.location-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.location-info h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.location-info p {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location-info i {
  color: var(--secondary-color);
  width: 20px;
}

.location-info h4 {
  color: var(--primary-color);
  margin: 2rem 0 1rem 0;
}

.location-info ul {
  list-style: none;
}

.location-info li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.location-info li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

.location-map iframe {
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ================================
   Footer mejorado (manteniendo colores)
================================ */
.new-footer {
  background: linear-gradient(135deg, #1a1f2b, #2c3e50);
  color: #fff;
  padding: 60px 20px 20px;
}

.new-footer-container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

.footer-logo {
  text-align: center;
}

.footer-logo img {
  width: 70px;
  margin-bottom: 15px;
}

.footer-logo h3 {
  color: #fff;
  margin-bottom: 8px;
}

.footer-logo p {
  font-size: 0.9rem;
  color: #bbb;
}

.footer-links h4,
.footer-contact h4,
.footer-social h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  position: relative;
  color: #f8f9fa;
}

.footer-links h4::after,
.footer-contact h4::after,
.footer-social h4::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: #e74c3c;
  margin-top: 6px;
  border-radius: 2px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 0.6rem;
}

.footer-links ul li a {
  text-decoration: none;
  color: #bbb;
  transition: all 0.3s ease;
}

.footer-links ul li a:hover {
  color: #fff;
  padding-left: 5px;
}

.footer-contact p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #bbb;
}

.footer-contact i {
  color: #e74c3c;
  margin-right: 8px;
}

.footer-social .social-icons {
  display: flex;
  gap: 10px;
}

.footer-social .social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.footer-social .social-icons a:hover {
  background: #e74c3c;
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  font-size: 0.9rem;
  color: #aaa;
}

/* ================================
   Responsive Design Mejorado
================================ */

/* Tablet */
@media (max-width: 991px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: left 0.3s ease;
    z-index: 999;
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .program-days {
    grid-template-columns: repeat(2, 1fr);
  }

  .speakers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-table {
    grid-template-columns: repeat(2, 1fr);
  }

  .registration-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .new-footer-container {
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
  }

  .footer-social .social-icons {
    justify-content: center;
  }
}

/* Celular */
@media (max-width: 768px) {
  .nav-menu {
    position: absolute;
    top: 70px;
    right: 0;
    flex-direction: column;
    background: #fff;
    width: 100%;
    text-align: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid #ddd;
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .hero-title {
    font-size: 2.5rem;
    line-height: 1.1;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .program-days {
    grid-template-columns: 1fr;
  }

  .speakers-grid {
    grid-template-columns: 1fr;
  }

  .pricing-table {
    grid-template-columns: 1fr;
  }

  .price-card.featured {
    transform: scale(1);
  }

  .price-card.featured:hover {
    transform: scale(1) translateY(-5px);
  }

  .location-content {
    grid-template-columns: 1fr;
  }
}

/* Celular pequeño */
@media (max-width: 576px) {
  .container {
    padding: 0 15px;
  }

  .section {
    padding: 60px 0;
  }

  .hero {
    padding: 100px 15px 60px;
    min-height: 90vh;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-info {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.6rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .new-footer-container {
    grid-template-columns: 1fr;
  }

  .footer-logo {
    text-align: center;
  }
}

/* Soporte para navegadores antiguos */
@supports not (display: grid) {
  .about-content,
  .program-days,
  .speakers-grid,
  .pricing-table,
  .new-footer-container {
    display: flex;
    flex-wrap: wrap;
  }
  
  .about-content > *,
  .program-days > *,
  .speakers-grid > *,
  .pricing-table > *,
  .new-footer-container > * {
    flex: 1 1 300px;
    margin: 10px;
  }
}