:root {
  /* Primary Colors */
  --primary-color: #1a1a1a;
  --primary-light: #2d2d2d;
  --primary-dark: #0d0d0d;
  --accent-color: #4d4d4d;
  --accent-light: #777777;
  --accent-dark: #333333;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-dark: #333333;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  --gradient-overlay: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.3));
  
  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-md: 0 5px 15px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.3);
  
  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --transition-slow: 0.8s ease;
  
  /* Borders */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
}

/* Base Styles */
html, body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-dark);
  background-color: #f5f5f5;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
}

.section-title {
  position: relative;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: var(--gradient-primary);
  margin: 15px auto 0;
  border-radius: 3px;
}

.section-description {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  color: var(--accent-color);
}

/* Buttons */
.btn {
  position: relative;
  overflow: hidden;
  transition: var(--transition-fast);
  border-radius: var(--border-radius-md);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 0.6rem 1.5rem;
  z-index: 1;
}

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

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

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  box-shadow: var(--shadow-sm);
}

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

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

.btn-outline-light:hover, .btn-outline-light:focus {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  transform: translateY(-3px);
}

/* Navbar */
header {
  transition: var(--transition-fast);
}

.navbar {
  padding: 1rem 0;
  transition: var(--transition-fast);
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.navbar-dark .navbar-nav .nav-link {
  color: var(--text-secondary);
  transition: var(--transition-fast);
  font-weight: 600;
  padding: 0.5rem 1rem;
  position: relative;
}

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

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

.navbar-dark .navbar-nav .nav-link:hover::after,
.navbar-dark .navbar-nav .nav-link:focus::after,
.navbar-dark .navbar-nav .nav-link.active::after {
  width: 50%;
}

.navbar-toggler {
  border: none;
  padding: 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Scrolled Navbar */
header.scrolled {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-overlay);
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-size: 3rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  animation: fadeInUp 1s ease-out;
}

.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 0 2px 5px rgba(0,0,0,0.3);
  animation: fadeInUp 1.2s ease-out;
}

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

/* Card Styles */
.card {
  border: none;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-medium);
  background: #ffffff;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

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

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

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

.card-content {
  flex: 1;
  width: 100%;
}

.card h3, .card h4 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
  font-weight: 700;
}

.card p {
  color: var(--accent-color);
  line-height: 1.6;
}

/* Services Section */
#servicios {
  background-color: #ffffff;
  position: relative;
}

.progress {
  height: 8px;
  background-color: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  background: var(--gradient-primary);
  transition: width 1.5s ease;
}

/* History Section */
#historia {
  background-color: #f5f5f5;
  position: relative;
}

.form-check-input {
  width: 2.5em;
  height: 1.2em;
  margin-top: 0.3em;
}

/* Partners Section */
#socios {
  background-color: #ffffff;
}

.partner-card {
  text-align: center;
  padding: 1.5rem;
}

.partner-card .card-image {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-card img {
  max-height: 100%;
  object-fit: contain;
}

/* Team Section */
#equipo {
  background-color: #f5f5f5;
}

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

.team-card .card-image {
  height: 300px;
}

/* Resources Section */
#recursos {
  background-color: #ffffff;
}

.resource-card .card-image {
  height: 200px;
}

/* Events Section */
#eventos {
  background-color: #f5f5f5;
}

.event-card {
  overflow: hidden;
}

.event-card .card-image {
  height: 100%;
}

.badge {
  padding: 0.5em 1em;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
}

/* Workshops Section */
#talleres {
  background-color: #ffffff;
}

.workshop-card .card-image {
  height: 250px;
}

/* Awards Section */
#reconocimientos {
  background-color: #f5f5f5;
}

.award-card .card-image {
  height: 180px;
  padding: 1rem;
}

.award-card img {
  max-height: 100%;
  object-fit: contain;
}

/* Research Section */
#investigacion {
  background-color: #ffffff;
}

/* Contact Section */
#contacto {
  background-color: #f5f5f5;
}

.contact-info-card, .contact-form-card {
  padding: 2rem;
}

.contact-info-card ul li {
  margin-bottom: 1rem;
}

.form-control {
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius-md);
  padding: 0.8rem 1.2rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(26, 26, 26, 0.25);
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

/* Footer */
footer {
  background: var(--gradient-primary);
  color: var(--text-primary);
  padding: 4rem 0 2rem;
}

footer h4 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

footer h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--accent-light);
  border-radius: 3px;
}

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

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

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

footer .list-unstyled li {
  margin-bottom: 0.75rem;
}

footer hr {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 2rem 0;
}

/* Cookie Consent */
#cookieConsent {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Success Page */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background-color: #f5f5f5;
}

.success-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem;
  background-color: #ffffff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

.success-icon {
  font-size: 5rem;
  color: #28a745;
  margin-bottom: 2rem;
}

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

.content-page h1 {
  margin-bottom: 2rem;
  color: var(--primary-dark);
}

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

.content-page p, .content-page ul, .content-page ol {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: var(--accent-dark);
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Styles */
@media (max-width: 1199.98px) {
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .hero-section p {
    font-size: 1.1rem;
  }
}

@media (max-width: 991.98px) {
  .hero-section {
    min-height: 80vh;
  }
  
  .hero-section h1 {
    font-size: 2.2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .card-image {
    height: 220px;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    min-height: 70vh;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .section-description {
    font-size: 1rem;
  }
  
  .card-image {
    height: 200px;
  }
  
  footer {
    padding: 3rem 0 1rem;
  }
}

@media (max-width: 575.98px) {
  .hero-section {
    min-height: 60vh;
    padding: 2rem 0;
  }
  
  .hero-section h1 {
    font-size: 1.8rem;
  }
  
  .btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .card {
    margin-bottom: 1.5rem;
  }
}