/* =====================================================
   RESET
===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
}

img {
  display: block;
  max-width: 100%;
}

/* =====================================================
   ESTRUCTURA GENERAL
===================================================== */
.site-content {
  max-width: 100%;
  margin: 0;
}

.queen-layout {
  width: 100%;
}

/* =====================================================
   SIDEBAR (DESKTOP)
===================================================== */
.queen-sidebar {
  width: 300px;
  background: #c7d8e5; /* Restauramos color original */
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.queen-sidebar-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 56px;
  color: #1f2a33;
}

.queen-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.queen-menu li {
  margin-bottom: 26px;
}

.queen-menu a {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  font-weight: 500;
  color: #1f2a33;
  text-decoration: none;
}

.queen-menu li.active a {
  font-weight: 700;
}

.queen-menu .icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =====================================================
   CONTENIDO PRINCIPAL
===================================================== */
.queen-content {
  flex: 1;
  padding: 28px 72px 48px;
}

.queen-home {
  max-width: 1180px;
}

/* =====================================================
   HERO EDITORIAL
===================================================== */
.queen-hero,
.queen-header {
  margin-bottom: 20px;
}

.queen-hero--editorial {
  display: flex;
  align-items: center;
  gap: 48px;
}

.queen-avatar img {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  object-fit: cover;
}

.queen-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.queen-info>* {
  margin: 0;
}

.king-name, .queen-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  margin-bottom: 10px;
}

.queen-id {
  font-weight: 400;
  color: #6b6b6b;
}

.queen-verified {
  width: 26px;
  height: 26px;
  position: relative;
  top: 1px;
}

.queen-meta {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 14px;
}

.queen-bio {
  font-size: 18px;
  line-height: 1.55;
  max-width: 520px;
  margin-bottom: 12px;
}

.queen-level {
  font-size: 18px;
  font-weight: 600;
}

.queen-actions {
  margin-left: auto;
  align-self: center;
}

.btn-primary {
  background: #5569a6;
  color: #fff;
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

/* =====================================================
   GALERÍA
===================================================== */
.queen-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-item img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* =====================================================
   BLOQUE INFERIOR
===================================================== */
.queen-details {
  /*background: linear-gradient(180deg, #2a2a2a, #1c1c1c);*/
  /*color: #e6e6e6;*/
  padding: 20px 24px 22px;
  font-size: 13px;
  line-height: 1.55;
}

.queen-details strong {
  display: block;
  margin-top: .5em;
  font-weight: 500;
  /*color: #fff;*/
}

/* =====================================================
   BOTÓN HAMBURGUESA (MOBILE)
===================================================== */
.menu-toggle {
  display: none;
}

/* =====================================================
   MOBILE
===================================================== */
@media (max-width: 768px) {

  /* Layout */
  .queen-layout {
    display: block;
  }

  .queen-content {
    padding: 20px;
  }

  /* Hamburger */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 999999999;
    order: 0;
    margin-right: 15px;
  }

  .menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  body.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  body.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Sidebar MOBILE (NO ocupa layout) */
  .queen-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 280px !important;
    height: 100vh !important;
    padding: 100px 32px 48px !important;
    background: #c7d8e5 !important;
    z-index: 100000001 !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2) !important;
  }

  body.menu-open .queen-sidebar {
    transform: translateX(0) !important;
  }

  /* Overlay */
  body.menu-open::after {
    content: '' !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 100000000 !important;
    pointer-events: auto !important;
  }

  body.menu-open {
    overflow: hidden !important;
  }

  .queen-menu {
    width: 100% !important;
    display: block !important;
  }

  .queen-menu li {
    margin-bottom: 25px !important;
    display: block !important;
  }

  .queen-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    color: #1f2a33 !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    text-decoration: none !important;
  }

  .queen-menu .icon {
    width: 24px !important;
    height: 24px !important;
  }

  /* Hero mobile */
  .queen-hero--editorial {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    margin-bottom: 10px;
  }

  .queen-avatar img {
    width: 180px;
    height: 180px;
  }

  .queen-name {
    font-size: 28px;
    white-space: normal;
    justify-content: center;
  }

  .queen-meta {
    font-size: 16px;
  }

  .queen-bio {
    font-size: 16px;
    max-width: 100%;
  }

  .queen-level {
    font-size: 16px;
  }

  .queen-actions {
    width: 100%;
    margin-left: 0;
  }

  .btn-primary {
    width: 100%;
    /*padding: 14px 0;*/
    font-size: 15px;
  }

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

  .gallery-item img {
    height: 260px;
  }
}

/* =====================================================
   DESKTOP
===================================================== */
@media (min-width: 769px) {
  .queen-layout {
    display: flex;
  }
}

/* =====================================================
   TABLET (iPad / Tablets horizontales y verticales)
===================================================== */
@media (min-width: 769px) and (max-width: 1024px) {

  /* Layout más compacto */
  .queen-content {
    padding: 24px 32px;
  }

  /* HERO: sigue horizontal pero más apretado */
  .queen-hero--editorial {
    gap: 24px;
  }

  /* Avatar más pequeño (CLAVE) */
  .queen-avatar img {
    width: 180px;
    height: 180px;
  }

  .queen-avatar {
    width: 180px;
  }

  /* Texto un poco más compacto */
  .queen-name {
    font-size: 30px;
  }

  .queen-meta,
  .queen-bio,
  .queen-level {
    font-size: 16px;
  }

  .queen-bio {
    max-width: 420px;
  }

  /* CTA no empuja layout */
  .queen-actions {
    margin-left: 24px;
  }

  /* Galería más baja */
  .gallery-item img {
    height: 320px;
  }
}

/* =====================================================
   FIX DEFINITIVO AVATAR (ANTI-ÓVALO)
===================================================== */
.queen-avatar {
  width: 230px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.queen-avatar img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
}

/* =====================================================
   HERO EDITORIAL — LAYOUT CORRECTO
===================================================== */
@media (min-width: 769px) {
  .queen-hero--editorial .queen-actions {
    width: 260px;
    align-self: center;
    margin-left: auto;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .queen-hero--editorial .queen-actions {
    width: 100%;
    margin-left: 0;
    align-self: stretch;
  }

  .queen-hero--editorial .btn-primary {
    width: 100%;
  }
}

/* =====================================================
   GALERIA MOBILE
===================================================== */

@media (max-width: 768px) {

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

  .gallery-item img {
    height: auto;
    aspect-ratio: 2 / 4;
  }

}


/* FIX BOTÓN EDITAR PERFIL EN MOBILE */
@media (max-width: 768px) {

  .queen-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 14px;
  }

  .queen-actions .btn-primary {
    width: 100%;
    max-width: 280px;
    text-align: center;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 8px;
  }

}

.gallery-item {
  /*background: #f1f5f9;*/
  /*border-radius: 8px;*/
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}


.queen-delete-img {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: #dc2626;
  font-weight: 600;
  text-decoration: none;
}

.queen-delete-img:hover {
  text-decoration: underline;
}

/*************popup gallery*/
/* ===============================
   ALERTAS QUEEN
================================ */

.queen-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  margin: 20px 0;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
  animation: slideDown .25s ease-out;
}

.queen-alert-error {
  background: #fee2e2;
  color: #7f1d1d;
  border-left: 6px solid #dc2626;
}

.queen-alert-icon {
  font-size: 20px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/******************************************/

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*****************************************/
/* galeria* preview/
/*****************************************/
.queen-gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.preview-item {
  position: relative;
}

.preview-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.preview-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 6px;
}

/* ===== BLOQUE TEXTO PEGADO A GALERÍA ===== */

.queen-details-home,
.queen-about {
  background: #0f172a;
  /* azul oscuro elegante */
  margin: 0;
  /* SIN espacios */
  padding: 16px 20px;
  /* compacto */
  border-radius: 0;
  /* SIN radios */
  color: #ffffff;
  /* texto blanco */
}

/* eliminar cualquier separación previa */
.queen-gallery+.queen-details,
.queen-gallery+.queen-about {
  margin-top: 0;
}

/* texto descripción */
.queen-details-home p,
.queen-about p {
  color: #ffffff;
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

/* título "Mis intereses" */
.queen-details h3 {
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #e5e7eb;
}

/* intereses */
.queen-details p:last-child {
  color: #f1f5f9;
  font-size: 13.5px;
}


/* =============================
   FIX HEADER PERFIL QUEEN
============================= */

.queen-profile-header {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.queen-profile-header .queen-avatar {
  justify-self: start;
}

.queen-profile-header .queen-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 32px;
}

.queen-profile-header .queen-actions {
  justify-self: end;
}

/* MOBILE */
@media (max-width: 768px) {
  .queen-profile-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .queen-profile-header .queen-actions {
    justify-self: center;
    margin-top: 12px;
  }
}

/* ===============================
   QUEEN DETAILS – BLOQUE OSCURO
=============================== */

.queen-details-black {
  background-color: #202026;
  /* 🔥 tono exacto */
  color: #ffffff;
  padding: 18px 22px;
  margin: 0;
  border-radius: 0;
}



/* texto */
.queen-details-black p {
  margin: 0;
  color: #ffffff;
}

/* intereses */
.queen-details-black strong {
  color: #e5e7eb;
  font-weight: 600;
}

/* separador sutil interno */
.queen-interests {
  opacity: 0.9;
}

/* ===============================
   ADMIN PAGE (ALINEADO AL LAYOUT)
=============================== */

.admin-page {
  padding: 5px 5px;
}

.admin-queen-list {
  background: transparent;
}

/* ===============================
   TABLE – LISTADO LIMPIO
=============================== */

.queens-table {
  width: 100%;
  font-size: 14px;
  background: #fff;
  border-radius: 8px;
  border-collapse: collapse;
}

.queens-table thead th {
  background: #f5f6f8;
  font-weight: 700;
  color: #374151;
  padding: 14px 16px;
  border-bottom: 2px solid #e5e7eb;
}

.queens-table td {
  padding: 14px 16px;
  line-height: 1.4;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.queens-table td:nth-child(3) {
  max-width: 360px;
}

.queens-table td:last-child {
  white-space: nowrap;
}

/* ===============================
   ACTION BUTTONS
=============================== */

.btn-admin {
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-save {
  background: #4f6fad;
  color: #fff;
}

.btn-save:hover {
  background: #3f5e96;
}

.btn-view {
  background: #e5e7eb;
  color: #111;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-view:hover {
  background: #d1d5db;
}

/* ===============================
   STATUS BADGES (ÚNICA DEFINICIÓN)
=============================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-warning {
  background: #fef9c3;
  color: #854d0e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}



.admin-header-left {
  flex: 0 0 auto;
}

/* ===============================
   ACTION BUTTONS – QUEENS LIST
   (CLASES REALES)
=============================== */

.queens-table .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all .2s ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .15);
}

/* ===== GUARDAR ===== */
.queens-table .btn-primary {
  background: linear-gradient(180deg, #5b72c4, #4f6fad);
  color: #fff;
  border: none;
}

.queens-table .btn-primary:hover {
  background: linear-gradient(180deg, #4f6fad, #3f5e96);
  transform: translateY(-1px);
}

/* ===== VER ===== */
.queens-table .btn-secondary {
  background: #eef2f7;
  color: #1f2a33;
  border: none;
}

.queens-table .btn-secondary:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

/* separación entre botones */
.queens-table .btn+.btn {
  margin-left: 6px;
}

/* mobile */
@media (max-width: 768px) {
  .queens-table .btn {
    height: 38px;
    font-size: 14px;
    padding: 0 18px;
  }
}

/* ===============================
   BOTÓN VER – MÁS FUERTE
=============================== */

.queens-table .btn-secondary {
  background: linear-gradient(180deg, #4b4b4b, #8a8a8a);
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.queens-table .btn-secondary:hover {
  background: linear-gradient(180deg, #4b4b4b, #8f8f8f);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
}

/* foco accesible */
.queens-table .btn-secondary:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}


.admin-header {
  background: linear-gradient(90deg, #0b0f1a, #111827);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.4px;
}

.btn-logout {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.18);
}

.King-alert-text {
  color: #ff0000;
}