/* Variables y configuración base */
:root {
  --primary-color: #6a11cb;
  --secondary-color: #2575fc;
  --accent-color: #FFC107;
  --accent-secondary: #4CD964;
  --text-color: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --background-card: rgba(255, 255, 255, 0.1);
  --border-card: rgba(255, 255, 255, 0.2);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --gradient-bg: linear-gradient(145deg, #0f0c29, #302b63, #24243e);
  --gradient-primary: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  --border-radius: 15px;
  --transition: all 0.3s ease-in-out;
}

/* Reset y estilos generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-color);
  background: var(--gradient-bg);
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1.5rem;
}

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

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

a:hover {
  color: var(--accent-color);
}

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

.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
  max-width: 1200px;
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background: var(--gradient-primary);
  margin: 1rem auto;
  border-radius: 2px;
}

/* Estilos de Glassmorphism */
.glass-card {
  background: var(--background-card);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid var(--border-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* Botones */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
  height: auto;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(106, 17, 203, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 25px rgba(106, 17, 203, 0.6);
  color: white;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* Navegación */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(15, 12, 41, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-scrolled {
  padding: 0.7rem 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
}

.navbar-logo img {
  height: 40px;
}

.navbar-links {
  display: none;
}

.navbar-links ul {
  display: flex;
  list-style: none;
}

.navbar-links li {
  margin-left: 2rem;
}

.navbar-links a {
  font-weight: 500;
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
}

.navbar-links a:hover::after {
  width: 100%;
}

.navbar-mobile-toggle {
  display: block;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.navbar-mobile {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  height: 100vh;
  background: var(--gradient-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1100;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.navbar-mobile.active {
  right: 0;
}

.navbar-mobile-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  margin-bottom: 2rem;
}

.navbar-mobile ul {
  list-style: none;
}

.navbar-mobile li {
  margin-bottom: 1.5rem;
}

.navbar-mobile a {
  font-size: 1.2rem;
  font-weight: 500;
  display: block;
  padding: 0.5rem 0;
}

.navbar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: none;
}

.navbar-overlay.active {
  display: block;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 10rem 0 5rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/hero-finance-education.jpg') center/cover no-repeat;
  opacity: 0.15;
  z-index: -1;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

/* Card Grid Masonry */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card-grid-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

.card-grid-item img {
  width: 100%;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 0.95rem;
}

/* Features Section */
.features {
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 20px rgba(106, 17, 203, 0.3);
}

.feature-icon i {
  font-size: 2rem;
  color: white;
}

.feature-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* Testimonial Section */
.about-section {
  position: relative;
}

.about-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.about-content {
  flex: 1;
}

.about-image {
  flex: 1;
  position: relative;
  min-height: 300px;
}

.about-image img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
}

/* Form Section */
.form-section {
  position: relative;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.15);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-submit {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 500;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
.footer {
  background: rgba(15, 12, 41, 0.8);
  padding: 4rem 0 2rem;
  position: relative;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.footer-logo {
  margin-bottom: 1.5rem;
}

.footer-logo img {
  height: 40px;
}

.footer-info p {
  margin-bottom: 1rem;
}

.footer-links h4 {
  margin-bottom: 1.5rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-contact h4 {
  margin-bottom: 1.5rem;
}

.footer-contact p {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
}

.footer-contact i {
  margin-right: 0.8rem;
  color: var(--accent-color);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: rgba(15, 12, 41, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  transition: var(--transition);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-consent.active {
  bottom: 0;
}

.cookie-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-text {
  margin-bottom: 1rem;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cookie-modal.active {
  opacity: 1;
  visibility: visible;
}

.cookie-modal-content {
  background: var(--gradient-bg);
  border-radius: var(--border-radius);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  border: 1px solid var(--border-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cookie-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.cookie-category {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1.5rem;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.cookie-category-title {
  font-weight: 700;
  font-size: 1.2rem;
}

.cookie-category-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.cookie-category-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-category-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: var(--transition);
  border-radius: 34px;
}

.cookie-category-toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: var(--transition);
  border-radius: 50%;
}

input:checked + .cookie-category-toggle-slider {
  background-color: var(--accent-color);
}

input:checked + .cookie-category-toggle-slider:before {
  transform: translateX(26px);
}

.cookie-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

.cookie-settings-button {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent-color);
  text-decoration: underline;
  cursor: pointer;
}

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

.animate {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-delay-1 {
  animation-delay: 0.2s;
}

.animate-delay-2 {
  animation-delay: 0.4s;
}

.animate-delay-3 {
  animation-delay: 0.6s;
}

/* Page Specific Styles */
.page-header {
  padding: 10rem 0 5rem;
  text-align: center;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0.1;
  z-index: -1;
}

/* Para quien page */
.target-audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Contactos page */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 20px rgba(106, 17, 203, 0.3);
}

.contact-icon i {
  font-size: 1.8rem;
  color: white;
}

/* Policy pages */
.policy-content {
  max-width: 800px;
  margin: 0 auto;
}

.policy-content h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.policy-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

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

.policy-content li {
  margin-bottom: 0.5rem;
}

.policy-content .update-date {
  font-style: italic;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

/* Thanks page */
.thanks-container {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

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

.thanks-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.thanks-text {
  max-width: 600px;
  margin-bottom: 2rem;
}

/* Fix for intl-tel-input */
.iti {
  width: 90%;
}

/* Media Queries */
@media (min-width: 576px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .hero-cta {
    flex-direction: row;
  }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cookie-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .cookie-text {
    margin-bottom: 0;
  }
}

@media (min-width: 768px) {
  .navbar-links {
    display: block;
  }
  
  .navbar-mobile-toggle {
    display: none;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-container {
    flex-direction: row;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .target-audience-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-info {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 992px) {
  .hero-title {
    font-size: 3.5rem;
  }
  
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
  
  .target-audience-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  .hero-title {
    font-size: 4rem;
  }
}