:root {
  /* Primary Colors */
  --primary-color: #3a6ea5;
  --primary-dark: #2a517a;
  --primary-light: #4a87c5;
  
  /* Complementary Colors */
  --complementary-color: #e67e22;
  --complementary-dark: #c56a1d;
  --complementary-light: #f39c12;
  
  /* Split-Complementary Colors */
  --accent1: #6c5ce7;
  --accent1-dark: #5341c9;
  --accent1-light: #8878eb;
  
  --accent2: #e84393;
  --accent2-dark: #c32d79;
  --accent2-light: #f065a8;
  
  /* Neutral Colors */
  --dark: #222222;
  --medium-dark: #444444;
  --medium: #666666;
  --medium-light: #999999;
  --light: #f8f9fa;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  --gradient-complementary: linear-gradient(135deg, var(--complementary-color), var(--complementary-light));
  --gradient-accent1: linear-gradient(135deg, var(--accent1), var(--accent1-light));
  --gradient-accent2: linear-gradient(135deg, var(--accent2), var(--accent2-light));
  
  /* Overlays */
  --overlay-dark: rgba(0, 0, 0, 0.6);
  --overlay-medium: rgba(0, 0, 0, 0.4);
  --overlay-light: rgba(0, 0, 0, 0.2);
  
  /* Typography */
  --heading-font: 'Roboto', sans-serif;
  --body-font: 'Lato', sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: all 0.2s ease;
  --transition-medium: all 0.3s ease;
  --transition-slow: all 0.5s ease;
  
  /* Borders */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
}

/* Global Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  color: var(--medium-dark);
  background-color: var(--light);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--medium-dark);
}

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

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

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

.divider {
  height: 4px;
  width: 60px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

section {
  position: relative;
  padding: 80px 0;
}

.bg-light {
  background-color: rgba(248, 249, 250, 0.7);
}

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

.text-white {
  color: white !important;
}

.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6 {
  color: white;
}

.text-white p {
  color: rgba(255, 255, 255, 0.9);
}

.overlay {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
}

/* Buttons */
.btn {
  border-radius: var(--border-radius-md);
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: none;
}

.btn::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: var(--transition-medium);
  z-index: -1;
}

.btn:hover::after {
  left: 0;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(58, 110, 165, 0.2);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(58, 110, 165, 0.3);
  color: white;
}

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

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

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Navigation */
header {
  transition: var(--transition-medium);
}

.navbar {
  padding: 1.5rem 0;
  transition: var(--transition-medium);
  box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
  padding: 0.75rem 0;
  background-color: white;
  box-shadow: var(--shadow-md);
}

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

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

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

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

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

@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: white;
    padding: 1rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    margin-top: 1rem;
  }
  
  .navbar-nav .nav-link::after {
    display: none;
  }
}

/* Hero Section */
#hero {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
}

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

#hero .container {
  position: relative;
  z-index: 2;
}

#hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
  color: white;
}

#hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.2s;
  animation-fill-mode: both;
  color: rgba(255, 255, 255, 0.9);
}

#hero .btn {
  animation: fadeInUp 1s ease-out 0.4s;
  animation-fill-mode: both;
}

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

/* About Us Section */
#nosotros {
  overflow: hidden;
}

#nosotros .image-container {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-medium);
}

#nosotros .image-container:hover {
  transform: translateY(-10px);
}

#nosotros h2 {
  position: relative;
}

#nosotros h3 {
  color: var(--primary-color);
}

/* History Section */
#historia .card {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition-medium);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

#historia .card-image {
  overflow: hidden;
  height: 250px;
  width: 100%;
}

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

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

#historia .card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#historia .card-content h3 {
  color: var(--primary-color);
}

/* Mission Section */
#mision {
  overflow: hidden;
}

#mision .image-container {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-medium);
}

#mision .image-container:hover {
  transform: scale(1.02);
}

/* Services Section */
#servicios .card {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition-medium);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

#servicios .card-image {
  overflow: hidden;
  height: 250px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

#servicios .card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

#servicios .card-content h3 {
  color: var(--primary-color);
}

/* Case Studies Section */
#casos .card {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition-medium);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

#casos .card-image {
  overflow: hidden;
  height: 350px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

#casos .card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#casos .card-content h3 {
  color: var(--primary-color);
}

/* Statistics Section */
#estadisticas {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

#estadisticas .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8));
}

#estadisticas .container {
  position: relative;
  z-index: 2;
}

#estadisticas .stat-item {
  transition: var(--transition-medium);
}

#estadisticas .stat-item:hover {
  transform: translateY(-10px);
}

#estadisticas .display-3 {
  color: var(--complementary-light);
}

/* Research Section */
#investigacion {
  overflow: hidden;
}

#investigacion .image-container {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-medium);
}

#investigacion .image-container:hover {
  transform: translateY(-10px);
}

#investigacion h3 {
  color: var(--primary-color);
}

/* Press Section */
#prensa .card {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition-medium);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

#prensa .card-image {
  overflow: hidden;
  height: 250px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

#prensa .card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#prensa .card-content h3 {
  margin-bottom: 0.25rem;
}

#prensa .card-content .text-muted {
  margin-bottom: 1rem;
}

#prensa .card-content h4 {
  color: var(--primary-color);
}

/* Insights Section */
#insights .card {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition-medium);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

#insights .card-image {
  overflow: hidden;
  height: 250px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

#insights .card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#insights .card-content h3 {
  color: var(--primary-color);
}

/* External Resources Section */
#recursos .card {
  border-radius: var(--border-radius-lg);
  transition: var(--transition-medium);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

#recursos .card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#recursos .card-content h3 {
  font-size: 1.25rem;
  line-height: 1.4;
}

#recursos .card-content h3 a {
  color: var(--primary-color);
  transition: var(--transition-medium);
}

#recursos .card-content h3 a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Contact Section */
#contacto {
  overflow: hidden;
}

#contacto h3 {
  color: var(--primary-color);
}

#contacto .map-container {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

#contacto form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(58, 110, 165, 0.2);
}

#contacto form .form-label {
  font-weight: 500;
  color: var(--medium-dark);
}

#contacto form .form-check-label {
  font-size: 0.875rem;
}

#contacto form .btn {
  margin-top: 1rem;
}

/* Footer */
footer {
  background-color: var(--dark);
  color: white;
  padding: 5rem 0 2rem;
}

footer h4 {
  color: white;
  margin-bottom: 1.5rem;
}

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

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

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

footer a {
  color: white;
  text-decoration: none;
  transition: var(--transition-fast);
}

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

footer hr {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Cookie Consent */
.cookie-consent {
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 1.5rem;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  display: none;
  text-align: center;
}

.cookie-consent p {
  color: white;
  margin-bottom: 1rem;
}

.cookie-consent a {
  color: white;
  text-decoration: underline;
}

.cookie-consent button {
  background-color: var(--complementary-color);
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.cookie-consent button:hover {
  background-color: var(--complementary-dark);
}

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

.success-container {
  max-width: 600px;
  margin: 0 auto;
}

.success-icon {
  font-size: 5rem;
  color: var(--complementary-color);
  margin-bottom: 2rem;
}

/* Privacy and Terms Pages */
.page-content {
  padding-top: 100px;
  padding-bottom: 5rem;
}

.page-content h1 {
  margin-bottom: 3rem;
  position: relative;
}

.page-content h1::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.page-content h2 {
  color: var(--primary-color);
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

.page-content p {
  margin-bottom: 1.5rem;
}

.page-content ul, 
.page-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.75rem;
}

/* Media Queries */
@media (max-width: 1199.98px) {
  #hero h1 {
    font-size: 3rem;
  }
}

@media (max-width: 991.98px) {
  section {
    padding: 60px 0;
  }
  
  #hero h1 {
    font-size: 2.5rem;
  }
  
  .display-4 {
    font-size: 2.5rem;
  }
  
  .display-3 {
    font-size: 3.5rem;
  }
}

@media (max-width: 767.98px) {
  section {
    padding: 50px 0;
  }
  
  #hero h1 {
    font-size: 2.25rem;
  }
  
  .display-4 {
    font-size: 2.25rem;
  }
  
  .display-3 {
    font-size: 3rem;
  }
  
  .divider {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 575.98px) {
  #hero h1 {
    font-size: 2rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .display-3 {
    font-size: 2.5rem;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
  }
  
  .btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}