/* ===== Variables ===== */
:root {
  --primary: #5a21b6; /* Morado refinado */
  --primary-hover: #4c1d95;
  --bg-main: #fafafa;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-light: #e2e8f0;
  --radius-lg: 16px;
  --radius-md: 10px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== Menú Lateral Desplegable ===== */
.menu-toggle {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 1100;
  background: #6d1ac6; /* Fondo morado solicitado */
  color: #ffffff;
  border: none;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(109, 26, 198, 0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}

.menu-toggle:hover {
  background: #5b21b6;
  transform: scale(1.05);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Panel Lateral */
.sidebar-nav {
  position: fixed;
  top: 0;
  left: -280px; /* Oculto a la izquierda */
  width: 280px;
  height: 100%;
  background: #fafafa4e; /* Mismo color de fondo */
  z-index: 1060;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.sidebar-nav.open {
  left: 0;
}

/* Encabezado del Sidebar (Icono) */
.sidebar-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-icon {
  width: 90px; /* Icono grande y visible */
  height: auto;
  
}

/* ===== Enlaces del Sidebar (Estilo Botón Skew) ===== */
.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center; /* Centra los botones horizontalmente */
  width: 100%;
}

/* Botón base */
.sidebar-links .button {
  position: relative;
  background: #ffffff;
  border: none;
  padding: 12px 20px;
  display: flex; /* Cambiado de inline-block a flex para centrar el texto */
  justify-content: center; /* Centra el texto horizontalmente */
  align-items: center; /* Centra el texto verticalmente */
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  width: 100%; /* Ocupa todo el ancho del sidebar */
  max-width: 220px; /* Ancho máximo para que no se estire demasiado */
  text-transform: uppercase;
  cursor: pointer;
  transform: skew(-21deg);
  text-decoration: none;
  color: #5a21b6;
  transition: color 0.5s ease;
  overflow: hidden;
  z-index: 1;
}

/* Texto interno (contra-skew para que no se vea inclinado) */
.sidebar-links .button span {
  display: inline-block;
  transform: skew(21deg);
  transition: color 0.5s ease;
  text-align: center;
  width: 100%;
}

/* Fondo animado */
.sidebar-links .button::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 100%;
  left: 0;
  background: #5a21b6;
  opacity: 0;
  z-index: -1;
  transition: all 0.5s;
}

/* Efecto Hover */
.sidebar-links .button:hover {
  color: #ffffff;
}

.sidebar-links .button:hover::before {
  left: 0;
  right: 0;
  opacity: 1;
}

/* Estado Activo */
.sidebar-links .button.active {
  color: #ffffff;
}

.sidebar-links .button.active::before {
  left: 0;
  right: 0;
  opacity: 1;
}

/* Ajuste del Hero para que no choque con el botón */
.hero {
  padding-top: 5rem; 
}

/* ===== Layout & Sections ===== */
.section {
  padding: 8rem 1.5rem 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}

/* ===== Hero ===== */
.hero {
  min-height: 85vh;
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-logo {
  max-width: 280px;
  width: 100%;
  height: auto;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 480px;
  font-weight: 400;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* ===== Titles ===== */
.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3.5rem;
  font-size: 1.05rem;
}

/* ===== Services Grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.service-icon {
  width: 42px;
  height: 42px;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.service-card p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Portfolio List Layout ===== */
.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

/* Tarjeta uniforme para todos los proyectos */
.portfolio-featured {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-featured:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Contenedor del Iframe con altura y estilo uniforme */
.iframe-container {
  width: 100%;
  height: 480px;
  background: #f8fafc;
  position: relative;
  border-bottom: 1px solid var(--border-light);
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  tex t-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.portfolio-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.portfolio-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.portfolio-link svg {
  width: 16px;
  height: 16px;
}

.portfolio-link:hover {
  opacity: 0.8;
}

/* Responsive para dispositivos móviles */
@media (max-width: 768px) {
  .iframe-container {
    height: 320px;
  }
}

/* ===== Form ===== */
.contact-form {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-icon {
  width: 32px;
  height: auto;
  margin-bottom: 1rem;
  opacity: 0.7;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .glass-nav label {
    padding: 0.5rem 0.8rem;
    font-size: 0.775rem;
  }
}

.service-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.service-link:hover {
  opacity: 0.8;
}

/* ===== Formulario de Contacto (Estilo Tarjeta) ===== */
.contact-card {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background-color: var(--bg-card);
  border-radius: 20px;
  box-shadow: 0px 187px 75px rgba(0, 0, 0, 0.01), 
              0px 105px 63px rgba(0, 0, 0, 0.05), 
              0px 47px 47px rgba(0, 0, 0, 0.09), 
              0px 12px 26px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.contact-card-title {
  display: block;
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  position: relative;
}

.contact-card-title::after {
  content: '';
  width: 40px;
  height: 2px;
  position: absolute;
  bottom: -1px;
  left: 1.5rem;
  background-color: var(--primary);
}

.contact-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(90, 33, 182, 0.1);
  background-color: #ffffff;
}

.input-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-card-footer {
  padding: 1rem 1.5rem 1.5rem;
  background-color: #f8fafc;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
}

.btn-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-send:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-send:active {
  transform: translateY(0);
}

.btn-send svg {
  width: 18px;
  height: 18px;
}

/* Estado de éxito (cuando se envía) */
.btn-send.success {
  background-color: #16a34a;
}

/* Responsive */
@media (max-width: 640px) {
  .contact-card {
    border-radius: 16px;
  }
  
  .contact-card-body {
    padding: 1.25rem;
  }
  
  .contact-card-footer {
    padding: 1rem 1.25rem 1.25rem;
  }
  
  .btn-send {
    width: 100%;
  }
}

/* ===== Sección de Contactos (Wrapper) ===== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

/* ===== Formulario de Contacto (Estilo Tarjeta) ===== */
.contact-card {
  width: 100%;
  background-color: var(--bg-card);
  border-radius: 20px;
  box-shadow: 0px 187px 75px rgba(0, 0, 0, 0.01), 
              0px 105px 63px rgba(0, 0, 0, 0.05), 
              0px 47px 47px rgba(0, 0, 0, 0.09), 
              0px 12px 26px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.contact-card-title {
  display: block;
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  position: relative;
}

.contact-card-title::after {
  content: '';
  width: 40px;
  height: 2px;
  position: absolute;
  bottom: -1px;
  left: 1.5rem;
  background-color: var(--primary);
}

.contact-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(90, 33, 182, 0.1);
  background-color: #ffffff;
}

.input-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-card-footer {
  padding: 1rem 1.5rem 1.5rem;
  background-color: #f8fafc;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
}

.btn-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-send:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-send:active {
  transform: translateY(0);
}

.btn-send svg {
  width: 18px;
  height: 18px;
}

.btn-send.success {
  background-color: #16a34a;
}

/* ===== Redes Sociales (Estilo Glass) ===== */
.social-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(90, 33, 182, 0.08);
  height: 100%;
}

.social-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.social-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  text-align: center;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.up,
.down {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

/* Tarjetas Glass */
.card {
  width: 90px;
  height: 90px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.card1 { border-radius: 30px 16px 16px 16px; }
.card2 { border-radius: 16px 30px 16px 16px; }
.card3 { border-radius: 16px 16px 16px 30px; }
.card4 { border-radius: 16px 16px 30px 16px; }

.instagram,
.twitter,
.github,
.whatsapp {
  transition: fill 0.3s ease-in-out;
}

.instagram { fill: #e1306c; }
.x-twitter {
  fill: #0f172a; /* Negro azulado, más elegante que el negro puro */
}
.github { fill: #333; }
.whatsapp { fill: #00a849; }

.card:hover {
  cursor: pointer;
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(90, 33, 182, 0.2);
  background: var(--primary);
  border-color: var(--primary);
}

.card:hover svg {
  fill: white;
}

/* Responsive */
@media (max-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  
  .social-wrapper {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .contact-card {
    border-radius: 16px;
  }
  
  .contact-card-body {
    padding: 1.25rem;
  }
  
  .contact-card-footer {
    padding: 1rem 1.25rem 1.25rem;
  }
  
  .btn-send {
    width: 100%;
  }

  .card {
    width: 75px;
    height: 75px;
  }
  
  .card svg {
    width: 32px;
    height: 32px;
  }
}

/* ===== Casilla de Aceptación (Rediseñada) ===== */
.checkbox-group {
  padding: 0 1.5rem; /* Alineado con el padding del formulario */
  margin-bottom: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 1rem;
  background-color: #f8fafc;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.checkbox-label:hover {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(90, 33, 182, 0.08);
}

/* Ocultar el checkbox nativo */
.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  background-color: #ffffff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 0.1rem;
  transition: all 0.2s ease;
}

/* Estado marcado */
.checkbox-label input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* El tick (palomita) */
.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Estado de foco (accesibilidad) */
.checkbox-label input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.checkbox-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
}

.checkbox-text a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(90, 33, 182, 0.4);
  text-underline-offset: 2px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.checkbox-text a:hover {
  color: var(--primary-hover);
  text-decoration-color: var(--primary-hover);
}

/* Ajuste responsive */
@media (max-width: 640px) {
  .checkbox-group {
    padding: 0 1.25rem;
  }
}

/* ===== Enlaces Legales en el Footer ===== */
.footer-legal-links {
  margin-top: 1rem;
  font-size: 0.8rem;
}

.footer-legal-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal-links a:hover {
  color: var(--primary);
}

/* ===== Páginas Legales (Mejorado) ===== */
.legal-section {
  padding-top: 8rem;
  padding-bottom: 6rem;
  align-items: flex-start;
  background: linear-gradient(180deg, var(--bg-main) 0%, #f1f5f9 100%);
}

.legal-container {
  max-width: 850px;
  background: var(--bg-card);
  padding: 3.5rem 4rem;
  border-radius: 24px;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

/* Título principal de la página legal */
.legal-container .section-title {
  text-align: left;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.legal-date {
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 3rem;
  font-style: normal;
  font-weight: 500;
  display: inline-block;
  padding: 0.4rem 1rem;
  background: #f1f5f9;
  border-radius: 999px;
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Estilo de cada bloque de contenido */
.legal-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Pequeño adorno antes de cada título */
.legal-content h2::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 24px;
  background-color: var(--primary);
  border-radius: 4px;
}

.legal-content p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  text-align: justify;
}

.legal-content a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed var(--primary);
  transition: all 0.2s ease;
}

.legal-content a:hover {
  color: var(--primary-hover);
  border-bottom-style: solid;
}

/* ===== Botón "Volver al inicio" (Mejorado) ===== */
.btn-back-home {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  background: #ffffff;
  color: var(--primary);
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-back-home:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 8px 25px rgba(90, 33, 182, 0.3);
  transform: translateY(-2px);
}

.btn-back-home svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.btn-back-home:hover svg {
  transform: translateX(-3px);
}

/* Responsive para páginas legales */
@media (max-width: 768px) {
  .legal-container {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }
  
  .legal-container .section-title {
    font-size: 1.8rem;
  }
  
  .legal-content p {
    font-size: 0.95rem;
    text-align: left;
  }
  
  .btn-back-home {
    top: 1rem;
    left: 1rem;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
}

/* ===== Estilo para el Botón Deshabilitado ===== */
.btn-send:disabled,
.btn-send.disabled {
  background-color: #cbd5e1; /* Gris claro */
  color: #94a3b8; /* Texto gris */
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  opacity: 0.7;
}

.btn-send:disabled:hover,
.btn-send.disabled:hover {
  background-color: #cbd5e1; /* Mantener gris al pasar el mouse */
  transform: none;
  box-shadow: none;
}

.btn-send:disabled svg,
.btn-send.disabled svg {
  opacity: 0.5;
}