/* --- CONFIGURACIÓN GLOBAL Y VARIABLES (ESTILO NGC) --- */
:root {
  --gnc-neon: #00d4ff; 
  --gnc-neon-rgb: 0, 212, 255;
  --gnc-glass: rgba(0, 0, 0, 0.45); 
  --gnc-blur: blur(12px); 
  --gnc-border: 1px solid rgba(0, 212, 255, 0.3); 
  --gnc-text: #ffffff;
  --gnc-text-muted: rgba(255, 255, 255, 0.75);
  --gnc-bg-input: rgba(0, 0, 0, 0.6); 
  --gnc-success: #28a745; 
  --bg-body-color: #121212;
  --bg-image: url('../img/fondotarjeta.avif');
  --card-shadow: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --gnc-neon: #0056d6; 
  --gnc-neon-rgb: 0, 86, 214;
  --gnc-glass: rgba(255, 255, 255, 0.75); 
  --gnc-border: 1px solid rgba(0, 122, 153, 0.3); 
  --gnc-text: #111111;
  --gnc-text-muted: rgba(0, 0, 0, 0.7);
  --gnc-bg-input: rgba(255, 255, 255, 0.9); 
  --gnc-success: #1e7e34; 
  --bg-body-color: #d6dbe0;
  --bg-image: url('../img/fondotarjetaclaro.avif');
  --card-shadow: rgba(0, 0, 0, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    background-color: var(--bg-body-color); 
    overscroll-behavior-y: none; 
    transition: background-color 0.4s ease;
}

body {
  background: var(--bg-body-color) var(--bg-image) no-repeat center top fixed !important;
  background-size: cover !important;
  margin: 0;
  padding: 30px 20px 60px; 
  position: relative;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--gnc-text);
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  min-height: 100vh;
  transition: color 0.4s ease;
}

.switch-plate {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 9999;
  width: 32px;
  height: 48px;
  background: var(--gnc-glass);
  backdrop-filter: var(--gnc-blur);
  -webkit-backdrop-filter: var(--gnc-blur);
  border: 1px solid rgba(150, 150, 150, 0.2);
  border-radius: 8px; 
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  outline: none;
}

.switch-plate:hover {
  border-color: rgba(var(--gnc-neon-rgb), 0.4);
  box-shadow: 0 4px 12px rgba(var(--gnc-neon-rgb), 0.15);
}

.switch-rocker {
  width: 14px;
  height: 28px;
  border-radius: 4px;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, box-shadow 0.3s ease;
  transform-origin: center;
  transform: perspective(200px) rotateX(-12deg);
  background: #2a2a2a;
  border: 1px solid #1a1a1a;
  box-shadow: 0 3px 2px -1px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.05);
}

[data-theme="light"] .switch-rocker {
  transform: perspective(200px) rotateX(12deg);
  background: #f4f4f4;
  border: 1px solid #dcdcdc;
  box-shadow: 0 -3px 2px -1px rgba(0,0,0,0.1), inset 0 -1px 1px rgba(255,255,255,0.5);
}

.switch-rocker::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  top: 4px;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

[data-theme="light"] .switch-rocker::after {
  top: auto;
  bottom: 4px;
  background: var(--gnc-neon);
  box-shadow: 0 0 6px rgba(var(--gnc-neon-rgb), 0.8);
}

.ecard-container {
  width: 100%;
  max-width: 450px;
  animation: fadeIn 0.8s ease-out;
  display: flex;
  flex-direction: column;
}

.ecard-left-panel {
  display: flex;
  flex-direction: column;
}

.mobile-only {
  display: flex;
}

#headerSection {
  text-align: center;
  transition: all 0.4s ease;
}

h1 {
  font-size: 30px;
  font-weight: 800; 
  margin-bottom: 8px;
  color: var(--gnc-text); 
  text-transform: uppercase;
  letter-spacing: 2px;
}

.subtitle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 25px;
  color: var(--gnc-text-muted);
  line-height: 1.5;
  text-align: center;
}

.nro-registro {
  display: block;
  color: var(--gnc-success); 
  font-weight: 700;
  margin-top: 5px;
}

#mainButtons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-link {
  width: 100%;
  padding: 14px 20px;
  background: var(--gnc-glass); 
  backdrop-filter: var(--gnc-blur);
  -webkit-backdrop-filter: var(--gnc-blur);
  border: 1px solid rgba(150, 150, 150, 0.2); 
  border-radius: 12px;
  color: var(--gnc-text);
  text-decoration: none;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  opacity: 0;
  animation: slideUp 0.5s ease-out forwards;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--card-shadow);
}

.btn-link:nth-child(1) { animation-delay: 0.1s; }
.btn-link:nth-child(2) { animation-delay: 0.2s; }
.btn-link:nth-child(3) { animation-delay: 0.3s; }
.btn-link:nth-child(4) { animation-delay: 0.4s; }
.btn-link:nth-child(5) { animation-delay: 0.5s; }
.btn-link:nth-child(6) { animation-delay: 0.6s; }

.btn-link:hover {
  background: rgba(var(--gnc-neon-rgb), 0.15);
  border-color: var(--gnc-neon);
  box-shadow: 0 0 15px rgba(var(--gnc-neon-rgb), 0.4);
  color: var(--gnc-neon);
  transform: translateY(-2px);
}

.btn-whatsapp:hover {
  background: rgba(40, 167, 69, 0.15);
  border-color: var(--gnc-success);
  box-shadow: 0 0 15px rgba(40, 167, 69, 0.4);
  color: var(--gnc-success);
}

.btn-icon {
  position: absolute;
  right: 20px;
  width: 18px;
  height: 18px;
  opacity: 0.6;
  color: var(--gnc-neon);
  transition: all 0.3s;
}

.btn-whatsapp .icon-whatsapp { color: var(--gnc-success); }
.btn-link:hover .btn-icon { opacity: 1; filter: drop-shadow(0 0 4px currentColor); }

.share-container {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 15px;
  animation: fadeIn 1.5s ease-in;
}

.btn-share {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--gnc-glass);
  backdrop-filter: var(--gnc-blur);
  -webkit-backdrop-filter: var(--gnc-blur);
  border: 1px solid rgba(150, 150, 150, 0.2); 
  border-radius: 12px;
  color: var(--gnc-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--card-shadow);
}

.btn-share:hover {
  background: rgba(var(--gnc-neon-rgb), 0.15);
  border-color: var(--gnc-neon);
  box-shadow: 0 0 15px rgba(var(--gnc-neon-rgb), 0.4);
  color: var(--gnc-text);
  transform: translateY(-2px);
}

#formSection {
  display: none; 
  margin-top: 0px;
}

.form-container {
  padding: 24px 20px;
  background: var(--gnc-glass);
  backdrop-filter: var(--gnc-blur);
  -webkit-backdrop-filter: var(--gnc-blur);
  border: 1px solid rgba(150, 150, 150, 0.2); 
  border-radius: 16px;
  box-shadow: 0 10px 30px var(--card-shadow), inset 0 0 20px rgba(var(--gnc-neon-rgb), 0.05);
  text-align: left;
}

.field-group { margin-bottom: 16px; }

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gnc-text-muted);
  letter-spacing: 1.5px;
}

input, textarea {
  width: 100%;
  padding: 12px;
  background: var(--gnc-bg-input);
  border: 1px solid rgba(var(--gnc-neon-rgb), 0.25);
  border-radius: 10px;
  color: var(--gnc-text);
  font-family: inherit;
  outline: none;
  transition: 0.3s;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

textarea { 
  min-height: 110px;
  resize: vertical; 
  line-height: 1.5;
}

input:focus, textarea:focus { 
  border-color: var(--gnc-neon); 
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.1), 0 0 10px rgba(var(--gnc-neon-rgb), 0.3);
}

.btn-submit {
  position: relative;
  width: 100%;
  padding: 14px;
  background: rgba(var(--gnc-neon-rgb), 0.15);
  backdrop-filter: var(--gnc-blur);
  border: 1px solid var(--gnc-neon); 
  color: var(--gnc-text);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  margin-top: 5px;
  box-shadow: 0 4px 15px rgba(var(--gnc-neon-rgb), 0.2);
}

.btn-submit:hover {
  background: rgba(var(--gnc-neon-rgb), 0.3);
  box-shadow: 0 0 20px rgba(var(--gnc-neon-rgb), 0.5);
  color: var(--gnc-neon);
  transform: translateY(-2px);
}

.btn-submit.loading { color: transparent; pointer-events: none; }
.btn-submit.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--gnc-neon);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.form-privacy-note {
    font-size: 0.65rem;
    color: var(--gnc-text-muted); 
    text-align: left;
    margin-top: 15px;
    margin-bottom: 0px;
    line-height: 1.3;
}

.btn-back-text {
  margin-top: 15px;
  text-align: center;
  color: var(--gnc-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s;
}

.btn-back-text:hover { color: var(--gnc-neon); }

#success-message { 
  display: none; 
  text-align: center; 
  padding: 20px 10px;
  color: var(--gnc-success);
  font-weight: bold;
}

.ngc-site-credits {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.65rem;
    color: var(--gnc-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.ngc-site-credits span { color: var(--gnc-neon); font-weight: 700; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================
   ADAPTACIÓN PC (ESCRITORIO >= 992px)
   ========================================== */
@media (min-width: 992px) {
  body {
    align-items: center !important; 
    padding: 20px;
  }

  .ecard-container {
    max-width: 900px; 
    display: grid;
    grid-template-columns: 380px 1fr;
    grid-template-rows: auto 1fr; /* Separa el título de los botones en dos filas */
    column-gap: 30px;
    align-items: stretch; 
    text-align: left;
  }

  /* Magia: desintegramos el panel izquierdo para controlar título y botones por separado */
  .ecard-left-panel {
    display: contents; 
  }

  #headerSection { 
    grid-column: 1 / 2;
    grid-row: 1 / 2; /* Fila 1: Arriba a la izquierda */
    display: block !important; 
    margin-bottom: 25px; 
  }

  #mainButtons { 
    grid-column: 1 / 2;
    grid-row: 2 / 3; /* Fila 2: Abajo a la izquierda */
    display: flex !important; 
  }
  
  #formSection { 
    grid-column: 2 / 3;
    grid-row: 2 / 3; /* Fila 2: Comparte la misma fila de los botones, alineándose perfecto */
    display: flex !important; 
    flex-direction: column;
    margin-top: 0;
    height: 100%; 
  }

  .form-container {
      flex: 1; 
      display: flex;
      flex-direction: column;
      height: 100%; 
  }
  
  #consultForm {
      flex: 1;
      display: flex;
      flex-direction: column;
  }

  .textarea-group {
      flex: 1; /* Obliga al cuadro de texto a absorber todo el espacio sobrante */
      display: flex;
      flex-direction: column;
      margin-bottom: 15px; 
  }
  
  .textarea-group textarea {
      flex: 1; 
      resize: none; 
  }

    /* --- FILA INFERIOR DEL FORMULARIO (Texto izq, Botón der) --- */
  .form-action-row {
      display: flex;
      flex-direction: row-reverse; /* El botón pasa a la derecha, el texto a la izquierda */
      align-items: center; /* Centrados verticalmente */
      justify-content: space-between;
      gap: 15px;
  }

  .form-action-row .form-privacy-note {
      margin: 0; /* Quitamos márgenes para que se alinee perfecto con el botón */
      text-align: left;
      line-height: 1.4;
      flex: 1; /* Toma el espacio disponible */
  }

  .btn-submit {
      width: fit-content; 
      padding: 10px 24px; 
      font-size: 0.75rem;
      margin-left: auto; 
      display: block; 
  }

  .form-action-row .btn-submit {
      margin: 0; /* Evita que el margen automático rompa el flexbox */
  }

  .mobile-only {
    display: none !important;
  }

  h1, .subtitle { text-align: left; }
  .share-container { justify-content: flex-start; }

  .form-row {
      display: flex;
      gap: 15px;
  }
  
  .form-row .field-group {
      flex: 1;
      margin-bottom: 16px;
  }
}
