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

#animation .text-xl {
  font-size: 1.5rem;
  color: currentColor;
  letter-spacing: 0.06em;
}
#animation .text-xl {
  font-size: 1.5rem;
  color: currentColor;
  letter-spacing: 0.06em;
}

:root {
  --primary: #750c17;
  --secondary: #0047ab;
  --accent: #ff4d4d;
  --dark: #0a0e27;
  --darker: #050810;
  --light: #f8f9fa;
  --text: #e0e0e0;
  --border: #1a2540;
  /* layout heights used for sticky header/nav and body offset */
  --header-height: 95px;
  --nav-height: 60px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  /* reserve space for fixed header + nav (kept in variables for responsive adjustments) */
  padding-top: calc(
    env(safe-area-inset-top, 0px) + var(--header-height) + var(--nav-height)
  );
}

/* ========== HEADER ========== */
header {
  background: linear-gradient(135deg, var(--primary) 0%, #5a0812 100%);
  padding: 1.5rem 2rem;
  box-shadow: 0 8px 32px rgba(117, 12, 23, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  animation: slideDown 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), #003d8f);
  padding: 3px;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.1) rotate(2deg);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.626);
}

.logo-text {
  color: #fff;
  font-weight: 900;
  font-size: 2rem;
  font-family: "Bruno Ace SC", sans-serif;
  font-style: oblique;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff, #e0e0e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(0, 71, 171, 0.25),
    rgba(255, 77, 77, 0.25)
  );
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.2s ease;
}

.apply-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(255, 77, 77, 0.25);
}

.apply-btn:active {
  transform: translateY(0);
}

/* ========== NAVIGATION ========== */
nav {
  background: rgba(0, 71, 171, 0.95);
  backdrop-filter: blur(10px);
  padding: 0;
  border-bottom: 2px solid var(--accent);
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 99;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 0.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  /* allow horizontal scroll on very small screens to avoid wrapping/overflow issues */
  -webkit-overflow-scrolling: touch;
}
.nav-toggle {
  display: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
}

nav li {
  flex: 0 1 auto;
  position: relative;
}

nav a {
  display: block;
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s ease;
  letter-spacing: 0.5px;
}

nav a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #ff8080);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--accent);
}

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

nav a.active {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), 0 0 12px rgba(255, 77, 77, 0.35),
    0 0 22px rgba(0, 71, 171, 0.25);
}

nav li::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 78%;
  height: 64%;
  border-radius: 12px;
  box-shadow: 0 0 0 rgba(255, 77, 77, 0), 0 0 0 rgba(0, 71, 171, 0);
  opacity: 0;
  transition: box-shadow 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

nav li:hover::before {
  opacity: 1;
  box-shadow: 0 0 14px rgba(255, 77, 77, 0.35), 0 0 24px rgba(0, 71, 171, 0.25);
}

/* Estilo para enlace activo: destaca permanentemente */
nav a.active {
  color: var(--accent);
  background: linear-gradient(
    90deg,
    rgba(255, 77, 77, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  transform: translateY(-2px);
}

/* pequeño indicador a la izquierda del enlace activo */
nav a.active::after {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 28px;
  background: linear-gradient(180deg, var(--accent), #ff8080);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.08);
}

/* ========== HERO CAROUSEL ========== */
.hero-carousel {
  position: relative;
  height: clamp(180px, 40vh, 420px);
  overflow: hidden;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(117, 12, 23, 0.4),
    rgba(0, 71, 171, 0.4)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
}

.slide-content {
  text-align: center;
  color: #fff;
  z-index: 5;
  /* constrain text width so it doesn't run into logo at smaller widths */
  max-width: 62%;
}

/* Logo inside slides: circular image with neon hover and responsive */
.slide-logo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 110px;
  display: inline-block;
  border: 4px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 6;
  background: rgba(255, 255, 255, 0.02);
}

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

.slide-logo:hover {
  transform: scale(1.06);
  box-shadow: 0 0 18px rgba(255, 77, 77, 0.18), 0 0 40px rgba(255, 77, 77, 0.08);
  filter: drop-shadow(0 0 12px rgba(255, 77, 77, 0.5));
  margin-left: 1.5rem;
}

.slide-content h1 {
  /*font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;*/
  font-weight: 900;
  font-size: 2rem;
  font-family: "Bruno Ace SC", sans-serif;
  font-style: oblique;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: slideUp 0.8s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-content p {
  font-size: 1.3rem;
  font-weight: 300;
  letter-spacing: 1px;
  animation: slideUp 0.8s ease 0.2s backwards;
}

.carousel-indicators {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

/* ensure nav and header height variables scale at breakpoints */
@media (max-width: 768px) {
  :root {
    --header-height: 86px;
    --nav-height: 56px;
  }
  .slide-content {
    max-width: 65%;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 76px;
    --nav-height: 54px;
  }
  /* on small screens stack content and logo */
  .slide-overlay {
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.6rem;
  }
  .slide-content {
    max-width: 100%;
  }
  .slide-logo {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    margin-left: 0;
  }
  nav {
    top: var(--header-height);
  }
  body {
    padding-top: calc(var(--header-height) + var(--nav-height));
  }
  nav ul {
    padding: 0.3rem 0.5rem;
    overflow-x: auto;
  }
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 15px var(--accent);
}

/* ========== MAIN CONTENT ========== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

section {
  margin-bottom: 4rem;
  animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h2 {
  font-weight: 900;
  font-size: 2rem;
  font-family: "Bruno Ace SC", sans-serif;
  font-style: oblique;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  margin-bottom: 2rem;
  text-align: center;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  width: 100%;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  border-radius: 2px;
}

.title-enter {
  opacity: 0;
}

.intro-section {
  text-align: center;
  margin-bottom: 3rem;
}

.slogan {
  font-weight: 900;
  font-size: 2rem;
  font-family: "Bruno Ace SC", sans-serif;
  font-style: oblique;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%,
  100% {
    text-shadow: 0 0 10px var(--accent);
  }
  50% {
    text-shadow: 0 0 20px var(--accent);
  }
}

.intro-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 800px;
  margin: 0 auto;
}

/* ========== GRID & CARDS ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: linear-gradient(135deg, var(--dark), var(--darker));
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: pointer;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 77, 77, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(255, 77, 77, 0.2);
}

.card h3 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.card:hover h3 {
  color: #ff8080;
  text-shadow: 0 0 15px var(--accent);
  transform: scale(1.05);
}

.card p {
  color: var(--text);
  line-height: 1.8;
  font-size: 0.95rem;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 1.5rem;
  transition: transform 0.3s ease;
}

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

.card a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
}

/* ========== TEAM / STAFF ========== */
#equipo {
  position: relative;
}

.staff-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 300px));
  justify-content: center;
  align-items: stretch;
  gap: 1.5rem;
}

.staff-card {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.staff-avatar {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 1rem;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 77, 77, 0.18),
    rgba(0, 71, 171, 0.18)
  );
}

.staff-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  display: block;
  backface-visibility: hidden;
}

.role-badge {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(255, 77, 77, 0.15),
    rgba(0, 71, 171, 0.15)
  );
  margin-bottom: 0.75rem;
}

.staff-card h3 {
  font-size: 1.3rem;
  margin: 0.25rem 0 0.5rem;
  color: #fff;
}

.staff-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(0, 71, 171, 0.2),
    rgba(117, 12, 23, 0.2)
  );
  color: #fff;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
}

.staff-link:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(255, 77, 77, 0.18);
  transform: translateY(-4px);
}

@media (max-width: 480px) {
  .staff-avatar {
    width: 90px;
    height: 90px;
    border-radius: 10px;
  }
}

/* ========== REQUIREMENTS LIST ========== */
.requirements {
  background: linear-gradient(
    135deg,
    rgba(0, 71, 171, 0.1),
    rgba(117, 12, 23, 0.1)
  );
  border: 2px solid var(--secondary);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
}

.requirements ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.requirements li {
  padding: 1rem;
  background: linear-gradient(135deg, var(--dark), var(--darker));
  border-left: 4px solid var(--secondary);
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.requirements li:hover {
  border-left-color: var(--accent);
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 71, 171, 0.2);
}

.requirements li::before {
  content: "✓";
  color: var(--secondary);
  font-weight: 800;
  font-size: 1.2rem;
}

.requirements li:hover::before {
  color: var(--accent);
  animation: pop 0.3s ease;
}

@keyframes pop {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
}

/* ========== FOOTER ========== */
footer {
  background: linear-gradient(135deg, var(--primary), #5a0812);
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 4rem;
  border-top: 2px solid var(--accent);
  animation: slideUp 0.8s ease;
}

footer h3 {
  font-weight: 900;
  font-size: 2rem;
  font-family: "Bruno Ace SC", sans-serif;
  font-style: oblique;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.social-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 2px solid #fff;
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-5px) scale(1.15);
  box-shadow: 0 10px 25px rgba(255, 77, 77, 0.3);
}

footer p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.8rem;
  }
  header {
    padding: 1rem 1.5rem;
  }

  .logo-text {
    font-size: 1.2rem;
  }

  .nav-toggle {
    display: flex;
    position: static;
    transform: none;
    margin-left: auto;
  }
  nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0.8rem 0.8rem;
    max-width: none;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  nav.open ul {
    max-height: 400px;
  }

  /* desactivar glow del nav en móviles para limpieza visual */
  nav li::before {
    display: none;
  }

  nav a {
    padding: 0.9rem 1rem;
    font-size: clamp(0.8rem, 2.8vw, 0.95rem);
  }

  .hero-carousel {
    height: 250px;
  }

  .apply-btn {
    padding: 0.5rem 0.8rem;
    font-weight: 700;
    border-radius: 10px;
  }

  main {
    padding: 2rem 1.5rem;
  }

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

  .requirements ul {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 2rem 1.5rem;
  }

  .social-btn {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 0.8rem 1rem;
  }

  .logo {
    gap: 0.5rem;
  }

  .logo img {
    width: 40px;
    height: 40px;
  }

  .logo-text {
    font-size: 1rem;
    letter-spacing: 1px;
  }

  .apply-btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 10px;
  }

  nav {
    top: var(--header-height);
  }
  body {
    padding-top: calc(
      env(safe-area-inset-top, 0px) + var(--header-height) + var(--nav-height)
    );
  }

  .slide-overlay {
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.6rem;
  }

  .slide-logo {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    margin-left: 0;
  }

  nav ul {
    padding: 0.3rem 0.5rem;
  }

  nav a {
    padding: 0.6rem 0.4rem;
    font-size: 0.65rem;
  }

  .hero-carousel {
    height: 180px;
  }

  .slide-content h1 {
    font-size: 1.8rem;
  }

  .slide-content p {
    font-size: 1rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .card {
    padding: 1.5rem;
  }

  .requirements {
    padding: 1.5rem;
  }

  .social-btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}

/* ========== SCROLL ANIMATIONS ========== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

/* ========== LOADING ========== */
.card {
  opacity: 0;
}

.card:nth-child(1) {
  animation: fadeInUp 0.6s ease 0s forwards;
}

.card:nth-child(2) {
  animation: fadeInUp 0.6s ease 0.1s forwards;
}

.card:nth-child(3) {
  animation: fadeInUp 0.6s ease 0.2s forwards;
}

.card:nth-child(n + 4) {
  animation: fadeInUp 0.6s ease 0.3s forwards;
}
