/* =====================================================================
   SkyPulse -- estilos de mi-cuenta
   ===================================================================== */

/* =====================================================================
   SkyPulse — Hoja de estilos general
   =====================================================================
   Índice:
     1.  Reset y base
     2.  Formularios (login / registro)
     3.  Dashboard / navbar
     4.  Secciones de página (scroll suave)
     5.  Hero (dashboard)
     6.  Search card
     7.  Ofertas y descuentos
     8.  Encabezados de sección compartidos
     9.  Destinos populares
     10. La experiencia SkyPulse
     11. Mi cuenta
     12. Fondo naturaleza (login / registro)
     13. Tarjeta de vuelo base (resultados)
     14. Panel de administrador
     15. Footer
     16. Resultados de búsqueda
     20. Completa tu viaje (inicio)
     21. Página de Hoteles
     22. Botón "fancy" (Volver al inicio, hoteles)
   ===================================================================== */

/* ===== 1. Reset y base ===== */

:root {
  /* Colores de marca */
  --color-primary: #2E6DA4;
  --color-accent-blue: #2563EB;
  --color-sky: #C9DFF2;
  --color-light-blue: #6FA8DC;
  --color-muted-blue: #9FB4CC;

  /* Texto */
  --color-text: #222;
  --color-text-dark: #22303D;
  --color-text-muted: #5B6B78;

  /* Neutros */
  --color-white: #fff;
  --color-black: #000;
  --color-border: #E2E5E9;

  /* Estado */
  --color-success: #1D8A6C;
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  scroll-padding-top: 76px;
}

body {
  font-family: 'Poppins', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #F7EBCB 0%, var(--color-sky) 100%);
  color: var(--color-text);
  min-height: 100vh;
  position: relative;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 40px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

header .logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-accent-blue);
  color: var(--color-white);
}
.btn-primary:hover {
  background: #1D4ED8;
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent-blue);
  border: 1px solid var(--color-accent-blue);
}
.btn-secondary:hover {
  background: #EFF4FF;
}

/* ===== 2. Formularios (login / registro) ===== */
.form-wrap {
  max-width: 380px;
  margin: 60px auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px;
  position: relative;
  z-index: 1;
}

.form-wrap h1 {
  font-size: 22px;
  margin-bottom: 6px;
}

.form-wrap p.sub {
  color: #666;
  font-size: 13px;
  margin-bottom: 20px;
}

@keyframes email-particle-float {
  0% {
    transform: translate(0, 0) scale(0.8);
    opacity: 0;
    background: var(--color-accent-blue);
  }
  20% {
    opacity: 0.7;
  }
  100% {
    transform: translate(120px, -18px) scale(1.1);
    opacity: 0;
    background: var(--color-light-blue);
  }
}

@keyframes name-particle-float {
  0% {
    transform: translate(0, 0) scale(0.8);
    opacity: 0;
    background: var(--color-accent-blue);
  }
  20% {
    opacity: 0.7;
  }
  100% {
    transform: translate(120px, -18px) scale(1.1);
    opacity: 0;
    background: var(--color-light-blue);
  }
}

@keyframes pw-rotate {
  100% {
    transform: translate(-50%, -50%) rotate(450deg);
  }
}

.form-wrap .btn {
  width: 100%;
  padding: 12px;
  margin-top: 4px;
}

.switch-link {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #666;
}
.switch-link a {
  color: var(--color-accent-blue);
  text-decoration: none;
}
.switch-link a:hover {
  text-decoration: underline;
}

/* ===== 5. Hero (dashboard) ===== */

main {
  position: relative;
  z-index: 1;
}

/* ===== 11. Mi cuenta ===== */

.account-page {
  background-image: url('../imagenes/mi-cuenta/mi-cuenta.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* From Uiverse.io by AKAspidey01 — adaptado a azul marino */
.back-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 44px;
  border-radius: 14px;
  background: var(--color-white);
  overflow: hidden;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text-dark);
}
.back-button .back-button-icon {
  position: absolute;
  left: 4px;
  top: 4px;
  bottom: 4px;
  width: 25%;
  border-radius: 10px;
  background: #1f387e;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: width 0.5s ease;
}
.back-button:hover .back-button-icon {
  width: calc(100% - 8px);
}
.back-button .back-button-text {
  position: relative;
  z-index: 0;
  margin-left: 26px;
}

.account-page header {
  background: rgba(255, 255, 255, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.account-wrap {
  max-width: 720px;
  margin: 60px auto;
  padding: 0 20px 60px;
}

.account-header {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 24px 28px;
  margin-bottom: 24px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 32px rgba(31, 56, 126, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.account-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent-blue);
  color: var(--color-white);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-header h1 {
  font-size: 20px;
  margin-bottom: 2px;
}

.account-header .sub {
  margin-bottom: 0;
}

.account-badges {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.account-badges .badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-dark);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.account-logout {
  margin-left: auto;
}

/* From Uiverse.io by vinodjangid07 — adaptado a los colores de SkyPulse */
.Btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition-duration: .3s;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.199);
  background-color: #1f387e;
}
.Btn .sign {
  width: 100%;
  transition-duration: .3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.Btn .sign svg {
  width: 17px;
}
.Btn .sign svg path {
  fill: white;
}
.Btn .text {
  position: absolute;
  right: 0%;
  width: 0%;
  opacity: 0;
  color: white;
  font-size: 1em;
  font-weight: 600;
  white-space: nowrap;
  transition-duration: .3s;
}
.Btn:hover {
  width: 160px;
  border-radius: 40px;
  background-color: #16294f;
  transition-duration: .3s;
}
.Btn:hover .sign {
  width: 30%;
  transition-duration: .3s;
  padding-left: 20px;
}
.Btn:hover .text {
  opacity: 1;
  width: 70%;
  transition-duration: .3s;
  padding-right: 10px;
}
.Btn:active {
  transform: translate(2px, 2px);
}

.account-section {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 24px 28px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 32px rgba(31, 56, 126, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.account-section h2 {
  font-size: 16px;
  margin-bottom: 16px;
}

.flights-empty .btn {
  display: inline-block;
}

.account-search-cta {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* From Uiverse.io by ryota1231 */
.animated-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px 36px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 16px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 100px;
  font-weight: 600;
  color: #1f387e;
  box-shadow: 0 8px 32px rgba(31, 56, 126, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.animated-button svg {
  position: absolute;
  width: 24px;
  fill: #1f387e;
  z-index: 9;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.animated-button .arr-1 {
  right: 16px;
}
.animated-button .arr-2 {
  left: -25%;
}
.animated-button .circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background-color: #1f387e;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.animated-button .text {
  position: relative;
  z-index: 1;
  transform: translateX(-12px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.animated-button:hover {
  box-shadow: 0 0 0 12px transparent;
  color: #ffffff;
  border-radius: 12px;
}
.animated-button:hover .arr-1 {
  right: -25%;
}
.animated-button:hover .arr-2 {
  left: 16px;
}
.animated-button:hover .text {
  transform: translateX(12px);
}
.animated-button:hover svg {
  fill: #ffffff;
}
.animated-button:active {
  scale: 0.95;
  box-shadow: 0 0 0 4px #16294f;
}
.animated-button:hover .circle {
  width: 220px;
  height: 220px;
  opacity: 1;
}

@media (max-width: 560px) {
  .account-header {
    flex-wrap: wrap;
  }
  .account-logout {
    margin-left: 0;
  }
}

/* =====================================================================
   Responsive extra — Mi cuenta (celular a TV)
   ===================================================================== */

/* ---------- Header: nunca se desborda ni aplasta el botón "Volver" ---------- */
@media (max-width: 640px) {
  header {
    padding: 14px 20px;
  }
  header .logo {
    font-size: 16px;
  }
  .back-button {
    width: auto;
    padding: 0 14px 0 34px;
    height: 40px;
    font-size: 13px;
  }
  .back-button .back-button-icon {
    width: 30px;
    height: 30px;
    top: 5px;
    bottom: auto;
    left: 4px;
  }
  .back-button:hover .back-button-icon {
    width: 30px;
  }
  .back-button .back-button-text {
    margin-left: 0;
  }
}

/* ---------- Celulares pequeños: solo el ícono en el botón "Volver" ---------- */
@media (max-width: 400px) {
  header {
    padding: 12px 16px;
  }
  .back-button {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: #1f387e;
  }
  .back-button .back-button-icon {
    position: static;
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 50%;
  }
  .back-button .back-button-text {
    display: none;
  }

  .account-wrap {
    margin: 32px auto;
    padding: 0 14px 40px;
  }
  .account-header,
  .account-section {
    padding: 18px 18px;
    border-radius: 16px;
  }
  .account-avatar {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }
  .account-header h1 {
    font-size: 17px;
  }
  .animated-button {
    padding: 13px 26px;
    font-size: 14px;
  }
}

/* ---------- Fondo fijo: se desactiva en móvil (jank/errores de render en iOS y Android) ---------- */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .account-page {
    background-attachment: scroll;
  }
}

/* ---------- Pantallas grandes de escritorio y TV (≥ 1600px) ---------- */
@media (min-width: 1600px) {
  .account-wrap {
    max-width: 860px;
    margin: 90px auto;
  }
  header {
    padding: 26px 60px;
  }
  header .logo {
    font-size: 21px;
  }
  .account-header h1 {
    font-size: 24px;
  }
  .account-avatar {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }
  .account-section h2 {
    font-size: 18px;
  }
  .animated-button {
    padding: 18px 42px;
    font-size: 17px;
  }
}

/* ---------- Pantallas muy grandes: TV 4K y ultrawide (≥ 2200px) ---------- */
@media (min-width: 2200px) {
  html {
    font-size: 19px;
  }
  .account-wrap {
    max-width: 980px;
  }
}

/* ---------- Dispositivos táctiles: el botón de cerrar sesión se ve sin pasar el mouse ---------- */
@media (hover: none) and (pointer: coarse) {
  .Btn {
    width: 130px;
    border-radius: 40px;
    justify-content: flex-start;
  }
  .Btn .sign {
    width: 30%;
    padding-left: 16px;
  }
  .Btn .text {
    opacity: 1;
    width: 70%;
    position: relative;
    padding-right: 8px;
  }
}

.auth-page header .logo {
  color: var(--color-white);
}

.auth-page .form-wrap {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  border: none;
}

.t-stub .btn {
  width: 100%;
  font-size: 1.15em;
  padding: 0.75em 1.2em;
}
input[id$="-economy"]:checked + label {
  color: white;
}
input[id$="-premium"]:checked + label {
  color: white;
}
input[id$="-business"]:checked + label {
  color: white;
}

.rh-card-actions .btn {
  padding: 8px 14px;
  font-size: 12.5px;
  white-space: nowrap;
}