.hero .hero-login-area {
  width: var(--container);
  margin: auto;
  padding: 0 0 72px;
}

.hero .hero-login-grid {
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(260px, 520px);
  gap: 24px;
  align-items: start;
}

.hero .hero-login-card.card {
  padding: 1.25rem;
}

.hero .hero-login-flow-card.card {
  padding: 1.25rem;
}

.hero .hero-login-flow-wide.card {
  padding: 1.25rem;
  margin-top: 18px;
}

.hero .hero-login-flow .flow-title {
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .82rem;
  color: var(--muted);
}

.hero .hero-login-flow .flow-title.flow-title-rules {
  margin-top: 14px;
}

.hero .hero-login-flow ol {
  margin: 0 0 10px;
  padding-left: 1.15rem;
  color: var(--muted);
}

.hero .hero-login-flow li {
  margin: 0 0 6px;
}

.hero .hero-login-flow ul {
  margin: 0 0 10px;
  padding-left: 1.15rem;
  color: var(--muted);
}

.hero .hero-login-flow .flow-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.55;
}

.hero .hero-login-flow-visual {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgb(0 0 0 / 18%);
  padding: 10px;
  margin: 0 0 14px;
}

.hero .hero-login-flow-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: inherit;
}

.hero .hero-login-flow-open:focus-visible {
  outline: 3px solid rgb(55 161 255 / 55%);
  outline-offset: 6px;
  border-radius: 18px;
}

.hero .hero-login-flow-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.hero .hero-login-flow-lightbox[aria-hidden="false"] {
  display: flex;
}

.hero .hero-login-flow-lightbox .lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(6px);
}

.hero .hero-login-flow-lightbox .lb-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 96vw);
  max-height: 92vh;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgb(10 14 20 / 92%);
  box-shadow: 0 20px 80px rgb(0 0 0 / 55%);
  padding: 14px;
}

.hero .hero-login-flow-lightbox .lb-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 10px;
}

.hero .hero-login-flow-lightbox .lb-close {
  cursor: pointer;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgb(255 255 255 / 8%);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 700;
}

.hero .hero-login-flow-lightbox .lb-media {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(92vh - 70px);
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgb(0 0 0 / 18%);
  padding: 10px;
}

@media (max-width: 900px) {
  .hero .hero-login-grid {
    grid-template-columns: 1fr;
  }
}

/* Override default Grav login plugin CSS inside the sectioned hero */
body.template-login.template-sectioned .hero .hero-login-card #grav-login {
  max-width: none;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: left;
}

body.template-login.template-sectioned .hero .hero-login-card #grav-login h1 {
  display: none;
}

body.template-login.template-sectioned .hero .hero-login-card #grav-login hr {
  display: none;
}

body.template-login.template-sectioned .hero .hero-login-card .form-field {
  margin: 0 0 12px;
}

body.template-login.template-sectioned .hero .hero-login-card .form-label {
  margin: 0 0 6px;
}

body.template-login.template-sectioned .hero .hero-login-card .form-label label {
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
}

body.template-login.template-sectioned .hero .hero-login-card input[type="text"],
body.template-login.template-sectioned .hero .hero-login-card input[type="password"] {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgb(0 0 0 / 20%);
  color: var(--text);
  outline: none;
}

body.template-login.template-sectioned .hero .hero-login-card input::placeholder {
  color: rgb(230 238 247 / 55%);
}

body.template-login.template-sectioned .hero .hero-login-card input:focus {
  border-color: rgb(55 161 255 / 65%);
  box-shadow: 0 0 0 3px rgb(55 161 255 / 18%);
}

body.template-login.template-sectioned .hero .hero-login-card .form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

body.template-login.template-sectioned .hero .hero-login-card .rememberme {
  margin-right: auto;
  float: none;
  padding: 0;
}

body.template-login.template-sectioned .hero .hero-login-card .rememberme label {
  color: var(--muted);
}

body.template-login.template-sectioned .hero .hero-login-card .button {
  position: relative;
  display: inline-block;
  padding: 11px 15px;
  border-radius: 14px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

body.template-login.template-sectioned .hero .hero-login-card .button.primary {
  background: linear-gradient(135deg, var(--accent), #3cd0ff);
  color: #001018;
  border-color: transparent;
}

body.template-login.template-sectioned .hero .hero-login-card .button.secondary {
  opacity: .95;
}

body.template-login.template-sectioned .hero .hero-login-card i.fa {
  display: none;
}

/* Logged-in state on /login: show portal menu + last login */
body.template-login.template-sectioned .hero .hero-login-card .portal-menu {
  margin: 0 0 14px;
}

body.template-login.template-sectioned .hero .hero-login-card .portal-menubar {
  display: flex;
  gap: 0;
  align-items: stretch;
  border-radius: 16px;
  overflow: hidden;
  background: rgb(255 255 255 / 4%);
  backdrop-filter: blur(8px);
  border: 1px solid rgb(255 255 255 / 10%);
}

body.template-login.template-sectioned .hero .hero-login-card .portal-menubar .portal-menuitem {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .02em;
  line-height: 1.2;
  border-right: 1px solid rgb(255 255 255 / 8%);
  transition: all .25s ease;
}

body.template-login.template-sectioned .hero .hero-login-card .portal-menubar .portal-menuitem:last-child {
  border-right: 0;
}

body.template-login.template-sectioned .hero .hero-login-card .portal-menubar .portal-menuitem:hover {
  background: rgb(255 255 255 / 12%);
  color: #fff;
}

body.template-login.template-sectioned .hero .hero-login-card .portal-menubar .portal-menuitem.is-active {
  background: linear-gradient(135deg, rgb(55 161 255 / 22%), rgb(60 208 255 / 18%));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(55 161 255 / 30%);
}

body.template-login.template-sectioned .hero .hero-login-card .portal-menubar .portal-menuitem.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12%;
  right: 12%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #3cd0ff);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 8px rgb(55 161 255 / 50%);
}

body.template-login.template-sectioned .hero .hero-login-card .portal-last-login {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .95rem;
}

body.template-login.template-sectioned .hero .hero-login-card .portal-last-login-label {
  font-weight: 700;
}
