/* ============================================================================
   MEJORAS RESPONSIVE Y CORRECCIONES DE ALINEACIÓN
   ============================================================================ */

/* Correcciones generales de alineación */
.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem;
  text-align: center;
  white-space: nowrap;
  line-height: 1.5;
}

.btn i {
  flex-shrink: 0;
}

/* Mejoras para el header/nav */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary, #21808d);
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  position: relative;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text, #13343b);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary, #21808d);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary, #21808d);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(33, 128, 141, 0.1);
  border-radius: 0.5rem;
  color: var(--color-primary, #21808d);
  font-weight: 500;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color-text, #13343b);
  transition: all 0.3s ease;
}

/* Container responsive */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section responsive */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 4rem 0;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin: 0;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--color-text-secondary, #626c71);
  margin: 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--color-primary, #21808d);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-secondary, #626c71);
  margin-top: 0.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Form Card responsive */
.form-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-card h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary, #21808d);
  box-shadow: 0 0 0 3px rgba(33, 128, 141, 0.1);
}

/* Services Grid responsive */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.service-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(33, 128, 141, 0.1);
  border-radius: 1rem;
  font-size: 2rem;
  color: var(--color-primary, #21808d);
  margin-bottom: 1.5rem;
}

/* Calculator responsive */
.calculator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.calc-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.1);
  outline: none;
}

.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary, #21808d);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.calc-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary, #21808d);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Process Timeline responsive */
.process-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  position: relative;
}

.process-step {
  position: relative;
  text-align: center;
  padding: 2rem 1rem;
}

/* Testimonials responsive */
.testimonials-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Benefits Grid responsive */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.benefit-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

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

/* Contact Form responsive */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Footer responsive */
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  padding: 3rem 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ============================================================================
   MEDIA QUERIES - RESPONSIVE
   ============================================================================ */

/* Tablet y dispositivos medianos (max-width: 1024px) */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

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

  .hero-form {
    max-width: 500px;
    margin: 0 auto;
  }

  .calculator-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-phone span {
    display: none;
  }
}

/* Tablet pequeño (max-width: 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  /* Navigation mobile */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-actions {
    flex-direction: column;
    width: 100%;
    position: fixed;
    top: calc(70px + 200px);
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease 0.1s;
    z-index: 998;
  }

  .nav-actions.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-actions .btn {
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-phone {
    width: 100%;
    justify-content: center;
  }

  /* Hero adjustments */
  .hero {
    min-height: auto;
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

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

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Process */
  .process-timeline {
    grid-template-columns: 1fr;
  }

  /* Testimonials */
  .testimonials-slider {
    grid-template-columns: 1fr;
  }

  /* Benefits */
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  /* Calculator */
  .result-grid {
    grid-template-columns: 1fr;
  }

  /* Form row */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    flex-direction: column;
    align-items: center;
  }
}

/* Móvil (max-width: 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: 2rem;
  }

  .form-card {
    padding: 1.5rem;
  }

  .service-card,
  .benefit-card,
  .testimonial-card {
    padding: 1.5rem;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }

  .btn--lg {
    padding: 1rem 1.5rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .service-icon {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
  }

  .catalog-filters {
    flex-direction: column;
    gap: 0.75rem;
  }

  .filter-group {
    width: 100%;
  }
}

/* Utilidades responsive */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* Espaciado responsive */
.mb-4 {
  margin-bottom: 2rem;
}

.mt-4 {
  margin-top: 2rem;
}

.py-4 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Ocultar elementos en mobile */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Mostrar solo en mobile */
.show-mobile {
  display: none !important;
}

@media (max-width: 768px) {
  .show-mobile {
    display: block !important;
  }
}

/* Fix para imágenes responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Fix para botones en flex containers */
.btn-full-width,
.btn--full-width {
  width: 100% !important;
}
