/*
  STYLE.CSS
  Theme: Historias de éxito de compañías
  Design System: Modern
  Trend: Block Interface Structure
  Color Scheme: Split-Complementary
  Animation Style: Smooth Transitions
*/

/* --------------------------------------------------- */
/* 1. ROOT VARIABLES & GLOBAL SETTINGS
/* --------------------------------------------------- */
:root {
  /* Color Palette (Split-Complementary) */
  --primary-color: #0d47a1; /* Deep Corporate Blue */
  --primary-color-dark: #002171;
  --accent-color-1: #ff6f00; /* Vibrant Orange */
  --accent-color-1-dark: #c43e00;
  --accent-color-2: #00796b; /* Teal */
  
  /* Neutral Colors */
  --light-bg-color: #f4f6f8;
  --white-color: #ffffff;
  --dark-text-color: #333333;
  --light-text-color: #6c757d;
  --border-color: #dee2e6;

  /* Typography */
  --font-family-headings: 'Inter', sans-serif;
  --font-family-body: 'IBM Plex Sans', sans-serif;

  /* Spacing & Sizing */
  --container-width: 1200px;
  --spacing-unit: 1rem;
  --header-height: 80px;

  /* Effects */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  --transition-speed: 0.3s ease;
}

/* Base Styles & 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(--dark-text-color);
  background-color: var(--white-color);
  line-height: 1.7;
  overflow-x: hidden;
}

/* --------------------------------------------------- */
/* 2. UTILITY CLASSES
/* --------------------------------------------------- */
.container {
  max-width: var(--container-width);
  width: 90%;
  margin: 0 auto;
}

.section-padding {
  padding: calc(var(--spacing-unit) * 5) 0;
}

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

.text-center {
  text-align: center;
}

.columns-container {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing-unit) * 2);
  align-items: flex-start;
}

.column {
  flex: 1;
  min-width: 300px;
}

.is-two-thirds {
    flex-grow: 2;
    flex-basis: 60%;
}

/* --------------------------------------------------- */
/* 3. TYPOGRAPHY
/* --------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-headings);
  font-weight: 700;
  line-height: 1.3;
  color: #222222; /* High contrast titles */
  margin-bottom: var(--spacing-unit);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: var(--spacing-unit);
  color: var(--light-text-color);
}

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

a:hover {
  color: var(--accent-color-1);
  text-decoration: underline;
}

.section-title {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 3);
  font-weight: 800;
}

.section-intro {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: calc(var(--spacing-unit) * 3);
  font-size: 1.1rem;
}

/* --------------------------------------------------- */
/* 4. GLOBAL COMPONENTS (Buttons, Cards, Forms)
/* --------------------------------------------------- */

/* --- Buttons --- */
.btn, button, input[type='submit'] {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-family-headings);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  border-radius: var(--border-radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-speed);
  user-select: none;
  line-height: 1.5;
}

.btn-primary {
  background-color: var(--accent-color-1);
  color: var(--white-color);
  border-color: var(--accent-color-1);
}

.btn-primary:hover {
  background-color: var(--accent-color-1-dark);
  border-color: var(--accent-color-1-dark);
  color: var(--white-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
  text-decoration: none;
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

/* --- Cards --- */
.card {
  background-color: var(--white-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistent card appearance */
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed);
}

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

.card-content {
  padding: calc(var(--spacing-unit) * 1.5);
  text-align: center; /* Center content inside the card */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  margin-bottom: calc(var(--spacing-unit) * 0.5);
}
.card-meta, .instructor-specialty {
    font-size: 0.9rem;
    color: var(--accent-color-2);
    font-weight: 600;
    margin-bottom: var(--spacing-unit);
}
.card-text {
    flex-grow: 1;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}


/* --- Forms --- */
.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white-color);
    padding: calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow);
}
.form-group {
    position: relative;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-family: var(--font-family-body);
    font-size: 1rem;
    transition: all var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.2);
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 16px;
    color: var(--light-text-color);
    background-color: var(--white-color);
    padding: 0 5px;
    transition: all var(--transition-speed);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 12px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.btn-submit {
    width: 100%;
}


/* --------------------------------------------------- */
/* 5. LAYOUT (Header, Footer)
/* --------------------------------------------------- */

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-speed);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.navbar-brand {
  font-family: var(--font-family-headings);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
}
.navbar-brand:hover {
    text-decoration: none;
    color: var(--primary-color-dark);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: calc(var(--spacing-unit) * 2);
}

.nav-link {
  font-weight: 600;
  color: var(--dark-text-color);
  position: relative;
  padding: 5px 0;
}
.nav-link:hover {
    color: var(--accent-color-1);
    text-decoration: none;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color-1);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform var(--transition-speed);
}
.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.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(--dark-text-color);
}

/* --- Footer --- */
.footer {
  background-color: var(--primary-color-dark);
  color: var(--white-color);
  padding: calc(var(--spacing-unit) * 4) 0 calc(var(--spacing-unit) * 2);
}

.footer h4 {
  color: var(--white-color);
  margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.footer p {
  color: rgba(255, 255, 255, 0.7);
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-speed);
}

.footer a:hover {
  color: var(--accent-color-1);
  text-decoration: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: calc(var(--spacing-unit) * 3);
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.footer-column ul {
  list-style: none;
}
.footer-column li {
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.footer-bottom {
  text-align: center;
  padding-top: calc(var(--spacing-unit) * 2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}


/* --------------------------------------------------- */
/* 6. SECTION-SPECIFIC STYLES
/* --------------------------------------------------- */

/* --- Hero Section --- */
.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 85vh;
  color: var(--white-color);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--white-color);
  margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: calc(var(--spacing-unit) * 2.5);
  color: var(--white-color);
  opacity: 0.9;
}

/* --- About Us Section & Timeline --- */
.image-container img {
    width: 100%;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow);
}
.subsection-title {
    text-align: center;
    margin-top: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 2);
}
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--accent-color-1);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}
.timeline-item:nth-child(even) {
    left: 50%;
}
.timeline-dot {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--white-color);
    border: 3px solid var(--accent-color-1);
    top: 22px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}
.timeline-content {
    padding: 20px;
    background-color: var(--light-bg-color);
    border-radius: var(--border-radius-md);
}

/* --- Partners Section --- */
.partners-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: calc(var(--spacing-unit) * 3);
}
.partner-logo img {
    max-height: 50px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--transition-speed);
}
.partner-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- Community Section --- */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-unit);
    margin-bottom: calc(var(--spacing-unit) * 2.5);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-md);
}

/* --- External Resources Section --- */
.resources-list {
    max-width: 900px;
    margin: 0 auto;
}
.resource-item {
    background: var(--white-color);
    padding: var(--spacing-unit) * 1.5;
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-unit);
    border-left: 4px solid var(--accent-color-2);
}
.resource-title a {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}
.resource-title a:hover {
    color: var(--accent-color-1);
}
.resource-description {
    color: var(--light-text-color);
    margin: calc(var(--spacing-unit) * 0.5) 0;
}
.resource-url {
    font-size: 0.9rem;
    color: var(--accent-color-2);
}

/* --- Modal --- */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: var(--white-color);
  margin: 15% auto;
  padding: 30px;
  border-radius: var(--border-radius-md);
  max-width: 500px;
  position: relative;
  animation: modal-animate 0.4s;
}

@keyframes modal-animate {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-button {
  color: #aaa;
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-content h3 {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.modal-form {
    display: flex;
    gap: 10px;
}
.modal-form input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

/* --------------------------------------------------- */
/* 7. PAGE-SPECIFIC STYLES
/* --------------------------------------------------- */
.page-container {
    padding-top: var(--header-height); /* Offset for fixed header */
}

/* --- Success Page --- */
.success-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}
.success-page h1 {
    color: var(--accent-color-2);
}

/* --- Privacy & Terms Pages --- */
.legal-page {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 40px;
}
.legal-page .container {
    max-width: 900px;
}
.legal-page h1 {
    margin-bottom: 2rem;
}
.legal-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* --------------------------------------------------- */
/* 8. RESPONSIVE DESIGN
/* --------------------------------------------------- */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    .hero-title { font-size: 3rem; }
    
    .columns-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    flex-direction: column;
    background-color: var(--white-color);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    padding: 1.5rem 0;
  }
  .nav-link::after {
      display: none;
  }

  .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);
  }

  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1.1rem; }
  
  .footer-grid {
      grid-template-columns: 1fr;
      text-align: center;
  }
  
  .timeline::after {
    left: 20px;
  }
  .timeline-item {
      width: 100%;
      padding-left: 60px;
      padding-right: 15px;
  }
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    left: 0;
    text-align: left;
  }
  .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
      left: 12px;
  }
}