/* Portal visual tokens aligned with Club Agelai elite brand. */
:root {
  --bg: #131313;
  --bg-soft: #1a1a1a;
  --line: rgba(255, 255, 255, 0.1);
  --text: #e8e6e5;
  --muted: #d8b8b2;
  --red: #e30613;
  --yellow: #ffe16d;
}

/* Base reset for stable rendering. */
* {
  box-sizing: border-box;
}

/* Page background and typography baseline. */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hanken Grotesk", "Segoe UI", sans-serif;
}

/* Off-canvas driver checkbox. */
.menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Backdrop while sidebar is open. */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 170ms ease;
}

/* Mobile/tablet lateral slider menu. */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  width: min(84vw, 320px);
  transform: translateX(-106%);
  transition: transform 180ms ease;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #111214, #0f1012);
  padding: 1rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
}

/* Sidebar top row. */
.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Sidebar logo dimensions. */
.sidebar-logo {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Sidebar close control. */
.sidebar-close {
  cursor: pointer;
  font-size: 1.2rem;
}

/* Sidebar nav links stack. */
.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 0.48rem;
}

/* Sidebar link style. */
.sidebar-nav a {
  color: #fff;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
}

/* Sidebar link hover. */
.sidebar-nav a:hover {
  border-color: rgba(227, 6, 19, 0.55);
  background: rgba(227, 6, 19, 0.12);
}

/* Sidebar social links row. */
.sidebar-social {
  display: flex;
  gap: 0.55rem;
}

/* Sidebar language selector wrapper. */
.lang-switch {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

/* Sidebar language label. */
.lang-switch label {
  color: #d9d7d6;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Shared language select style. */
.lang-select {
  min-width: 92px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(16, 17, 20, 0.9);
  background-image: var(--flag-url);
  background-repeat: no-repeat;
  background-position: left 0.5rem center;
  background-size: 20px 14px;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0 2rem 0 2rem;
  appearance: none;
  -webkit-appearance: none;
}

.lang-select:focus {
  outline: 2px solid rgba(227, 6, 19, 0.6);
  outline-offset: 1px;
}

.lang-select-top {
  margin-right: 0.25rem;
}

.lang-dropdown {
  position: relative;
}

.lang-dropdown .lang-select {
  display: none;
}

.lang-current {
  min-width: 112px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(16, 17, 20, 0.92);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0 0.62rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.lang-dropdown.is-sidebar .lang-current {
  width: 100%;
  justify-content: flex-start;
}

.lang-current-flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  object-fit: cover;
}

.lang-caret {
  margin-left: auto;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  background: rgba(20, 21, 24, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  z-index: 120;
}

.lang-menu-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.56rem 0.62rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-align: left;
}

.lang-menu-item:last-child {
  border-bottom: 0;
}

.lang-menu-item:hover {
  background: rgba(65, 101, 194, 0.9);
}

.lang-menu-item img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  object-fit: cover;
}

/* Shared social icon button. */
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Social icon SVG sizing. */
.social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Brand color hover for Instagram. */
.social-icon.ig:hover {
  color: #e1306c;
  border-color: #e1306c;
}

/* Brand color hover for Facebook. */
.social-icon.fb:hover {
  color: #1877f2;
  border-color: #1877f2;
}

/* Top navigation bar. */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 82px;
  padding: 0 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(14px);
}

/* Header brand lockup. */
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: "Montserrat", sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

/* Hamburger appears in responsive mode. */
.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.2rem;
}

/* Header logo dimensions. */
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 9px;
}

/* Desktop nav arrangement. */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* Desktop nav links. */
.desktop-nav a {
  text-decoration: none;
  color: #edbfba;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

/* Desktop hover style. */
.desktop-nav a:hover {
  color: #fff;
}

/* Top-right actions wrapper in portal header. */
.top-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: max-content;
}

/* Login button style. */
.login-btn {
  text-decoration: none;
  background: linear-gradient(135deg, var(--red), #9b000a);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  white-space: nowrap;
  min-width: 172px;
  text-align: center;
  padding: 0.72rem 1.2rem;
}

/* Main container with top offset. */
.portal-main {
  width: min(1600px, 95vw);
  margin: 0 auto;
  padding: 125px 0 85px;
}

/* Heading zone. */
.hero h1 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 6.7rem);
  letter-spacing: -0.03em;
}

/* Accent in heading text. */
.hero h1 span {
  color: var(--red);
}

.hero h1 span.plain {
  color: inherit;
}

/* Heading decorative red line. */
.line {
  width: 120px;
  height: 10px;
  background: var(--red);
  margin-top: 1rem;
}

/* Portal bento-like service grid. */
.portal-grid {
  margin-top: 4.4rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 320px;
}

/* Base service card style. */
.service-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: var(--bg-soft);
}

/* Gym card occupies more space like the reference portal. */
.service-gym {
  grid-column: span 2;
  grid-row: span 2;
  text-decoration: none;
}

/* Card image baseline. */
.service-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: transform 500ms ease, filter 500ms ease;
}

/* Dark readability overlay for card text. */
.service-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.83));
}

/* Card text container near bottom. */
.service-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem;
}

/* Service title style. */
.service-content h2 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(1.6rem, 3.7vw, 3rem);
  text-transform: uppercase;
}

/* Card paragraph style. */
.service-content p {
  margin: 0.65rem 0;
  max-width: 90%;
  color: #e2c8c3;
  font-size: 1.07rem;
}

/* Gym badge. */
.badge {
  display: inline-block;
  margin-bottom: 0.55rem;
  background: var(--red);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.38rem 0.65rem;
}

/* Gym action hint. */
.service-content strong {
  color: #f0cbc6;
  font-family: "Montserrat", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
}

/* Hover response for active gym card. */
.service-gym:hover img {
  transform: scale(1.07);
  filter: grayscale(0%);
}

/* Overlays for future services. */
.coming-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 220ms ease;
}

/* Hover text for "coming soon" services. */
.coming-overlay p {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--yellow);
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 1.18rem;
}

/* Secondary message in overlay. */
.coming-overlay small {
  color: #fff;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.92rem;
}

/* Trigger transition on hover. */
.coming:hover .coming-overlay {
  opacity: 1;
}

/* Also slightly animate base media for inactive cards. */
.coming:hover img {
  transform: scale(1.05);
}

/* Footer area. */
.portal-footer {
  border-top: 1px solid var(--line);
  width: min(1600px, 95vw);
  margin: 0 auto;
  padding: 2.2rem 0 2.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Footer title. */
.portal-footer h3 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-style: italic;
  font-size: 2rem;
}

/* Footer paragraph. */
.portal-footer p {
  margin: 0.7rem 0 0;
  max-width: 460px;
  color: #d8b8b2;
  font-size: 0.98rem;
}

/* Footer link group. */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

/* Footer links style. */
.footer-links a {
  color: #eac1bc;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

/* Footer link hover style. */
.footer-links a:hover {
  color: #fff;
}

/* Responsive rules for tablet and below. */
@media (max-width: 1200px) {
  .portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 290px;
  }

  .service-gym {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 360px;
  }
}

/* Mobile and tablet with lateral slider menu. */
@media (max-width: 900px) {
  .hamburger {
    display: inline-flex;
  }

  .desktop-nav {
    display: none;
  }

  .top-actions .social-icon {
    display: none;
  }

  .lang-dropdown.is-top {
    display: none;
  }

  .menu-toggle:checked ~ .sidebar {
    transform: translateX(0);
  }

  .menu-toggle:checked ~ .overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .portal-main {
    padding-top: 102px;
  }

  .portal-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
  }

  .service-gym {
    grid-column: auto;
    min-height: 320px;
  }
}
