/* -------------------------------------------------------------------------- */
/*                                  1. ROOT                                   */
/* -------------------------------------------------------------------------- */

:root {
  /* Bright Color Palette */
  --primary-color: #0052FF; /* Bright Blue */
  --primary-color-dark: #003ECC;
  --secondary-color: #FFB800; /* Sunny Yellow/Gold */
  --accent-color: #FF4D4D; /* Vibrant Red/Orange */
  --success-color: #00C48C;

  /* Neutral & Text Colors */
  --text-color: #222222;
  --text-color-light: #555555;
  --light-text-color: #FFFFFF;
  --border-color: #E0E0E0;
  
  /* Background Colors */
  --background-color: #FFFFFF;
  --light-bg-color: #F4F7FC;
  --dark-bg-color: #1a202c;

  /* Typography */
  --font-family-headings: 'Poppins', sans-serif;
  --font-family-body: 'Work Sans', sans-serif;

  /* Sizing & Spacing */
  --header-height: 80px;
  --container-width: 1140px;
  --container-padding: 1rem;
  --section-padding-y: 5rem;
  
  /* Effects */
  --card-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  --volumetric-shadow: 0 4px 6px rgba(0, 82, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  --volumetric-shadow-hover: 0 10px 15px rgba(0, 82, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --border-radius: 12px;
  --transition-speed: 0.3s ease;
}

/* -------------------------------------------------------------------------- */
/*                                2. BASE & RESET                             */
/* -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family-body);
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-headings);
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.3;
}

p {
  margin-bottom: 1rem;
  color: var(--text-color-light);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--primary-color-dark);
}

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

ul {
  list-style: none;
}

/* -------------------------------------------------------------------------- */
/*                                 3. UTILITIES & LAYOUT                      */
/* -------------------------------------------------------------------------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section-padding {
  padding: var(--section-padding-y) 0;
}

.section-light-bg {
  background-color: var(--light-bg-color);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #222222;
}

.section-subtitle {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem auto;
  font-size: 1.1rem;
  color: var(--text-color-light);
}

.light-text {
  color: var(--light-text-color) !important;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Basic Column System */
.columns {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}
.columns.is-multiline {
  flex-wrap: wrap;
}
.column {
  display: block;
  flex-basis: 0;
  flex-grow: 1;
  flex-shrink: 1;
  padding: 0.75rem;
}
.column.is-one-third { flex: none; width: 33.3333%; }
.column.is-half { flex: none; width: 50%; }
.column.is-two-thirds { flex: none; width: 66.6666%; }
.column.is-full { flex: none; width: 100%; }

/* -------------------------------------------------------------------------- */
/*                                4. COMPONENTS                               */
/* -------------------------------------------------------------------------- */
/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-family-headings);
  font-weight: 600;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all var(--transition-speed);
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--light-text-color);
}

.btn-primary:hover {
  background-color: var(--primary-color-dark);
  color: var(--light-text-color);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}
.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--light-text-color);
}

.btn-volumetric {
  box-shadow: var(--volumetric-shadow);
}

.btn-micro-interaction:hover {
  transform: translateY(-3px);
  box-shadow: var(--volumetric-shadow-hover);
}
.btn-micro-interaction:active {
  transform: translateY(-1px);
}
.full-width {
  width: 100%;
}
/* --- Cards --- */
.card {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.card-shadow {
    box-shadow: var(--card-shadow);
}
.card-shadow:hover {
    transform: translateY(-10px);
}
.card-image {
  width: 100%;
  height: 250px; /* Fixed height for image containers */
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the area without distortion */
  transition: transform 0.4s ease;
}
.card:hover .card-image img {
  transform: scale(1.05);
}
.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.card-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}
.card-content p {
  font-size: 0.95rem;
  color: var(--text-color-light);
}

/* --- Forms --- */
.contact-form .form-group {
  position: relative;
  margin-bottom: 2rem;
}
.form-input {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: var(--font-family-body);
  font-size: 1rem;
  background-color: var(--light-bg-color);
  transition: border-color var(--transition-speed);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.2);
}
.form-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--text-color-light);
  pointer-events: none;
  transition: all 0.2s ease;
  background-color: var(--light-bg-color);
  padding: 0 0.25rem;
}
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
  top: -0.75rem;
  left: 0.75rem;
  font-size: 0.8rem;
  color: var(--primary-color);
}
textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

/* -------------------------------------------------------------------------- */
/*                               5. HEADER & NAV                              */
/* -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
  padding: 1rem 0;
}
.header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}
.nav-logo {
  font-family: var(--font-family-headings);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}
.header.scrolled .nav-logo { color: var(--primary-color); }
.header:not(.scrolled) .nav-logo { color: var(--light-text-color); }
.header:not(.scrolled) .nav-link { color: var(--light-text-color); }
.header.scrolled .nav-link { color: var(--text-color); }
.header.scrolled .nav-link:hover { color: var(--primary-color); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-weight: 500;
  font-size: 1rem;
  transition: color var(--transition-speed);
}
.nav-link:hover {
  color: var(--primary-color);
}
.hamburger {
  display: none;
  cursor: pointer;
}
.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  background-color: var(--text-color);
}
.header:not(.scrolled) .bar { background-color: var(--light-text-color); }

/* -------------------------------------------------------------------------- */
/*                                6. SECTIONS                                 */
/* -------------------------------------------------------------------------- */

/* --- Hero --- */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--light-text-color);
}
.parallax-bg {
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}
.hero-overlay, .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5));
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--light-text-color);
}
.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

/* --- Instructors (Expertos) --- */
.card-subtitle {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* --- Projects --- */
.card-project .card-image {
  height: auto;
}
.progress-bar-container {
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 50px;
  margin-top: 0.5rem;
  overflow: hidden;
}
.progress-bar {
  height: 20px;
  background-color: var(--success-color);
  width: 0%;
  text-align: center;
  line-height: 20px;
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: 50px;
  transition: width 1.5s ease-out;
}

/* --- Events --- */
.event-item {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem;
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}
.event-date {
  text-align: center;
  font-weight: 700;
  color: var(--primary-color);
  flex-shrink: 0;
  border-right: 2px solid var(--border-color);
  padding-right: 2rem;
}
.event-date .month {
  font-size: 1rem;
  display: block;
}
.event-date .day {
  font-size: 2.5rem;
  display: block;
  line-height: 1;
}
.event-details {
  flex-grow: 1;
}
.event-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}
.event-meta {
  font-size: 0.9rem;
  color: var(--text-color-light);
  margin-bottom: 0.5rem;
}

/* --- Success Stories (Testimonios) --- */
#testimonios {
    color: var(--light-text-color);
}
.testimonial-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.testimonial-card blockquote {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--secondary-color);
    padding-left: 1.5rem;
}
.testimonial-card cite {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-style: normal;
    font-weight: 600;
}
.testimonial-card cite img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}
/* --- Accolades --- */
.accolades-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
    filter: grayscale(100%);
    opacity: 0.6;
}
.accolades-gallery img {
    max-height: 50px;
    width: auto;
}
/* --- External Resources --- */
.resource-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.resource-link {
    background-color: var(--light-bg-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    color: var(--text-color);
    box-shadow: var(--volumetric-shadow);
}
.resource-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
/* --- Contact --- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  background-color: var(--background-color);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}
.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.contact-info ul {
  margin-top: 2rem;
}
.contact-info ul li {
  margin-bottom: 0.5rem;
  color: var(--text-color-light);
}

/* -------------------------------------------------------------------------- */
/*                                7. FOOTER                                   */
/* -------------------------------------------------------------------------- */
.footer {
  background-color: var(--dark-bg-color);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer-heading {
  color: var(--light-text-color);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.footer-col ul li {
  margin-bottom: 0.5rem;
}
.footer-col a {
  color: rgba(255, 255, 255, 0.7);
}
.footer-col a:hover {
  color: var(--light-text-color);
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

/* -------------------------------------------------------------------------- */
/*                              8. OTHER PAGES                                */
/* -------------------------------------------------------------------------- */
.success-page, .legal-page {
    padding-top: var(--header-height);
}
.success-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: calc(100vh - var(--header-height));
}
.success-container h1 {
    font-size: 3rem;
    color: var(--success-color);
}
.legal-content {
    padding: 3rem 0;
}
.legal-content h1 {
    margin-bottom: 2rem;
}
.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* -------------------------------------------------------------------------- */
/*                           9. ANIMATIONS                                    */
/* -------------------------------------------------------------------------- */
.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-animate.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------------------------- */
/*                                10. RESPONSIVE                              */
/* -------------------------------------------------------------------------- */

@media (max-width: 992px) {
  .section-title { font-size: 2rem; }
  .hero-title { font-size: 2.8rem; }
  .column.is-one-third, .column.is-half, .column.is-two-thirds {
    width: 50%;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    flex-direction: column;
    background-color: var(--background-color);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    gap: 0;
    padding-bottom: 1rem;
  }
  .nav-menu.active {
    left: 0;
  }
  .nav-item {
      width: 100%;
  }
  .nav-link {
    display: block;
    padding: 1rem;
    color: var(--text-color) !important;
  }
  .header:not(.scrolled) .nav-logo { color: var(--primary-color); }
  .header.scrolled { background-color: var(--background-color); }
  .header:not(.scrolled) { background-color: var(--background-color); }
  .header:not(.scrolled) .bar { background-color: var(--text-color); }

  .hamburger {
    display: block;
  }
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .column.is-one-third, .column.is-half, .column.is-two-thirds {
    width: 100%;
  }
  .event-item {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .event-date {
    border-right: none;
    border-bottom: 2px solid var(--border-color);
    padding-right: 0;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
}