:root {
  --azul: #2563EB;
  --morado: #7C3AED;
  --verde: #10B981;
  --naranja: #F97316;
  --coral: #EF4444;
  --fondo: #F5F5F5;
  --texto: #1F2937;
  --texto-sec: #6B7280;
  --borde: #D1D5DB;
  --blanco: #FFFFFF;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --transition: 0.3s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.6;
}

a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.solid {
  background: var(--blanco);
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blanco);
  font-weight: 700;
  font-size: 1rem;
}

.header.solid .header-logo { color: var(--texto); }

.header-logo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.header-nav {
  display: flex;
  gap: 20px;
  list-style: none;
}

.header-nav a {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.header.solid .header-nav a { color: var(--texto); }

.header-nav a:hover {
  color: var(--blanco);
  text-decoration: none;
}

.header.solid .header-nav a:hover { color: var(--azul); }

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: linear-gradient(135deg, var(--azul), var(--morado));
  color: var(--blanco);
}

.hero-perfil {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.3);
  object-fit: cover;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  max-width: 600px;
}

.hero p {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 560px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.hero-frase {
  font-style: italic;
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 24px;
}

.hero-redes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.red-social {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--blanco);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: capitalize;
  transition: background var(--transition);
}

.red-social:hover {
  background: rgba(255,255,255,0.25);
  text-decoration: none;
}

/* ============ SECCIONES ============ */
.seccion {
  padding: 72px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.seccion-titulo {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--texto);
}

.seccion-subtitulo {
  text-align: center;
  color: var(--texto-sec);
  margin-bottom: 40px;
  font-size: 1rem;
}

/* ============ GRUPOS DE EVENTOS ============ */
.seccion-eventos-grupo {
  margin-bottom: 40px;
}

.seccion-eventos-grupo:last-child {
  margin-bottom: 0;
}

.grupo-titulo {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--texto);
}

/* ============ EVENTOS GRID ============ */
.eventos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.evento-card {
  background: var(--blanco);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.evento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.evento-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.evento-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.evento-card:hover .evento-card-img img {
  transform: scale(1.05);
}

.evento-card-body {
  padding: 20px;
}

.evento-fecha {
  display: inline-block;
  background: var(--morado);
  color: var(--blanco);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.evento-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.evento-lugar {
  font-size: 0.9rem;
  color: var(--texto-sec);
  margin-bottom: 12px;
}

.evento-emprendedores {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.evento-emprendedores img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--borde);
}

/* ============ BOTONES ============ */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn:hover { transform: translateY(-1px); }

.btn-azul {
  background: var(--azul);
  color: var(--blanco);
}

.btn-azul:hover {
  background: #1d4ed8;
  text-decoration: none;
  color: var(--blanco);
}

.btn-naranja {
  background: var(--naranja);
  color: var(--blanco);
}

.btn-naranja:hover {
  background: #ea580c;
}

/* ============ EMPRENDEDORES ============ */
.emprendedores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.emprendedor-card {
  background: var(--blanco);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.emprendedor-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  border: 3px solid var(--borde);
}

.emprendedor-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emprendedor-card h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.emprendedor-card > p {
  color: var(--texto-sec);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.emprendedor-redes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.btn-red {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--borde);
  color: var(--texto);
  transition: all var(--transition);
}

.btn-red:hover {
  background: var(--fondo);
  text-decoration: none;
}

.btn-red.facebook:hover { border-color: var(--azul); color: var(--azul); }
.btn-red.instagram:hover { border-color: var(--morado); color: var(--morado); }
.btn-red.whatsapp:hover { border-color: var(--verde); color: var(--verde); }
.btn-red.web:hover { border-color: var(--naranja); color: var(--naranja); }

.emprendedor-galeria {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.galeria-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform var(--transition);
}

.galeria-img:hover {
  transform: scale(1.05);
}

/* ============ MODAL ============ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  backdrop-filter: blur(4px);
}

.modal-overlay.abierto { display: block; }

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--blanco);
  border-radius: 16px;
  z-index: 300;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal.abierto { display: block; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: rgba(0,0,0,0.5);
  color: var(--blanco);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background var(--transition);
}

.modal-close:hover { background: rgba(0,0,0,0.7); }

.modal-header {
  position: relative;
}

.modal-foto {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

.modal-info {
  padding: 20px 24px 16px;
}

.modal-info h2 {
  font-size: 1.25rem;
  margin: 10px 0 8px;
  line-height: 1.4;
}

.modal-lugar, .modal-horario {
  font-size: 0.92rem;
  color: var(--texto-sec);
  margin-bottom: 4px;
}

.modal-contenido {
  padding: 0 24px 24px;
}

.modal-contenido p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.modal-frase {
  font-style: italic;
  color: var(--morado);
  font-size: 1rem;
  margin: 16px 0;
  text-align: center;
}

.modal-mapa {
  margin: 20px 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.modal-emprendedores {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--borde);
}

.modal-emprendedores h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--texto);
}

.modal-emps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.modal-emp {
  text-align: center;
  padding: 12px;
  background: var(--fondo);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.modal-emp:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.modal-emp img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
}

.modal-emp strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.modal-emp span {
  font-size: 0.78rem;
  color: var(--texto-sec);
}

/* ============ MODAL - VISTA EMPRENDEDOR ============ */
.btn-volver-evento {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  margin: 16px 24px 0;
  background: none;
  border: 1px solid var(--borde);
  border-radius: 8px;
  color: var(--azul);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.btn-volver-evento:hover {
  background: var(--fondo);
  border-color: var(--azul);
}

.modal-emp-detalle {
  padding: 8px 24px 24px;
  text-align: center;
}

.modal-emp-header {
  margin-bottom: 20px;
}

.modal-emp-logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--borde);
}

.modal-emp-header h2 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.modal-emp-desc {
  color: var(--texto-sec);
  font-size: 0.95rem;
}

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  padding: 32px 24px;
  background: var(--texto);
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer a { color: var(--verde); }

/* ============ 404 ============ */
.pagina-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--azul), var(--morado));
  color: var(--blanco);
}

.pagina-404 h1 {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.pagina-404 p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 24px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.95rem; }
  .hero-perfil { width: 100px; height: 100px; }

  .header-nav { gap: 12px; }
  .header-nav a { font-size: 0.8rem; }

  .seccion { padding: 48px 16px; }
  .seccion-titulo { font-size: 1.4rem; }

  .eventos-grid { grid-template-columns: 1fr; }
  .emprendedores-grid { grid-template-columns: 1fr; }
  .emprendedor-galeria { grid-template-columns: repeat(3, 1fr); }

  .modal { width: 95%; }
  .modal-info { padding: 16px; }
  .modal-contenido { padding: 0 16px 16px; }
  .modal-emps-grid { grid-template-columns: 1fr 1fr; }
}
