/* ============================================================
   FASE 3 — Modern Design System
   Dark Mode + Components + Animations
   ============================================================ */

/* ============================================================
   1. DARK MODE VARIABLES
   ============================================================ */

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
  --accent-color: #f07820;
  --accent-light: #ff8c42;
}

:root[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #404040;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.3);
  --accent-color: #ff8c42;
  --accent-light: #ffaa66;
}

/* ============================================================
   2. DARK MODE TOGGLE BUTTON
   ============================================================ */

.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background: var(--accent-color);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(240, 120, 32, 0.3);
  transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(240, 120, 32, 0.4);
}

/* ============================================================
   3. MODAL CONTACTO
   ============================================================ */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--accent-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.btn-modal {
  flex: 1;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.btn-modal-primary:hover {
  background: #e6691a;
  transform: translateY(-2px);
}

.btn-modal-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

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

/* ============================================================
   4. PLAN CARDS (PRICING)
   ============================================================ */

.pricing-section {
  padding: 60px 20px;
  background: var(--bg-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 40px 30px;
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  border: 2px solid transparent;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(240, 120, 32, 0.2);
  border-color: var(--accent-color);
}

.pricing-card.popular {
  border-color: var(--accent-color);
  transform: scale(1.05);
}

.plan-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  display: none;
}

.pricing-card.popular .plan-badge {
  display: block;
}

.plan-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.plan-price {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.plan-price span {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 400;
}

.plan-features {
  list-style: none;
  padding: 30px 0;
  margin: 30px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.plan-features li {
  padding: 10px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.plan-features li:before {
  content: "✓ ";
  color: var(--accent-color);
  font-weight: 700;
  margin-right: 8px;
}

.plan-cta {
  width: 100%;
  padding: 14px 24px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.plan-cta:hover {
  background: #e6691a;
  transform: translateY(-2px);
}

/* ============================================================
   5. TESTIMONIOS CARRUSEL
   ============================================================ */

.testimonials-section {
  padding: 60px 20px;
  background: var(--bg-primary);
}

.testimonials-container {
  max-width: 900px;
  margin: 0 auto;
}

.testimonials-carousel {
  display: flex;
  overflow: hidden;
  border-radius: 12px;
}

.testimonial-card {
  flex: 1;
  background: var(--bg-secondary);
  padding: 40px;
  text-align: center;
  min-width: 100%;
  animation: slideIn 0.5s ease;
  border-radius: 12px;
}

.testimonial-rating {
  font-size: 24px;
  margin-bottom: 20px;
  letter-spacing: 4px;
}

.testimonial-text {
  font-size: 18px;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.testimonial-author {
  font-weight: 700;
  color: var(--accent-color);
  font-size: 14px;
}

.testimonial-nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.testimonial-dot.active {
  background: var(--accent-color);
  transform: scale(1.2);
}

/* ============================================================
   6. HERO SECTION MEJORADO
   ============================================================ */

.hero-section {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-color), #ff8c42);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 600px;
  animation: fadeInUp 0.8s ease;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-cta-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 16px 40px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

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

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.btn-hero-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

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

/* ============================================================
   7. WHATSAPP WIDGET
   ============================================================ */

.wa-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  animation: slideInRight 0.5s ease;
}

.wa-widget a {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #25d366;
  color: white;
  padding: 14px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  transition: all 0.3s ease;
}

.wa-widget a:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.wa-widget svg,
.wa-widget i {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

@media (max-width: 768px) {
  .wa-widget a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
  }

  .wa-widget span {
    display: none;
  }
}

/* ============================================================
   8. ANIMATIONS
   ============================================================ */

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

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

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* AOS Animation support */
[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.6s;
  transition-timing-function: ease-in-out;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: none;
}

/* ============================================================
   9. RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .dark-mode-toggle {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .modal-content {
    padding: 30px 20px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card.popular {
    transform: scale(1);
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-cta-group {
    flex-direction: column;
  }

  .btn-hero {
    width: 100%;
  }
}

/* ============================================================
   10. FOOTER MEJORADO
   ============================================================ */

footer {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 60px 20px 20px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--accent-color);
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  padding: 5px 0;
  color: var(--text-secondary);
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-color);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-badges {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.footer-badge svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   11. FOOTER APPS SECTION (DESTACADA)
   ============================================================ */

.footer-apps {
  background: linear-gradient(135deg, var(--accent-color), #ff8c42);
  padding: 50px 20px;
  color: white;
  text-align: center;
  margin: 40px 0 0 0;
}

.apps-container {
  max-width: 1200px;
  margin: 0 auto;
}

.apps-container h2 {
  font-size: 32px;
  margin-bottom: 10px;
  font-weight: 700;
}

.apps-container > p {
  font-size: 16px;
  margin-bottom: 40px;
  opacity: 0.95;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.app-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 30px 25px;
  transition: all 0.3s ease;
  position: relative;
}

.app-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.app-card.featured {
  border-color: white;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.app-card.featured:hover {
  transform: scale(1.08) translateY(-8px);
}

.app-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
  display: none;
  box-shadow: 0 4px 12px rgba(240, 120, 32, 0.3);
}

.app-card.featured .app-badge {
  display: block;
}

.app-logo-btn {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.app-logo-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border-color: white;
}

.app-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: white;
}

.app-card p {
  font-size: 14px;
  margin-bottom: 20px;
  opacity: 0.9;
  line-height: 1.5;
}

.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--accent-color);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid white;
  transition: all 0.3s ease;
}

.app-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.app-btn.featured-btn {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  font-size: 15px;
  padding: 14px 28px;
}

.app-btn.featured-btn:hover {
  background: #e6691a;
  border-color: #e6691a;
}

@media (max-width: 768px) {
  .apps-container h2 {
    font-size: 24px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .app-card.featured {
    transform: scale(1);
  }

  .app-card.featured:hover {
    transform: translateY(-8px);
  }

  .footer-apps {
    padding: 40px 20px;
    margin: 30px 0 0 0;
  }
}
