:root {
  /* Tetrad color scheme */
  --primary-color: #2c6fd1;
  --primary-dark: #1e4e94;
  --primary-light: #5a8fe6;
  
  --secondary-color: #d12c6f;
  --secondary-dark: #94204d;
  --secondary-light: #e6598e;
  
  --tertiary-color: #6fd12c;
  --tertiary-dark: #4e9420;
  --tertiary-light: #8fe659;
  
  --quaternary-color: #d16f2c;
  --quaternary-dark: #944e20;
  --quaternary-light: #e68f59;
  
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --medium-gray: #dee2e6;
  --dark-gray: #343a40;
  --black: #212529;
  
  /* Typography */
  --heading-font: 'Roboto', sans-serif;
  --body-font: 'Lato', sans-serif;
  
  /* Spacing */
  --section-spacing: 5rem;
  --element-spacing: 2rem;
}

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

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

.display-4, .display-5 {
  font-weight: 700 !important;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

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

/* Container adjustments */
.container {
  max-width: 1200px;
  padding: 0 15px;
}

/* Section padding */
section {
  padding: 4rem 0;
}

/* Text colors */
.text-primary {
  color: var(--primary-color) !important;
}

.text-secondary {
  color: var(--secondary-color) !important;
}

.text-tertiary {
  color: var(--tertiary-color) !important;
}

.text-quaternary {
  color: var(--quaternary-color) !important;
}

.text-dark {
  color: var(--dark-gray) !important;
}

/* Background colors */
.bg-primary {
  background-color: var(--primary-color) !important;
}

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

.bg-tertiary {
  background-color: var(--tertiary-color) !important;
}

.bg-quaternary {
  background-color: var(--quaternary-color) !important;
}

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

.bg-dark {
  background-color: var(--dark-gray) !important;
}

/* Header and Navigation */
header {
  transition: all 0.3s ease;
}

.navbar {
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.navbar-light .navbar-nav .nav-link {
  color: var(--dark-gray);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.navbar-light .navbar-toggler {
  border-color: transparent;
}

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

/* Button Styles */
.btn {
  border-radius: 30px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: none;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(-1px);
}

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

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

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

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

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

.btn-tertiary:hover {
  background-color: var(--tertiary-dark);
}

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

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

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

/* Hero Section */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  color: var(--white);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-top: 80px;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
  z-index: 0;
}

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

.hero-section h1 {
  margin-bottom: 1.5rem;
  font-size: 3.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 700px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Animated Icons */
.animated-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animated-icon:hover {
  transform: scale(1.2) rotate(5deg);
  color: var(--primary-dark);
}

/* Cards */
.card {
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

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

.card-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.card-text {
  color: var(--dark-gray);
  margin-bottom: 1.5rem;
  flex: 1;
}

/* Statistics Section */
.counter {
  font-weight: 700;
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

/* Success Stories Section */
#exitos .card {
  border: none;
}

#exitos .card-title {
  color: var(--secondary-color);
}

/* Events Calendar */
#eventos .card {
  background-color: var(--dark-gray);
  border: none;
}

#eventos .badge {
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

/* Sustainability Section */
#sostenibilidad .card-title {
  color: var(--tertiary-color);
}

#sostenibilidad .animated-icon.text-success {
  color: var(--tertiary-color);
}

#sostenibilidad ul li {
  margin-bottom: 0.5rem;
}

/* Gallery Section */
.gallery-item {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  cursor: pointer;
}

.gallery-item img {
  transition: transform 0.5s ease, filter 0.5s ease;
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: var(--white);
  padding: 1rem;
  transform: translateY(100%);
  transition: all 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.8);
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

.gallery-caption h4 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.gallery-caption p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Contact Section */
#contacto .form-control {
  border-radius: 5px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--medium-gray);
}

#contacto .form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(44, 111, 209, 0.25);
  border-color: var(--primary-color);
}

#contacto label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

#contacto iframe {
  border-radius: 10px;
  width: 100%;
}

/* Footer */
footer {
  background-color: var(--dark-gray);
  color: var(--white);
}

footer h3 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

footer a {
  color: var(--white);
  transition: all 0.3s ease;
}

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

footer hr {
  border-color: rgba(255, 255, 255, 0.1);
  margin: 2rem 0;
}

footer .input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

footer .input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Social Media Links */
footer .social-links a {
  margin-right: 1rem;
  transition: all 0.3s ease;
  display: inline-block;
}

footer .social-links a:hover {
  transform: translateY(-3px);
}

/* Cookie Consent */
.cookie-consent {
  background-color: rgba(0, 0, 0, 0.9);
  color: var(--white);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 1rem 0;
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-on-scroll.show {
  opacity: 1;
  transform: translateY(0);
}

.animate__fadeInUp {
  animation: fadeInUp 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

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

/* Page specific styles */
.page-content {
  padding-top: 100px;
  min-height: calc(100vh - 300px);
}

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

.success-page .card {
  max-width: 600px;
  margin: 0 auto;
  border: none;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

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

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

.privacy-page h2, .terms-page h2 {
  color: var(--primary-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* About page */
.about-page {
  padding-top: 100px;
}

.about-hero {
  background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.5)), url('./image/about-hero-finance.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  padding: 5rem 0;
  margin-bottom: 3rem;
}

/* Contacts page */
.contacts-page {
  padding-top: 100px;
}

/* Media Queries */
@media (max-width: 991.98px) {
  .hero-section {
    height: auto;
    padding: 120px 0 80px;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .card-image img {
    height: 200px;
  }
  
  .counter {
    font-size: 2.5rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .gallery-item img {
    height: 200px;
  }
}

@media (max-width: 767.98px) {
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
  
  .card-image img {
    height: 180px;
  }
  
  .counter {
    font-size: 2rem;
  }
  
  section {
    padding: 2.5rem 0;
  }
  
  .gallery-item img {
    height: 180px;
  }
  
  footer {
    text-align: center;
  }
  
  footer .text-md-end {
    text-align: center !important;
    margin-top: 1rem;
  }
}

@media (max-width: 575.98px) {
  .hero-section {
    padding: 100px 0 60px;
  }
  
  .hero-section h1 {
    font-size: 1.75rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .display-5 {
    font-size: 1.75rem;
  }
  
  .card-image img {
    height: 160px;
  }
}

/* Read more links */
.read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
  position: relative;
  padding-right: 20px;
  margin-top: 0.5rem;
}

.read-more::after {
  content: "→";
  position: absolute;
  right: 0;
  transition: transform 0.3s ease;
}

.read-more:hover {
  color: var(--primary-dark);
}

.read-more:hover::after {
  transform: translateX(5px);
}