/* ==========================================================================
   Base Theme : Futuristic + Neo-Brutalism
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
  /* Core Palette */
  --color-primary: #00e0ff;
  --color-primary-dark: #00b4cc;
  --color-secondary: #ff00c8;
  --color-secondary-dark: #c6009c;
  --color-accent: #ffd200;
  --color-dark: #141414;
  --color-light: #ffffff;
  --color-muted: #e5e5e5;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 100%);

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Shadow / 3D */
  --shadow-3d: 0 10px 25px rgba(0, 0, 0, 0.25);
  --brutal-border: 3px solid #000;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;

  /* Animation */
  --transition-fast: 0.25s ease;
  --transition-medium: 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-dark);
  background: var(--color-light);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Utility Container */
.container {
  width: min(90%, 1200px);
  margin-inline: auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.5px;
  color: #222222;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: var(--space-md);
}

/* Paragraphs */
p, li {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

/* ---------- Buttons ---------- */
.btn,
button,
input[type='submit'] {
  cursor: pointer;
  border: none;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  background: var(--gradient-primary);
  color: #000;
  border-radius: 8px;
  box-shadow: var(--shadow-3d);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary {
  background: var(--gradient-primary);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: #000;
}

.btn:hover,
button:hover,
input[type='submit']:hover {
  transform: translateY(-4px) perspective(500px) rotateX(3deg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--color-light);
  border-bottom: var(--brutal-border);
  z-index: 5000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-dark);
  text-decoration: none;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: var(--space-md);
}

.nav-list a {
  color: var(--color-dark);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-list a::after {
  content: '';
  position: absolute;
  height: 3px;
  width: 0%;
  left: 0;
  bottom: -5px;
  background: var(--color-secondary);
  transition: width var(--transition-fast);
}

.nav-list a:hover::after {
  width: 100%;
}
.nav-list a:hover {
  color: var(--color-secondary-dark);
}

/* Burger (mobile) */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
}

.burger-bar {
  width: 25px;
  height: 3px;
  background: #000;
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-lg) 0;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--color-light); /* WHITE text */
}

.hero-title {
  font-size: clamp(2rem, 6vw, 4rem);
  margin-bottom: var(--space-sm);
  color: var(--color-light);
}

.hero-subtitle {
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: var(--space-md);
  color: var(--color-muted);
}

/* ---------- Section Generic ---------- */
.section {
  padding: var(--space-lg) 0;
}

.parallax-bg {
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
  color: var(--color-light);
}

.parallax-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55));
  z-index: 0;
}
.parallax-bg > .container,
.parallax-bg .section-title {
  position: relative;
  z-index: 1;
}
.parallax-bg .section-title {
  color: var(--color-light);
}

/* ---------- Mission ---------- */
.mission .progress-wrapper {
  display: grid;
  gap: var(--space-md);
}

.progress-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--color-muted);
  border-radius: 6px;
}
.progress {
  display: block;
  height: 100%;
  background: var(--gradient-secondary);
  border-radius: 6px;
}

/* ---------- Events / Webinars / Careers ---------- */
.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: var(--space-md);
  transition: transform var(--transition-medium);
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-light);
  border: var(--brutal-border);
  padding: var(--space-xs) var(--space-sm);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.carousel-control.prev { left: 0; }
.carousel-control.next { right: 0; }

/* ---------- Card Component ---------- */
.card {
  background: var(--color-light);
  border: var(--brutal-border);
  box-shadow: var(--shadow-3d);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center content */
  text-align: center; /* Center text */
  overflow: hidden;
  min-width: 250px;
}

.card-image, .image-container {
  width: 100%;
  height: 200px; /* Fixed height */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img, .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Prevent shifting */
  margin: 0 auto;
}

.card-content {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border: var(--brutal-border);
  border-radius: 8px;
  background: var(--color-light);
  box-shadow: var(--shadow-3d);
  text-align: center;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: var(--space-xs);
  font-weight: 600;
}

/* ---------- Resources List ---------- */
.resources-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--space-md);
}

.resource-card {
  transition: transform var(--transition-fast);
}

.resource-card:hover {
  transform: translateY(-6px) rotateZ(-0.5deg);
}

/* ---------- Contact Form ---------- */
.contact-form {
  max-width: 600px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

input,
textarea {
  width: 100%;
  padding: var(--space-sm);
  border: var(--brutal-border);
  border-radius: 6px;
  font-family: var(--font-body);
  background: var(--color-muted);
  transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-dark);
  color: var(--color-light);
  padding: var(--space-md) 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links,
.footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  position: relative;
}

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

.footer-copy {
  font-size: 0.8rem;
  opacity: 0.75;
}

/* ---------- Success Page ---------- */
.success {
  min-height: 100vh;         /* full viewport height */
  display: flex;
  align-items: center;       /* vertical center */
  justify-content: center;   /* horizontal center */
  text-align: center;
  background: var(--gradient-primary);
  color: var(--color-dark);
}

/* ---------- Privacy & Terms ---------- */
.privacy, .terms {
  padding-top: 100px; /* prevent overlap with fixed header */
}

/* ---------- Link "Leer más" ---------- */
a.read-more {
  display: inline-block;
  margin-top: var(--space-xs);
  font-weight: 700;
  color: var(--color-secondary);
  position: relative;
}

a.read-more::after {
  content: '→';
  margin-left: 4px;
  transition: transform var(--transition-fast);
}

a.read-more:hover::after {
  transform: translateX(4px);
}

/* ---------- Social Icons Text Style ---------- */
.footer-social a {
  padding: var(--space-xs) var(--space-sm);
  border: var(--brutal-border);
  border-radius: 4px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.footer-social a:hover {
  background: var(--gradient-secondary);
  color: #000;
}

/* ---------- Parallax Helper ---------- */
@media (prefers-reduced-motion: no-preference) {
  .parallax-bg {
    background-attachment: fixed;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-list {
    position: fixed;
    top: 60px;
    right: -100%;
    flex-direction: column;
    background: var(--color-light);
    padding: var(--space-md);
    width: 250px;
    height: calc(100vh - 60px);
    transition: right var(--transition-fast);
  }
  .nav-list.open {
    right: 0;
  }
  .burger {
    display: flex;
  }
}

/* ==========================================================================
   Animations / Micro-Interactions
   ========================================================================== */
@keyframes floatY {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

[data-aos] {
  will-change: transform, opacity;
}

/* Floating decorative elements */
.floaty {
  animation: floatY 6s ease-in-out infinite;
}