/* Estilos generales */
:root {
  --primary-color: #2A5C99;
  --secondary-color: #FF6B35;
  --accent-color: #4A8BDD;
  --text-color: #333;
  --light-color: #f5f7fa;
  --white: #ffffff;
  --success-color: #4CAF50;
  --warning-color: #FFF3E0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
  padding: 0;
  background-color: var(--light-color);
  padding-top: 50px; /* Espacio para el header fijo */
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header - Versión mejorada y fija */
header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 50px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.logo-img {
  height: 70px;
  width: auto;
  transition: all 0.3s ease;
}

.logo-title {
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

.logo-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: all 0.3s ease;
}

/* Header compacto al hacer scroll */
.header-scrolled {
  padding: 8px 0;
}

.header-scrolled .logo-img {
  height: 60px;
}

.header-scrolled .logo-title {
  font-size: 1.5rem;
}

.header-scrolled .logo-subtitle {
  font-size: 0.95rem;
}

/* Hero Section - Ajustado para header fijo */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
  opacity: 0.9;
}

/* Botones - Versión mejorada */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  min-width: 180px;
  height: 48px;
  box-sizing: border-box;
  margin: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #E55627;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: #1E4A7A;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(42, 92, 153, 0.4);
}

.btn-tertiary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  min-width: 160px;
}

.btn-tertiary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.hero-buttons {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

/* Servicios */
.services {
  padding: 60px 0;
  background-color: var(--white);
}

.services h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  color: var(--primary-color);
  position: relative;
}

.services h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--secondary-color);
  margin: 15px auto 0;
  border-radius: 2px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.service-card {
  background: var(--white);
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card img {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.service-card p {
  color: #666;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.card-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.card-btn {
  padding: 10px 15px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  min-width: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.info-btn {
  background-color: var(--primary-color);
  color: var(--white);
}

.guide-btn {
  background-color: var(--success-color);
  color: var(--white);
}

.card-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Modales */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  backdrop-filter: blur(3px);
}

.modal-content {
  background-color: var(--white);
  margin: 5% auto;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover {
  color: var(--primary-color);
}

/* Formulario */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(42, 92, 153, 0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.terms-container {
  margin: 25px 0;
  display: flex;
  align-items: center;
}

.terms-container input {
  margin-right: 10px;
  width: auto;
}

.terms-link {
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.terms-link:hover {
  color: #1E4A7A;
}

.conditional-field {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed #ddd;
}

/* Modales de servicio */
.service-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.service-modal-content {
  background-color: var(--white);
  margin: 5% auto;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.service-modal h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.service-modal h3 {
  color: var(--primary-color);
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.service-modal ul, .service-modal ol {
  padding-left: 20px;
}

.service-modal li {
  margin-bottom: 8px;
}

.warning-note {
  background-color: var(--warning-color);
  border-left: 4px solid var(--secondary-color);
  padding: 15px;
  margin-top: 20px;
  border-radius: 0 5px 5px 0;
}

/* Botón flotante mejorado */
.btn-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  width: auto;
  height: 60px;
  padding: 0 25px;
  border-radius: 30px;
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  font-weight: 600;
}

.btn-float.visible {
  opacity: 1;
  transform: translateY(0);
}

.btn-float:hover {
  background-color: #E55627;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn-float svg {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  flex-shrink: 0;
}

.btn-float-text {
  white-space: nowrap;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 30px 0;
  text-align: center;
  font-size: 0.9rem;
}

footer p {
  margin: 10px 0;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 992px) {
  .header-content {
    padding: 0 30px;
  }
  
  .logo-img {
    height: 60px;
  }
  
  .logo-title {
    font-size: 1.6rem;
  }
  
  .logo-subtitle {
    font-size: 1rem;
  }

  .header-scrolled .logo-img {
    height: 50px;
  }

  .header-scrolled .logo-title {
    font-size: 1.4rem;
  }

  .header-scrolled .logo-subtitle {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 110px; /* Menos espacio para móviles */
  }

  .hero {
    padding: 50px 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .header-content {
    padding: 0 20px;
  }
  
  .logo-img {
    height: 55px;
  }
  
  .logo-title {
    font-size: 1.5rem;
  }
  
  .logo-subtitle {
    font-size: 0.95rem;
  }
  
  .btn-float {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0;
  }
  
  .btn-float-text {
    display: none;
  }
  
  .btn-float svg {
    margin-right: 0;
  }
  
  .modal-content {
    margin: 10% auto;
    width: 95%;
    padding: 20px;
  }
}

@media (max-width: 576px) {
  body {
    padding-top: 100px; /* Aún menos espacio para móviles pequeños */
  }

  .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 0 15px;
  }
  
  .logo-text {
    text-align: center;
    order: 2;
  }
  
  .logo-img {
    order: 1;
    height: 50px;
    margin-bottom: 5px;
  }
  
  .logo-title {
    font-size: 1.4rem;
  }
  
  .logo-subtitle {
    font-size: 0.9rem;
  }

  .header-scrolled .logo-img {
    height: 45px;
  }

  .header-scrolled .logo-title {
    font-size: 1.2rem;
  }

  .header-scrolled .logo-subtitle {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 40px 0;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    width: 100%;
    margin: 8px 0;
    min-width: auto;
  }
  
  .card-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .card-btn {
    width: 100%;
  }
  
  .btn-float {
    bottom: 20px;
    right: 20px;
  }
  
  .logo-img {
    height: 45px;
  }
  
  .logo-title {
    font-size: 1.3rem;
  }
  
  .logo-subtitle {
    font-size: 0.85rem;
  }
}

/* Efecto de carga para modales */
.loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--secondary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}