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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F9F9F9;
  color: #1A1A1A;
  line-height: 1.6;
}

/* NAVBAR */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
}

/* Logo como imagen */
.logo img {
  height: 45px;
  width: auto;
  max-width: 230px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Logo como SVG (mantener por compatibilidad) */
.logo svg {
  width: 28px;
  height: 28px;
  color: #008000;
  flex-shrink: 0;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-partners {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.navbar-partners a {
  display: flex;
  align-items: center;
  line-height: 0;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.navbar-partners a:hover {
  opacity: 1;
}

.navbar-partners img {
  height: 42px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  flex-shrink: 0;
}

.menu-btn {
  background: none;
  border: none;
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  display: none;
}

.menu-btn span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: #1A1A1A;
  transition: 0.3s;
}

.menu-btn span:nth-child(1) { top: 0; }
.menu-btn span:nth-child(2) { top: 11px; }
.menu-btn span:nth-child(3) { top: 22px; }

.menu-btn.open span:nth-child(1) {
  transform: rotate(45deg);
  top: 11px;
}

.menu-btn.open span:nth-child(2) {
  opacity: 0;
}

.menu-btn.open span:nth-child(3) {
  transform: rotate(-45deg);
  top: 11px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: #1A1A1A;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #008000;
  transition: 0.3s;
}

nav a:hover::after {
  width: 100%;
}

/* HERO */
.hero {
  margin-top: 70px;
  height: 85vh;
  min-height: 500px;
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s;
}

.slide.active {
  opacity: 1;
}

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

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 10;
  width: 90%;
}

.hero-text h1 {
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}

.hero-text p {
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 300;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.arrow:hover {
  background: rgba(255,255,255,0.4);
}

.arrow-left { left: 1rem; }
.arrow-right { right: 1rem; }

.dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 20;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

.dot.active {
  background: white;
  width: 30px;
  border-radius: 5px;
}

/* SECTIONS */
section {
  padding: 4rem 1rem;
  max-width: 1600px;
  margin: 0 auto;
}

.section-white {
  background: white;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 2rem;
  padding-left: 1rem;
  border-left: 4px solid #008000;
}

.intro-text {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.8;
  margin-bottom: 3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* DESTACADO IV SLALOM - HOME */
.featured-event {
  background: transparent;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.featured-event-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 3rem;
  align-items: flex-start;
}

.featured-event-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.featured-event-card:hover {
  transform: translateY(-4px);
  border-color: #008000;
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
}

.featured-event-figure {
  margin: 0;
  line-height: 0;
  background: #f5f5f5;
}

.featured-event-main .featured-event-figure img,
.featured-event-figure.piloto-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.featured-event-caption {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 3px solid #008000;
}

.featured-event-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #008000;
  margin-bottom: 0.35rem;
}

.featured-event-title {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 0.4rem;
  line-height: 1.25;
}

.featured-event-meta {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 0.85rem;
  line-height: 1.5;
}

.featured-event-cta {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  color: #008000;
}

.featured-event-card:hover .featured-event-cta {
  text-decoration: underline;
}

.featured-event-piloto {
  max-width: 420px;
  justify-self: end;
}

.piloto-caption {
  border-top-color: #b80000;
}

.piloto-caption .featured-event-label {
  color: #b80000;
}

@media (max-width: 900px) {
  .featured-event-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .featured-event-piloto {
    max-width: 100%;
    justify-self: stretch;
  }
}

.card {
  border: 1px solid #E0E0E0;
  padding: 2rem;
  background: #F9F9F9;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card svg {
  color: #008000;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: #666;
  font-size: 0.95rem;
}

.event-box {
  background: white;
  border: 1px solid #E0E0E0;
  padding: 2rem;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
}

.date {
  background: #008000;
  color: white;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.date-day {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.date-month {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
}

.event-info h3 {
  margin-bottom: 0.5rem;
}

.event-info p {
  color: #666;
  line-height: 1.6;
}

.event-box-link {
  text-decoration: none;
  color: inherit;
  transition: 0.25s;
}

.event-box-link:hover {
  border-color: #008000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.event-link-text {
  display: inline-block;
  margin-top: 0.75rem;
  color: #008000;
  font-weight: 600;
  font-size: 0.95rem;
}

.events-past-link {
  margin-top: 1.5rem;
  text-align: center;
}

.events-past-link a {
  color: #008000;
  font-weight: 600;
  text-decoration: none;
}

.events-past-link a:hover {
  text-decoration: underline;
}

/* Página índice de eventos pasados */
.page-content {
  padding: 6rem 1rem 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.page-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 4px solid #008000;
}

.archivo-intro {
  color: #666;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.archivo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.archivo-item a {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background: white;
  border: 1px solid #E0E0E0;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: 0.25s;
}

.archivo-item a:hover {
  border-color: #008000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.archivo-item-info h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  border: none;
  padding: 0;
}

.archivo-item-info p {
  color: #666;
  font-size: 0.95rem;
}

.archivo-item-cta {
  color: #008000;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.archivo-back {
  margin-top: 2.5rem;
  text-align: center;
}

.archivo-back a {
  color: #008000;
  font-weight: 600;
  text-decoration: none;
}

.archivo-back a:hover {
  text-decoration: underline;
}

.info-block {
  border: 1px solid #E0E0E0;
  padding: 2rem;
  background: #F9F9F9;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: start;
}

.institution-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: white;
  border-radius: 4px;
}

.institution-logo img {
  width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: contain;
}

.info-block h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.info-block p {
  color: #666;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* TRIBUTE SECTION */
.tribute-section {
  padding: 3rem 1rem;
  background: white;
  text-align: center;
}

.tribute-image {
  max-width: 800px;
  margin: 0 auto;
}

.tribute-image img {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

footer {
  background: #2A2A2A;
  color: #B0B0B0;
  padding: 3rem 1rem 2rem;
}

.footer-content {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-content h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-content p {
  line-height: 1.8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-content p a {
  color: #B0B0B0;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-content p a:hover {
  color: #008000;
}

.footer-content svg {
  color: #008000;
  flex-shrink: 0;
}

.social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social a {
  width: 40px;
  height: 40px;
  border: 1px solid #505050;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B0B0B0;
  transition: 0.3s;
}

.social a:hover {
  background: #008000;
  border-color: #008000;
  color: white;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #404040;
  font-size: 0.9rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* MOBILE */
@media (max-width: 768px) {
  .menu-btn {
    display: block;
    flex-shrink: 0;
    margin-left: 0.75rem;
    padding: 10px;
    width: 44px;
    height: 44px;
    box-sizing: border-box;
  }

  .menu-btn span:nth-child(1) { top: 14px; }
  .menu-btn span:nth-child(2) { top: 21px; }
  .menu-btn span:nth-child(3) { top: 28px; }

  .menu-btn.open span:nth-child(1),
  .menu-btn.open span:nth-child(3) {
    top: 21px;
  }

  /* Logo más pequeño en móvil */
  .logo img {
    height: 35px;
    max-width: 170px;
  }

  .navbar-right {
    gap: 1.25rem;
  }

  .navbar-partners {
    gap: 1.15rem;
    padding-right: 0.15rem;
  }

  .navbar-partners a {
    padding: 4px;
    margin: -4px;
  }

  .navbar-partners img {
    height: 36px;
    max-width: 88px;
  }

  nav ul {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  nav ul.show {
    max-height: 500px;
    padding: 1rem 0;
  }

  nav li {
    border-bottom: 1px solid #f0f0f0;
  }

  nav a {
    display: block;
    padding: 1rem;
  }

  .hero {
    height: 70vh;
    min-height: 400px;
  }

  .arrow {
    width: 40px;
    height: 40px;
  }

  .arrow-left { left: 0.5rem; }
  .arrow-right { right: 0.5rem; }

  section {
    padding: 2rem 1rem;
  }

  .tribute-section {
    padding: 2rem 1rem;
  }

  .tribute-image {
    max-width: 100%;
  }

  .event-box {
    grid-template-columns: 1fr;
  }

  .info-block {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .institution-logo {
    margin: 0 auto;
    max-width: 200px;
  }

  .archivo-item a {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }

  .archivo-item .date {
    margin: 0 auto;
  }
}

/* PANTALLAS MUY PEQUEÑAS */
@media (max-width: 480px) {
  .logo img {
    height: 30px;
    max-width: 145px;
  }

  .navbar-right {
    gap: 1.1rem;
  }

  .navbar-partners {
    gap: 1rem;
  }

  .menu-btn {
    margin-left: 0.6rem;
  }

  .navbar-partners img {
    height: 34px;
    max-width: 82px;
  }
  
  .navbar {
    padding: 0.75rem 1rem;
  }

  .institution-logo {
    max-width: 150px;
  }

  .institution-logo img {
    max-height: 60px;
  }
} /* Aquí termina el media query de móviles */