:root {
  /* Primary Colors */
  --primary-color: #2d6cdf;
  --primary-dark: #1c4ea0;
  --primary-light: #5b8ef5;
  
  /* Analogous Color Scheme */
  --secondary-color: #2d9edf;
  --tertiary-color: #2d5edf;
  --accent-color: #6c2ddf;
  
  /* Neutral Colors */
  --dark: #333333;
  --medium: #666666;
  --light: #f8f9fa;
  --white: #ffffff;
  
  /* Gradient Colors */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-secondary: linear-gradient(135deg, var(--tertiary-color), var(--accent-color));
  
  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  
  /* Typography */
  --font-heading: 'Raleway', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* General Styles */
body {
  font-family: var(--font-body);
  color: var(--dark);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

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

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

.lead {
  font-size: 1.2rem;
  font-weight: 300;
}

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

/* Text Utilities */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-accent { color: var(--accent-color) !important; }
.text-dark { color: var(--dark) !important; }
.text-medium { color: var(--medium) !important; }
.text-light { color: var(--light) !important; }
.text-white { color: var(--white) !important; }

/* Background Utilities */
.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-accent { background-color: var(--accent-color) !important; }
.bg-light { background-color: var(--light) !important; }
.bg-dark { background-color: var(--dark) !important; }
.bg-white { background-color: var(--white) !important; }

.bg-gradient-primary { background: var(--gradient-primary) !important; }
.bg-gradient-secondary { background: var(--gradient-secondary) !important; }

/* Header & Navigation */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
}

.navbar {
  padding: 0.75rem 0;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--primary-color);
  position: relative;
  overflow: hidden;
}

.nav-link {
  color: var(--dark);
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin: 0 0.2rem;
  transition: all var(--transition-medium);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all var(--transition-medium);
  transform: translateX(-50%);
}

.nav-link:hover, .nav-link:focus {
  color: var(--primary-color);
}

.nav-link:hover::after {
  width: 80%;
}

/* Buttons */
.btn {
  border-radius: var(--radius-md);
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  transition: all var(--transition-medium);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: none;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
  border: none;
  cursor: pointer;
}

.btn:focus {
  box-shadow: 0 0 0 3px rgba(45, 108, 223, 0.25);
}

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

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-light {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline-light:hover, .btn-outline-light:focus {
  background-color: var(--white);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--tertiary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.4rem 1.2rem;
  font-size: 0.9rem;
}

/* Hero Section */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
}

.hero h1 {
  font-size: calc(2rem + 1vw);
  margin-bottom: var(--spacing-md);
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 1s ease-out;
}

.hero p.lead {
  font-size: calc(1.1rem + 0.2vw);
  margin-bottom: var(--spacing-lg);
  animation: fadeInUp 1.2s ease-out;
}

.hero .btn {
  animation: fadeInUp 1.4s ease-out;
}

/* Cards */
.card {
  overflow: hidden;
  transition: all var(--transition-medium);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  border-radius: var(--radius-md);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  overflow: hidden;
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

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

.card-body {
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
}

.card-body h3 {
  margin-top: 0;
  font-weight: 600;
  color: var(--primary-color);
}

.card-body p {
  flex-grow: 1;
  margin-bottom: var(--spacing-md);
}

/* Process Section */
#nuestro-proceso {
  background-color: var(--white);
}

#nuestro-proceso .card {
  border-radius: var(--radius-md);
  border: none;
  overflow: hidden;
}

#nuestro-proceso .card-image {
  height: 220px;
}

#nuestro-proceso h3 {
  color: var(--primary-color);
  font-weight: 600;
}

/* Methodology Section */
#metodologia {
  background-color: var(--light);
}

.image-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.image-container img {
  transition: all var(--transition-slow);
  object-fit: cover;
  width: 100%;
  height: auto;
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Projects Section */
#proyectos {
  background-color: var(--white);
}

#proyectos .card-image {
  height: 280px;
}

.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: var(--radius-full);
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0.8;
  margin: 0 15px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 20px;
  height: 20px;
}

/* Resources Section */
#recursos {
  background-color: var(--light);
}

#recursos .card-image {
  height: 200px;
}

#recursos .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Behind the Scenes */
#detras-escenas {
  background-color: var(--white);
}

#detras-escenas .image-container {
  height: 400px;
}

/* Clientele Section */
#clientela {
  background-color: var(--light);
}

#clientela .card-image {
  height: 200px;
}

/* Community Section */
#comunidad {
  background-color: var(--white);
}

#comunidad .image-container {
  height: 400px;
}

/* Success Stories */
#casos-exito {
  background-color: var(--light);
}

#casos-exito .image-container {
  margin: 0 auto;
}

#casos-exito p.lead {
  font-weight: 500;
  color: var(--primary-color);
}

#casos-exito .carousel-control-prev,
#casos-exito .carousel-control-next {
  background-color: var(--primary-color);
  opacity: 0.7;
}

/* Awards Section */
#reconocimientos {
  background-color: var(--white);
}

#reconocimientos .card {
  text-align: center;
}

#reconocimientos .card-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#reconocimientos .card-body h3 {
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

/* FAQ Section */
#preguntas-frecuentes {
  background-color: var(--light);
}

.accordion-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--white);
}

.accordion-button {
  font-weight: 600;
  font-family: var(--font-heading);
  padding: 1.25rem;
  background-color: var(--white);
  color: var(--dark);
  border: none;
  box-shadow: none;
}

.accordion-button:not(.collapsed) {
  color: var(--primary-color);
  background-color: rgba(45, 108, 223, 0.05);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: transparent;
}

.accordion-body {
  padding: 1.25rem;
  background-color: var(--white);
}

/* Contact Section */
#contacto {
  background-color: var(--white);
}

#contacto form label {
  font-weight: 500;
}

#contacto .form-control {
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  transition: all var(--transition-fast);
}

#contacto .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(45, 108, 223, 0.15);
}

#contacto textarea {
  min-height: 150px;
}

/* Footer */
.footer {
  background-color: var(--dark);
  color: var(--light);
  padding: var(--spacing-lg) 0;
}

.footer h4 {
  color: var(--white);
  margin-bottom: var(--spacing-md);
  font-weight: 600;
}

.footer p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-md);
}

.footer ul {
  margin: 0;
  padding: 0;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: var(--white);
  transition: color var(--transition-fast);
}

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

.footer-social a {
  margin-right: 1rem;
  font-size: 1.25rem;
}

/* Success Page */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.success-content {
  max-width: 600px;
  padding: var(--spacing-lg);
}

/* Privacy and Terms Pages */
.privacy-page, .terms-page {
  padding-top: 100px;
}

/* Mobile Adjustments */
@media (max-width: 991.98px) {
  .navbar-nav {
    padding-top: var(--spacing-sm);
  }

  .nav-link {
    padding: 0.5rem 0;
  }

  .hero h1 {
    font-size: calc(1.8rem + 0.8vw);
  }

  .hero p.lead {
    font-size: calc(1rem + 0.2vw);
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* AOS Animation Overrides */
[data-aos] {
  pointer-events: all;
}

[data-aos="fade-up"] {
  transform: translate3d(0, 30px, 0);
}

[data-aos="fade-down"] {
  transform: translate3d(0, -30px, 0);
}

[data-aos="fade-right"] {
  transform: translate3d(-30px, 0, 0);
}

[data-aos="fade-left"] {
  transform: translate3d(30px, 0, 0);
}

/* Additional Utilities */
.shadow-hover {
  transition: box-shadow var(--transition-medium), transform var(--transition-medium);
}

.shadow-hover:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.rounded-bio {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Init AOS script */
.js-inits-aos {
  opacity: 0;
}