/* ==============================
   HEADER PREMIUM / AUTH
============================== */

/* Quita la línea antigua del menú para el estilo premium */
.header-premium .header__menu ul li a:after {
  display: none !important;
}

.header-premium {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.06);
  position: relative;
  z-index: 99;
}

.header-premium .container-fluid {
  padding-left: 28px;
  padding-right: 28px;
}

.header-premium .header__logo {
  padding: 15px 0;
  width: auto;
  min-height: 94px;
  display: flex;
  align-items: center;
}

.header-premium .header__logo a {
  display: inline-flex;
  align-items: center;
}

.header-premium .header__logo img {
  max-height: 66px;
  width: auto;
  transition: transform 0.35s ease, filter 0.35s ease;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.10));
}

.header-premium .header__logo a:hover img {
  transform: scale(1.03);
}

.header-premium .header__menu {
  padding: 0;
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-premium .header__menu ul {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-premium .header__menu ul li {
  margin-right: 0;
}

.header-premium .header__menu ul li a {
  font-size: 13px;
  text-transform: uppercase;
  color: #111111;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  transition: all 0.28s ease;
}

.header-premium .header__menu ul li a:hover,
.header-premium .header__menu ul li.active a {
  color: #ffffff;
  background: linear-gradient(135deg, #111111 0%, #2f2f2f 100%);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.14);
  transform: translateY(-2px);
}

.header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  min-height: 94px;
  padding: 0;
}

.header__right__widget {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header__right__widget li {
  margin: 0;
  position: relative;
}

.header-icon-btn,
.header__right__widget li > span.header-icon-btn,
.header__right__widget li > span.icon_search {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
  color: #111111;
  font-size: 18px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.header__right__widget li a,
.header__right__widget li span {
  color: inherit;
}

.header-icon-btn:hover,
.header__right__widget li > span.icon_search:hover {
  background: linear-gradient(135deg, #ca1515 0%, #ff4d5a 100%);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 16px 26px rgba(202, 21, 21, 0.24);
}

.header__right__widget .tip {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  background: linear-gradient(135deg, #ca1515 0%, #ff5968 100%);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  padding: 0 5px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 14px rgba(202, 21, 21, 0.26);
}

.auth-section {
  display: flex;
  align-items: center;
}

.user-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  padding: 6px 8px 6px 15px;
}

.user-name {
  font-weight: 700;
  color: #111111;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  white-space: nowrap;
}

.user-name i {
  color: #ca1515;
  font-size: 14px;
}

.logout-icon {
  background: linear-gradient(135deg, #ff4b2b, #ff416c);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.28s ease;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

.logout-icon:hover {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  transform: translateY(-2px) rotate(-8deg);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24);
}

.logout-icon i {
  font-size: 18px;
  color: #fff;
}

.btn-login {
  height: 48px;
  padding: 0 22px;
  background: linear-gradient(135deg, #111111, #393939);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: all 0.28s ease;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.14);
}

.btn-login:hover {
  background: linear-gradient(135deg, #e53637, #ff4b2b);
  transform: translateY(-2px);
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.24);
}

/* ==============================
   LOGIN MODAL
============================== */

.login-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 20%),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-modal-content {
  display: flex;
  flex-direction: row;
  width: 980px;
  max-width: 96%;
  min-height: 590px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(8, 8, 8, 0.36);
  background: #fff;
  animation: fadeInModal 0.35s ease;
  z-index: 10001;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: #ffffff;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}

.modal-close:hover {
  background: #ffffff;
  color: #111111;
  transform: rotate(90deg);
}

/* --- Lado izquierdo --- */
.modal-left {
  flex: 1 1 44%;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.48)),
    url("../img/login.jpg") no-repeat center center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 46px 28px;
  text-align: center;
  position: relative;
}

.modal-left::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  top: -70px;
  right: -90px;
  z-index: 0;
}

.modal-left::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at bottom left, rgba(202,21,21,0.28), transparent 30%);
  z-index: 0;
}

.modal-left__content {
  position: relative;
  z-index: 1;
  max-width: 350px;
}

.modal-badge {
  display: inline-block;
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin-bottom: 18px;
}

.modal-left h1,
.modal-left h2,
.modal-left p {
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 18px rgba(0,0,0,0.35);
  margin: 0;
}

.modal-left h1,
.modal-left h2 {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  color: #ffffff;
}

.modal-left p {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.92);
  max-width: 100%;
  margin: 0 auto;
  line-height: 1.9;
}

/* --- Lado derecho --- */
.modal-right {
  flex: 1 1 56%;
  padding: 50px 42px;
  background:
    radial-gradient(circle at top right, rgba(229,54,55,0.06), transparent 22%),
    #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form {
  display: none;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.form.active {
  display: block;
}

.form h2 {
  margin-bottom: 24px;
  font-size: 2rem;
  color: #111111;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.input-group-modern {
  width: 100%;
  display: flex;
  align-items: center;
  border: 1px solid #e7e7e7;
  border-radius: 16px;
  background: #fafafa;
  margin: 12px 0;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.input-group-modern:focus-within {
  border-color: #e53637;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(229,54,55,0.08);
}

.input-group-modern span {
  width: 54px;
  min-width: 54px;
  text-align: center;
  color: #777777;
  font-size: 15px;
}

.modal-right input {
  width: 100%;
  margin: 0;
  padding: 16px 16px 16px 0;
  border: none;
  border-radius: 0;
  font-size: 0.98rem;
  background: transparent;
  color: #111111;
}

.modal-right input:focus {
  outline: none;
  border-color: transparent;
}

.modal-right input::placeholder {
  color: #9a9a9a;
}

.modal-right button[type="submit"] {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #111111, #2e2e2e);
  color: #fff;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 16px;
  transition: all 0.28s ease;
  box-shadow: 0 14px 22px rgba(0,0,0,0.14);
}

.modal-right button[type="submit"]:hover {
  background: linear-gradient(135deg, #e53637, #ff4b2b);
  transform: translateY(-2px);
  box-shadow: 0 18px 28px rgba(229,54,55,0.20);
}

.modal-right .link {
  display: block;
  margin-top: 14px;
  font-size: 0.92rem;
  color: #555555;
  line-height: 1.7;
}

.modal-right .link a {
  color: #e53637;
  text-decoration: none;
  font-weight: 700;
}

.modal-right .link a:hover {
  text-decoration: underline;
  color: #111111;
}

.captcha-wrap {
  margin-top: 14px;
}

.g-recaptcha {
  transform-origin: left top;
}

/* ==============================
   ALERTA LOGIN
============================== */
.login-alert {
  background: linear-gradient(135deg, #fff2d6, #fff8e8);
  color: #946200;
  padding: 13px 16px;
  border: 1px solid #f2d08b;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  margin: 0 auto 18px;
  max-width: 420px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.04);
  display: none;
}

/* ==============================
   ANIMACIONES
============================== */
@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 1199px) {
  .header-premium .container-fluid {
    padding-left: 18px;
    padding-right: 18px;
  }

  .user-name {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 991px) {
  .header-premium .header__logo,
  .header-premium .header__menu,
  .header__right {
    min-height: auto;
  }

  .header-premium .header__logo {
    justify-content: center;
    padding-bottom: 10px;
  }

  .header-premium .header__menu {
    justify-content: center;
    padding: 10px 0 14px;
  }

  .header__right {
    justify-content: center;
    padding-bottom: 18px;
    gap: 16px;
  }

  .login-modal-content {
    flex-direction: column;
    width: 95%;
    min-height: auto;
  }

  .modal-left,
  .modal-right {
    flex: 1 1 100%;
  }

  .modal-left {
    min-height: 240px;
    padding: 40px 22px;
  }

  .modal-right {
    padding: 34px 22px;
  }

  .modal-close {
    top: 14px;
    right: 14px;
    background: rgba(17,17,17,0.35);
  }
}

@media (max-width: 768px) {
  .header__right__widget {
    gap: 10px;
  }

  .header-icon-btn,
  .header__right__widget li > span.icon_search {
    width: 43px;
    height: 43px;
  }

  .btn-login {
    height: 44px;
    padding: 0 18px;
    font-size: 12px;
  }

  .user-logout {
    gap: 10px;
  }

  .user-name {
    font-size: 13px;
    max-width: 130px;
  }

  .logout-icon {
    width: 38px;
    height: 38px;
  }

  .modal-left h1,
  .modal-left h2 {
    font-size: 1.9rem;
  }

  .form h2 {
    font-size: 1.65rem;
  }

  .g-recaptcha {
    transform: scale(0.94);
  }
}

@media (max-width: 575px) {
  .header-premium .header__menu ul {
    gap: 6px;
    justify-content: center;
  }

  .header-premium .header__menu ul li a {
    padding: 10px 14px;
    font-size: 11px;
  }

  .login-modal {
    padding: 12px;
  }

  .modal-left {
    min-height: 210px;
    padding: 34px 18px;
  }

  .modal-right {
    padding: 26px 16px;
  }

  .modal-right button[type="submit"] {
    padding: 14px;
    font-size: 0.9rem;
  }

  .g-recaptcha {
    transform: scale(0.88);
  }
}