/* Base Variables with Color Palette */
:root {
  --midnight-purple: #2E003E;
  --coral-orange: #FF6B35;
  --pale-mint: #B5FFE1;
  --deep-charcoal: #2C2C2C;
  --soft-cream: #FFF7ED;
  
  --gradient-cta: linear-gradient(135deg, var(--coral-orange), var(--midnight-purple));
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--deep-charcoal);
  background-color: var(--soft-cream);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--midnight-purple);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 2rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--coral-orange);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--midnight-purple);
}

section {
  padding: 60px 0;
}

/* Ajuste para anclajes - scroll padding */
html {
  scroll-padding-top: 100px; /* Altura del header más margen */
}

/* Para secciones con ID */
section[id] {
  scroll-margin-top: 100px;
}

/* Header and Navigation */
header {
  background-color: var(--soft-cream);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--box-shadow);
  padding: 15px 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--midnight-purple);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  text-align: center;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  color: var(--deep-charcoal);
  text-decoration: none;
  font-weight: 600;
}

nav ul li a:hover {
  color: var(--coral-orange);
}

nav ul li a.cta-button {
  background: var(--gradient-cta);
  color: white !important;
  padding: 10px 15px;
  border-radius: var(--border-radius);
}

/* CSS for PHP-based mobile toggle */
.menu-toggle {
  display: block;
  width: 30px;
  height: 22px;
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 200;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--deep-charcoal);
  margin-bottom: 5px;
  border-radius: 3px;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
  
  header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  nav ul {
    display: flex;
    align-items: center;
  }
}

/* Mobile navigation that works with PHP GET parameter toggle */
@media (max-width: 767px) {
  nav {
    display: none;
  }
  
  nav.nav-open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--midnight-purple);
    padding-top: 80px;
  }
  
  nav.nav-open ul {
    flex-direction: column;
    text-align: center;
  }
  
  nav.nav-open li {
    margin: 15px 0;
  }
  
  nav.nav-open a {
    color: var(--soft-cream);
    font-size: 1.2rem;
    padding: 15px;
    display: block;
  }
  
  nav.nav-open a.cta-button {
    display: inline-block;
    margin-top: 15px;
  }
}

/* Hero section with gradient animation */
.hero {
  background: var(--gradient-cta);
  background-size: 200% 200%;
  animation: gradientAnimation 8s ease infinite;
  padding: 100px 0;
  text-align: center;
  color: white;
}

.hero h1 {
  color: white;
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.hero .tagline {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin-bottom: 40px;
}

.cta-button {
  background: white;
  color: var(--midnight-purple) !important;
  padding: 15px 30px;
  border-radius: var(--border-radius);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  transition: var(--transition);
  box-shadow: var(--box-shadow);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* About Section */
.about {
  background-color: var(--soft-cream);
}

.about .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
  position: relative;
}

.about .container h2 {
  width: 100%;
  text-align: center;
  margin-bottom: 30px;
}

.about .container > p {
  flex: 1;
  min-width: 300px;
}

.about-image {
  border-radius: var(--border-radius);
  overflow: hidden;
  flex: 1;
  min-width: 300px;
  max-width: 450px;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Services Section */
.services {
  background-color: var(--deep-charcoal);
  color: var(--soft-cream);
}

.services h2 {
  color: var(--soft-cream);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.service-icon {
  width: 100%;
  height: 150px;
  margin: 0 auto 20px;
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card h3 {
  color: var(--soft-cream);
  margin-bottom: 15px;
}

/* Benefits Section */
.benefits {
  background-color: var(--soft-cream);
  text-align: center;
}

.benefits-list {
  list-style: none;
  margin: 30px auto;
  max-width: 700px;
}

.benefits-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  justify-content: center;
}

.benefits-list .icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 15px;
  flex-shrink: 0;
}

.benefits-list .icon.check {
  background-color: var(--coral-orange);
  border-radius: 50%;
  position: relative;
}

.benefits-list .icon.check::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg);
  top: 8px;
  left: 6px;
}

/* Counter Section */
.counter {
  background-color: var(--midnight-purple);
  color: var(--soft-cream);
  text-align: center;
  padding: 80px 0;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.counter-item {
  position: relative;
}

.counter-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--coral-orange);
  margin-bottom: 15px;
}

.counter-label {
  font-size: 1.2rem;
  font-weight: 500;
}

/* CSS-only testimonial slider */
.testimonials {
  background-color: var(--soft-cream);
}

.testimonial-slider {
  overflow: hidden;
  margin: 30px 0;
  position: relative;
}

.testimonial-track {
  display: flex;
  animation: slide 30s infinite linear;
  width: 300%;
}

.testimonial-card {
  flex: 1;
  min-width: 33.333%;
  padding: 30px;
  background: white;
  border-radius: var(--border-radius);
  margin: 0 15px;
  box-shadow: var(--box-shadow);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 20px;
}

.testimonial-author {
  font-weight: 600;
  color: var(--midnight-purple);
}

@keyframes slide {
  0% { transform: translateX(0); }
  33.33% { transform: translateX(-33.333%); }
  66.66% { transform: translateX(-66.666%); }
  100% { transform: translateX(0); }
}

/* Contact Form */
.contact-form {
  background-color: var(--deep-charcoal);
  color: var(--soft-cream);
  text-align: center;
}

.contact-form h2 {
  color: var(--soft-cream);
}

form {
  max-width: 600px;
  margin: 40px auto 0;
  padding: 30px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: left;
  color: var(--deep-charcoal);
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
}

.checkbox {
  display: flex;
  align-items: center;
}

.checkbox input {
  width: auto;
  margin-right: 10px;
}

.checkbox label {
  margin-bottom: 0;
  font-weight: 400;
}

button.submit-button {
  background: var(--gradient-cta);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  width: 100%;
  margin-top: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

button.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
}

/* FAQ section with PHP-based toggle */
.faq {
  background-color: var(--soft-cream);
}

.faq-item {
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.faq-question {
  display: block;
  padding: 15px;
  background-color: white;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  color: var(--midnight-purple);
  text-decoration: none;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 15px;
  transition: var(--transition);
}

.faq-item.open .faq-question::after {
  content: '-';
}

.faq-answer {
  padding: 0 15px;
  max-height: 0;
  overflow: hidden;
  transition: var(--transition);
  background-color: #f9f9f9;
}

.faq-item.open .faq-answer {
  padding: 15px;
  max-height: 1000px;
}

/* Footer */
footer {
  background-color: var(--deep-charcoal);
  color: var(--soft-cream);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  color: var(--soft-cream);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--coral-orange);
}

.footer-col address {
  font-style: normal;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--coral-orange);
  margin-bottom: 20px;
}

.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Policy Pages */
.policy-page {
  padding: 80px 0;
}

.policy-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: var(--box-shadow);
}

.policy-card h1 {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.policy-card h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  text-align: left;
}

/* Cookie popup */
#cookie-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--deep-charcoal);
  color: white;
  padding: 15px;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

#cookie-popup .cookie-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

#accept-cookies {
  background-color: var(--coral-orange);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  cursor: pointer;
  margin-left: 15px;
  font-weight: 600;
  transition: var(--transition);
}

#accept-cookies:hover {
  background-color: var(--midnight-purple);
}

/* Thank You Page */
.thanks-section {
  padding: 100px 0;
  text-align: center;
}

.thanks-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: var(--box-shadow);
  max-width: 600px;
  margin: 0 auto;
}

.thanks-icon {
  width: 80px;
  height: 80px;
  background-color: var(--coral-orange);
  border-radius: 50%;
  margin: 0 auto 30px;
  position: relative;
}

.thanks-icon::before {
  content: '';
  position: absolute;
  width: 40px;
  height: 20px;
  border-left: 5px solid white;
  border-bottom: 5px solid white;
  transform: rotate(-45deg);
  top: 28px;
  left: 20px;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
  section {
    padding: 40px 0;
  }
  
  .testimonial-card {
    padding: 15px;
  }
  
  #cookie-popup .cookie-content {
    flex-direction: column;
  }
  
  #accept-cookies {
    margin-top: 15px;
    margin-left: 0;
  }
  
  .policy-card {
    padding: 20px;
  }
  
  .hero {
    padding: 60px 0;
  }
}

@media (max-width: 480px) {
  .form-group.checkbox {
    align-items: flex-start;
  }
  
  .form-group.checkbox input {
    margin-top: 5px;
  }
}
