/* Mathla Services — Option B Warm Gold */
.services-body {
  --svc-gold: #D4AF37;
  --svc-ink: #1a1a1a;
  --svc-muted: #5c5c5c;
  --svc-bg: #faf8f3;
  --svc-card: #ffffff;
  background: var(--svc-bg);
  color: var(--svc-ink);
  font-family: "Zain", "Segoe UI", sans-serif;
  font-size: 1.125rem;
}
.services-header {
  background: #111;
  color: #fff;
  border-bottom: 3px solid var(--svc-gold);
}
.services-header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
.services-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; }
.services-brand img,
.services-brand-logo {
  height: 2.85rem;
  max-height: 2.85rem;
  width: auto;
}
.services-brand-title { font-family: Cinzel, serif; letter-spacing: 0.06em; font-size: 1.15rem; }
.services-brand-sub { display: block; font-size: 0.75rem; color: var(--svc-gold); }
.services-nav { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 1.05rem; }
.services-nav a { color: #eee; text-decoration: none; }
.services-nav a[aria-current="page"] { color: var(--svc-gold); }
.services-header-actions {
  margin-inline-start: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}
.services-header-actions .mathla-locale-switcher {
  display: flex !important;
  position: relative !important;
}
.services-header-actions .mathla-locale-dropdown {
  left: 0 !important;
  right: auto !important;
  max-width: calc(100vw - 1.5rem) !important;
}
.services-header-actions .mathla-header-signin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.4rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #eee;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.services-header-actions .mathla-header-signin-link:hover {
  color: var(--svc-gold);
  background: rgba(255, 255, 255, 0.06);
}
.services-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  background: var(--svc-gold);
  color: #111;
  padding: 0.45rem 0.95rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.services-btn:hover {
  background: #e5be3b;
  color: #000;
}
.services-user {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ddd;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}
.services-header-actions button[wire\:click="logout"],
.services-header-actions .sidebar-link {
  width: auto !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  padding: 0.35rem 0.65rem !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: background-color 0.15s ease, border-color 0.15s ease !important;
}
.services-header-actions button[wire\:click="logout"]:hover,
.services-header-actions .sidebar-link:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #fff !important;
}
.services-main { max-width: 80rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; width: 100%; }
.services-hero h1 { font-family: Cinzel, serif; font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 0.5rem; }
.services-hero p { color: var(--svc-muted); max-width: 42rem; }
.services-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 1.5rem; }
.services-card {
  background: var(--svc-card);
  border: 1px solid #e6e0d4;
  border-radius: 8px;
  padding: 1.1rem;
  text-decoration: none;
  color: inherit;
  display: block;
}
.services-card h3 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.services-card p { margin: 0; color: var(--svc-muted); font-size: 1rem; }
.services-card.gated { opacity: 0.72; }
.services-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}
@media (max-width: 640px) {
  .services-form-grid { grid-template-columns: 1fr; }
}
.services-form-grid > .full-width { grid-column: 1 / -1; }
.services-form label { display: block; margin-top: 0.85rem; font-weight: 600; font-size: 1rem; }
.services-form input, .services-form select, .services-form textarea {
  width: 100%; margin-top: 0.35rem; padding: 0.55rem 0.65rem;
  border: 1px solid #d0c8b8; border-radius: 6px; background: #fff;
}
.services-form button[type="submit"] {
  margin-top: 1.25rem; background: var(--svc-gold); border: 0; padding: 0.65rem 1.2rem;
  border-radius: 6px; font-weight: 700; cursor: pointer;
}
.services-table { width: 100%; border-collapse: collapse; background: #fff; }
.services-table th, .services-table td { border-bottom: 1px solid #eee; padding: 0.65rem; text-align: start; font-size: 1rem; }
.services-flash { background: #e8f5e9; border: 1px solid #a5d6a7; padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.services-footer { text-align: center; padding: 1.5rem; color: var(--svc-muted); font-size: 0.95rem; border-top: 1px solid #e6e0d4; }
.services-badge { display: inline-block; background: #111; color: var(--svc-gold); font-size: 0.8rem; padding: 0.15rem 0.45rem; border-radius: 3px; }
.services-user { font-size: 0.85rem; opacity: 0.85; }
@media (max-width: 720px) {
  .services-nav { width: 100%; }
}

@media (max-width: 480px) {
  .services-header-inner {
    padding: 0.5rem 0.75rem !important;
    gap: 0.5rem;
  }
  .services-brand-title {
    font-size: 0.95rem;
  }
  .services-brand-sub {
    font-size: 0.675rem;
  }
  .services-nav {
    gap: 0.4rem 0.6rem;
    font-size: 0.875rem;
  }
  .services-header-actions {
    gap: 0.35rem;
    max-width: 100%;
  }
  .services-btn {
    min-height: 32px;
    padding: 0.3rem 0.55rem;
    font-size: 0.8rem;
  }
  .services-header-actions .mathla-header-signin-link {
    min-height: 32px;
    padding: 0.3rem 0.45rem;
    font-size: 0.8rem;
  }
  .services-user {
    max-width: 7.5rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
  }
}

@media (max-width: 1024px) {
  .services-header-inner,
  .services-main,
  #main-content.services-main,
  .services-footer {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    box-sizing: border-box !important;
  }
}

/* Large screen typography scale for B2B Services surface */
@media (min-width: 1024px) {
  .services-body {
    font-size: 1.25rem;
  }
  .services-brand img,
  .services-brand-logo {
    height: 4.25rem !important;
    max-height: 4.25rem !important;
    width: auto !important;
  }
  .services-brand-title {
    font-size: 1.55rem;
  }
  .services-brand-sub {
    font-size: 0.88rem;
  }
  .services-nav {
    font-size: 1.15rem;
    gap: 1.35rem;
  }
  .services-header-actions {
    gap: 0.85rem;
  }
  .services-header-actions .mathla-header-signin-link {
    font-size: 1rem;
    min-height: 42px;
    padding: 0.45rem 0.85rem;
  }
  .services-btn {
    font-size: 1rem;
    min-height: 42px;
    padding: 0.5rem 1.1rem;
  }
  .services-user {
    font-size: 0.925rem;
    padding: 0.3rem 0.65rem;
  }
  .services-hero h1 {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
  }
  .services-hero p {
    font-size: 1.2rem;
    line-height: 1.6;
  }
  .services-card {
    padding: 1.35rem;
  }
  .services-card h3 {
    font-size: 1.35rem;
  }
  .services-card p {
    font-size: 1.1rem;
  }
  .services-form label {
    font-size: 1.1rem;
  }
  .services-form input,
  .services-form select,
  .services-form textarea {
    font-size: 1.05rem;
    padding: 0.65rem 0.8rem;
  }
  .services-form button[type="submit"] {
    font-size: 1.05rem;
    padding: 0.75rem 1.4rem;
  }
  .services-table th,
  .services-table td {
    font-size: 1.1rem;
    padding: 0.85rem 1rem;
  }
  .services-badge {
    font-size: 0.875rem;
    padding: 0.2rem 0.6rem;
  }
}

