/*=========== VARIABLES CSS =========*/
:root {
  --header-height: 4rem;
  /* Colores principales */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --primary-bg: #eef2ff;
  --secondary: #f97316;
  --secondary-dark: #ea580c;
  --accent: #06b6d4;
  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  /* Neutrales */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  /* Tipografía */
  --font-family: 'Inter', sans-serif;
  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  /* Border radius */
  --radius-sm: .375rem;
  --radius: .5rem;
  --radius-md: .75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  /* Z-index */
  --z-dropdown: 50;
  --z-fixed: 100;
  --z-modal: 1000;
}

/*============ BASE ===========*/
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  background-color: var(--white);
  color: var(--gray-700);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { color: var(--gray-900); font-weight: 700; line-height: 1.2; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: color .3s; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/*============ UTILITIES ===========*/
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/*============ BUTTONS ===========*/
.button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  transition: all .3s ease;
  border: 2px solid transparent;
}
.button:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.button--ghost { background: transparent; color: var(--gray-700); border-color: var(--gray-300); }
.button--ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.button--outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.button--outline:hover { background: var(--primary); color: var(--white); }
.button--small { padding: .5rem 1rem; font-size: var(--text-xs); }
.button--large { padding: 1rem 2rem; font-size: var(--text-base); }
.button--full { width: 100%; justify-content: center; }

/*============ HEADER ===========*/
.header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: var(--z-fixed);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-100);
  transition: all .3s;
}
.header.scroll-header { box-shadow: var(--shadow-md); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--gray-900);
}
.nav__logo img { height: 44px; width: auto; display: block; max-height: none; }
.nav__logo-icon { font-size: 1.5rem; color: var(--primary); }
.logo-accent { color: var(--primary); }
.nav__list { display: flex; align-items: center; gap: 2rem; }
.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
  transition: color .3s;
  position: relative;
}
.nav__link:hover { color: var(--primary); }
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width .3s;
}
.nav__link:hover::after { width: 100%; }
.nav__btns { display: flex; align-items: center; gap: .75rem; }
.nav__toggle, .nav__close { display: none; font-size: 1.5rem; cursor: pointer; }

/*============ HERO ===========*/
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  overflow: hidden;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(99,102,241,.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(249,115,22,.1) 0%, transparent 50%);
}
.hero__particles {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,.15), transparent),
                    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,.1), transparent),
                    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,.12), transparent),
                    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,.08), transparent),
                    radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,.15), transparent);
  background-size: 200px 100px;
  animation: particleFloat 20s linear infinite;
}
@keyframes particleFloat { to { transform: translateY(-100px); } }

.hero__container { position: relative; z-index: 2; padding-top: 6rem; }
.hero__content { max-width: 700px; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-full);
  color: var(--secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}
.hero__title {
  font-size: var(--text-5xl);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}
.hero__description {
  font-size: var(--text-lg);
  color: rgba(255,255,255,.7);
  margin-bottom: 2.5rem;
  max-width: 550px;
}

/* Search bar */
.hero__search { margin-bottom: 3rem; }
.search__wrapper {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: .5rem;
  box-shadow: var(--shadow-xl);
  max-width: 550px;
}
.search__icon { font-size: 1.25rem; color: var(--gray-400); margin: 0 .75rem; }
.search__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--text-base);
  color: var(--gray-800);
  padding: .5rem 0;
}
.search__input::placeholder { color: var(--gray-400); }
.search__btn {
  padding: .75rem 1.5rem;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  transition: background .3s;
}
.search__btn:hover { background: var(--primary-dark); }

/* Stats */
.hero__stats { display: flex; gap: 3rem; }
.stat__item { text-align: center; }
.stat__number { display: block; font-size: var(--text-2xl); font-weight: 800; color: var(--white); }
.stat__label { font-size: var(--text-sm); color: rgba(255,255,255,.5); }

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
}
.hero__scroll-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 50%;
  color: var(--white);
  animation: bounceDown 2s infinite;
}
@keyframes bounceDown {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(8px); }
  60% { transform: translateY(4px); }
}

/*============ SECTION HEADERS ===========*/
.section__header { text-align: center; margin-bottom: 3rem; }
.section__subtitle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .75rem;
}
.section__title { font-size: var(--text-3xl); margin-bottom: .75rem; }
.section__description { color: var(--gray-500); max-width: 600px; margin: 0 auto; }

/*============ EVENTS ===========*/
.events { background: var(--gray-50); }
.events__filters {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.filter__btn {
  padding: .5rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
  transition: all .3s;
}
.filter__btn:hover, .filter__btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.events__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.event__card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all .3s ease;
}
.event__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }

.event__img-wrapper { position: relative; overflow: hidden; height: 200px; }
.event__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.event__card:hover .event__img { transform: scale(1.05); }

.event__badge {
  position: absolute;
  top: 1rem; left: 1rem;
  padding: .25rem .75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--white);
}
.event__badge--hot { background: var(--danger); }
.event__badge--new { background: var(--success); }
.event__badge--lastchance { background: var(--warning); color: var(--gray-900); }

.event__fav {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  color: var(--gray-500);
  font-size: 1.1rem;
  transition: all .3s;
  backdrop-filter: blur(4px);
}
.event__fav:hover { color: var(--danger); transform: scale(1.1); }

.event__content { padding: 1.25rem; }
.event__meta { display: flex; justify-content: space-between; margin-bottom: .75rem; }
.event__category, .event__date {
  font-size: var(--text-xs);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: .25rem;
}
.event__category { color: var(--primary); font-weight: 500; }
.event__title { font-size: var(--text-lg); margin-bottom: .5rem; font-weight: 700; }
.event__location { font-size: var(--text-sm); color: var(--gray-500); margin-bottom: 1rem; display: flex; align-items: center; gap: .25rem; }

.event__footer { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; border-top: 1px solid var(--gray-100); }
.price__label { display: block; font-size: var(--text-xs); color: var(--gray-400); }
.price__amount { font-size: var(--text-xl); font-weight: 800; color: var(--gray-900); }
.event__btn {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .5rem 1rem;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius);
  transition: all .3s;
}
.event__btn:hover { background: var(--primary); color: var(--white); }

.events__cta { text-align: center; }

/*============ CATEGORIES ===========*/
.categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.category__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  transition: all .3s;
  text-align: center;
}
.category__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--cat-color, var(--primary));
}
.category__icon {
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--cat-color, var(--primary)) 10%, transparent);
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  color: var(--cat-color, var(--primary));
  margin-bottom: .75rem;
}
.category__name { font-size: var(--text-sm); font-weight: 600; margin-bottom: .25rem; }
.category__count { font-size: var(--text-xs); color: var(--gray-400); }

/*============ HOW IT WORKS ===========*/
.howto { background: var(--gray-50); }
.howto__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.howto__step {
  position: relative;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.step__number {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: 50%;
}
.step__icon {
  width: 64px; height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  font-size: 1.75rem;
  color: var(--primary);
  margin: 0 auto 1rem;
}
.step__title { font-size: var(--text-lg); margin-bottom: .5rem; }
.step__description { font-size: var(--text-sm); color: var(--gray-500); }

/*============ PAYMENT ===========*/
.payment__wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 3rem;
  border-radius: var(--radius-xl);
  color: var(--white);
}
.payment__title { font-size: var(--text-2xl); color: var(--white); margin-bottom: .75rem; }
.payment__description { color: rgba(255,255,255,.8); max-width: 400px; }
.payment__methods { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.payment__method {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,.15);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
}
.payment__method i { font-size: 1.75rem; }
.payment__method span { font-size: var(--text-xs); font-weight: 500; }

/*============ ORGANIZER CTA ===========*/
.organizer__wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.organizer__title { font-size: var(--text-3xl); margin-bottom: 1rem; }
.organizer__description { color: var(--gray-500); margin-bottom: 1.5rem; }
.organizer__features { margin-bottom: 2rem; }
.organizer__features li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--text-sm);
  color: var(--gray-600);
  margin-bottom: .5rem;
}
.organizer__features li i { color: var(--success); font-size: 1.1rem; }
.organizer__img-wrapper { border-radius: var(--radius-xl); overflow: hidden; }
.organizer__img { width: 100%; height: 400px; object-fit: cover; }

/*============ CONTACT ===========*/
.contact { background: var(--gray-50); }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}
.contact__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact__icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  color: var(--primary);
  font-size: 1.25rem;
}
.contact__item h4 { font-size: var(--text-sm); margin-bottom: .15rem; }
.contact__item p { font-size: var(--text-sm); color: var(--gray-500); }
.contact__social { display: flex; gap: .75rem; margin-top: 1rem; }
.social__link {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  color: var(--gray-600);
  font-size: 1.1rem;
  transition: all .3s;
}
.social__link:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

.contact__form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.form__group { margin-bottom: 1rem; }
.form__input {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  transition: border-color .3s;
  color: var(--gray-800);
  background: var(--white);
}
.form__input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-bg); }
.form__textarea { resize: vertical; min-height: 100px; }
.form__select { appearance: none; cursor: pointer; }

/*============ FOOTER ===========*/
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 4rem 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--gray-700);
}
.footer__logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
}
.footer__logo img { height: 44px; width: auto; display: block; }
.footer__logo i { color: var(--primary-light); }
.footer__description { font-size: var(--text-sm); line-height: 1.7; margin-bottom: 1.5rem; }
.footer__social { display: flex; gap: .75rem; }
.footer__social a {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-800);
  border-radius: 50%;
  color: var(--gray-400);
  transition: all .3s;
}
.footer__social a:hover { background: var(--primary); color: var(--white); }
.footer__links h4 { color: var(--white); font-size: var(--text-sm); margin-bottom: 1rem; }
.footer__links li { margin-bottom: .5rem; }
.footer__links a { font-size: var(--text-sm); transition: color .3s; }
.footer__links a:hover { color: var(--primary-light); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
}
.footer__bottom p { font-size: var(--text-sm); }
.footer__payment-icons { display: flex; gap: 1rem; font-size: 1.5rem; color: var(--gray-500); }

/*============ RESPONSIVE ===========*/
@media screen and (max-width: 1024px) {
  .organizer__wrapper { grid-template-columns: 1fr; }
  .organizer__img-wrapper { order: -1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media screen and (max-width: 768px) {
  .hero__title { font-size: var(--text-3xl); }
  .hero__stats { gap: 1.5rem; }
  .events__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .payment__wrapper { flex-direction: column; text-align: center; padding: 2rem; }
  .payment__methods { justify-content: center; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }

  /* Mobile menu */
  .nav__menu {
    position: fixed;
    top: 0; right: -100%;
    width: 80%;
    height: 100%;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    padding: 4rem 2rem;
    transition: right .4s;
    z-index: var(--z-modal);
  }
  .nav__menu.show-menu { right: 0; }
  .nav__list { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .nav__link { font-size: var(--text-lg); }
  .nav__close { display: block; position: absolute; top: 1.5rem; right: 1.5rem; font-size: 1.5rem; }
  .nav__toggle { display: block; }
  .nav__btns .button--ghost, .nav__btns .button--small { display: none; }
}

@media screen and (max-width: 480px) {
  .hero__title { font-size: var(--text-2xl); }
  .categories__grid { grid-template-columns: repeat(2, 1fr); }
  .howto__grid { grid-template-columns: 1fr; }
}
