/* === CSS Variables === */
:root {
  /* Primary color palette */
  --primary-color: #3a6ea5; /* Deep blue */
  --primary-light: #6b98c9;
  --primary-dark: #1e5080;
  
  /* Complementary color palette */
  --complementary: #e58e1a; /* Warm orange */
  --complementary-light: #ffa940;
  --complementary-dark: #c67000;
  
  /* Neutral colors */
  --neutral-100: #ffffff;
  --neutral-200: #f8f9fa;
  --neutral-300: #e9ecef;
  --neutral-400: #dee2e6;
  --neutral-500: #adb5bd;
  --neutral-600: #6c757d;
  --neutral-700: #495057;
  --neutral-800: #343a40;
  --neutral-900: #212529;
  
  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Source Sans Pro', sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  
  /* Shadows */
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  
  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-normal: 0.5s ease;
  --transition-slow: 0.8s ease;
  
  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 50%;
}

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

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--neutral-700);
  overflow-x: hidden;
  padding-top: 80px; /* Account for fixed navbar */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: var(--space-md);
}

p {
  margin-bottom: var(--space-md);
}

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

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

.section-padding {
  padding: var(--space-xl) 0;
}

.section-title {
  position: relative;
  font-size: 2.5rem;
  margin-bottom: var(--space-lg);
  color: var(--neutral-800);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--complementary));
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--neutral-600);
  margin-bottom: var(--space-lg);
}

/* === Buttons === */
.btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

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

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

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

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

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

/* === Navbar === */
.navbar {
  box-shadow: var(--shadow-md);
  background-color: var(--neutral-900) !important;
  transition: background-color var(--transition-normal);
}

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

.navbar-dark .navbar-nav .nav-link {
  color: var(--neutral-300);
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: color var(--transition-fast);
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--complementary-light);
}

/* === Hero Section === */
.hero-section {
  position: relative;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: white;
  margin-top: -80px; /* Counter the body padding-top */
}

.hero-section .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
  z-index: 1;
}

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

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  animation: fadeInUp 1s ease-out;
}

.hero-section p {
  font-size: 1.25rem;
  margin-bottom: var(--space-lg);
  color: white;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  animation: fadeInUp 1.2s ease-out;
}

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

/* === Cards === */
.card {
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

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

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

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

.card-content {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  color: var(--neutral-800);
}

.card-content p {
  color: var(--neutral-600);
  margin-bottom: var(--space-md);
}

.card-content a.btn {
  margin-top: auto;
  align-self: flex-start;
}

/* === Blog Section === */
#blog .card-content {
  text-align: left;
}

#blog .text-muted {
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

#blog .btn-outline-primary {
  margin-top: auto;
  align-self: flex-start;
}

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

/* === About Section === */
#acerca {
  position: relative;
}

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

#acerca .image-container img {
  width: 100%;
  transition: transform var(--transition-normal);
}

#acerca .image-container:hover img {
  transform: scale(1.05);
}

/* === Resource Cards === */
.resource-card {
  background-color: var(--neutral-100);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.resource-card h3 {
  color: var(--primary-color);
  margin-bottom: var(--space-md);
  font-size: 1.4rem;
}

.resource-list {
  list-style: none;
  padding-left: 0;
}

.resource-list li {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
  position: relative;
}

.resource-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--complementary);
}

.resource-list a {
  color: var(--neutral-700);
  transition: color var(--transition-fast);
}

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

/* === Community Section === */
#comunidad .card {
  text-align: center;
}

#comunidad .card-image img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-full);
  margin: var(--space-md) auto;
  border: 3px solid var(--primary-color);
  padding: 5px;
}

#comunidad .text-muted {
  color: var(--complementary) !important;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.testimonial-card {
  background-color: var(--neutral-100);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
  margin: var(--space-md) auto;
  max-width: 800px;
}

.testimonial-card::before {
  content: """;
  font-family: var(--font-heading);
  font-size: 5rem;
  position: absolute;
  top: -20px;
  left: 20px;
  color: var(--neutral-300);
  z-index: 0;
}

.testimonial-card p {
  position: relative;
  z-index: 1;
  font-style: italic;
}

.testimonial-card h4 {
  color: var(--primary-color);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

/* === Media Section === */
.media-card {
  background-color: var(--neutral-100);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
}

.media-card .text-muted {
  font-size: 0.9rem;
  color: var(--complementary) !important;
  margin-bottom: var(--space-sm);
}

/* === FAQ Section === */
.accordion-button {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--neutral-700);
  background-color: var(--neutral-100);
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-sm);
}

.accordion-button:not(.collapsed) {
  color: var(--primary-color);
  background-color: rgba(58, 110, 165, 0.1);
}

.accordion-button:focus {
  box-shadow: none;
  border-color: var(--primary-light);
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233a6ea5'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
  background-color: var(--neutral-100);
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  padding: var(--space-lg);
}

/* === Contact Section === */
.contact-info {
  margin-bottom: var(--space-lg);
}

.contact-info h4 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: var(--space-xs);
}

.icon-box {
  width: 50px;
  height: 50px;
  background-color: var(--primary-light);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-form-wrapper {
  background-color: var(--neutral-100);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.form-control, .form-select {
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--neutral-400);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

/* === Footer === */
footer {
  background-color: var(--neutral-900);
  color: var(--neutral-300);
}

footer h3, footer h5 {
  color: var(--neutral-100);
  font-weight: 700;
}

footer a {
  color: var(--neutral-300);
  transition: color var(--transition-fast);
}

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

footer hr {
  background-color: var(--neutral-700);
}

/* === Success Page === */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: white;
  text-align: center;
  padding: var(--space-lg);
}

.success-content {
  max-width: 600px;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--neutral-800);
  padding: var(--space-xl);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.success-content h1 {
  color: var(--primary-color);
  margin-bottom: var(--space-lg);
}

/* === Terms & Privacy Pages === */
.terms-privacy-content {
  padding-top: 100px;
  min-height: 100vh;
}

.terms-privacy-content h1 {
  color: var(--primary-color);
  margin-bottom: var(--space-lg);
}

.terms-privacy-content h2 {
  color: var(--neutral-700);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-size: 1.8rem;
}

.terms-privacy-content p, 
.terms-privacy-content ul {
  margin-bottom: var(--space-md);
}

/* === Parallax and Animations === */
.parallax-section {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

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

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

/* === Responsive Design === */
@media (max-width: 992px) {
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section-padding {
    padding: var(--space-lg) 0;
  }
}

@media (max-width: 768px) {
  .hero-section {
    height: auto;
    min-height: 80vh;
    background-attachment: scroll;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .contact-form-wrapper {
    margin-top: var(--space-lg);
  }
  
  .testimonial-card::before {
    font-size: 3rem;
    top: -10px;
    left: 10px;
  }
}

@media (max-width: 576px) {
  body {
    padding-top: 60px;
  }
  
  .hero-section {
    margin-top: -60px;
  }
  
  .hero-section h1 {
    font-size: 1.8rem;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-title::after {
    width: 60px;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}