/* ===== FOOTER - soft green ===== */
.site-footer {
  background: linear-gradient(180deg, #15803D 0%, #0F3D2E 100%);
  color: #D5EAE0; padding: var(--space-8) 0 0;
  margin-top: var(--space-9);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-6);
}
.footer-brand {
  display: flex; align-items: center; gap: 10px; color: #fff;
  font-size: 1.2rem; margin-bottom: var(--space-4);
}
.footer-brand .logo-icon { width: 36px; height: 36px; font-size: 1rem; }
.footer-desc { line-height: 1.9; font-size: 0.92rem; }
.site-footer h4 { color: #fff; margin-bottom: var(--space-4); font-size: 1rem; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-list a { color: #D5EAE0; transition: color var(--transition); }
.footer-list a:hover { color: #A7F3D0; }
.footer-cities { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: rgba(255,255,255,.1); border-radius: var(--radius-md);
  font-size: 1.2rem; transition: var(--transition);
  border: 1px solid rgba(255,255,255,.08);
}
.socials a:hover { background: #16A34A; transform: translateY(-3px); border-color: transparent; }

.footer-bottom {
  margin-top: var(--space-8); padding: var(--space-4) 0;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center; font-size: 0.88rem; color: #B8D5C7;
}

/* ===== FLOATING CALL ===== */
.floating-call {
  position: fixed; bottom: 22px; left: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(22,163,74,.45);
  animation: pulse 2.2s infinite;
  transition: transform var(--transition);
}
.floating-call:hover { transform: scale(1.08); color: #fff; }

@keyframes pulse {
  0%,100% { box-shadow: 0 8px 24px rgba(22,163,74,.45), 0 0 0 0 rgba(22,163,74,.5); }
  50%     { box-shadow: 0 8px 24px rgba(22,163,74,.45), 0 0 0 14px rgba(22,163,74,0); }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .main-nav, .header-cta { display: none; }
  .mobile-toggle { display: flex; }
  .main-nav.open {
    display: flex; position: fixed; inset: var(--header-h) 0 auto 0;
    background: #fff; flex-direction: column; padding: var(--space-5);
    box-shadow: var(--shadow-lg); gap: var(--space-4);
  }
  .footer-grid { grid-template-columns: 1fr; }
  .floating-call { width: 52px; height: 52px; bottom: 16px; left: 16px; }
  .section { padding: var(--space-7) 0; }
}

/* ==========================================================
   Phase 27A5: Header User Button + Mobile Block
   ========================================================== */

/* --- Desktop user button --- */
.header-user {
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
}

.header-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: .85rem;
  text-decoration: none;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.header-user-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  color: var(--primary-dark);
  transform: translateY(-1px);
}
.header-user-btn .user-icon {
  font-size: 1rem;
  line-height: 1;
}
.header-user-btn .user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16A34A, #15803D);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .8rem;
  flex-shrink: 0;
}
.header-user-btn.logged-in {
  background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
  border-color: #BBF7D0;
  color: #166534;
}
.header-user-btn.logged-in:hover {
  background: linear-gradient(135deg, #DCFCE7, #BBF7D0);
  border-color: #86EFAC;
  color: #14532D;
}
.header-user-btn .user-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Mobile block inside hamburger menu --- */
.mobile-user-block {
  display: none;
}

/* --- Hide desktop user button on mobile --- */
@media (max-width: 900px) {
  .header-user {
    display: none;
  }
  .mobile-user-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 14px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    width: 100%;
  }
  .mobile-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    text-align: right;
    transition: .2s;
    box-sizing: border-box;
  }
  .mobile-user-item:hover {
    background: var(--primary-soft);
    border-color: var(--primary-light);
    color: var(--primary-dark);
  }
  .mobile-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16A34A, #15803D);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .82rem;
    flex-shrink: 0;
  }
  .mobile-user-icon {
    font-size: 1.05rem;
    line-height: 1;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
  }
  .mobile-user-form {
    margin: 0;
    width: 100%;
  }
  .mobile-user-logout {
    background: #FEF2F2 !important;
    border-color: #FECACA !important;
    color: #B91C1C !important;
  }
  .mobile-user-logout:hover {
    background: #FEE2E2 !important;
    border-color: #FCA5A5 !important;
    color: #991B1B !important;
  }
  .mobile-user-register {
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    border-color: #BBF7D0;
    color: #166534;
  }
  .mobile-user-register:hover {
    background: linear-gradient(135deg, #DCFCE7, #BBF7D0);
    color: #14532D;
  }
}

/* ==========================================================
   BREAKPOINT 1: DESKTOP (>= 901px) — everything visible
   ========================================================== */
@media (min-width: 901px) {
  .mobile-toggle { display: none !important; }
  .main-nav { display: flex !important; }
  .header-user { display: inline-flex !important; }
  .header-cta { display: inline-flex !important; }
  .mobile-user-block { display: none !important; }
  .header-cta { margin-right: auto; }   /* push CTA to far left */
}

/* ==========================================================
   BREAKPOINT 2: TABLET (641px – 900px)
   - nav collapses into hamburger
   - user button stays visible (compact)
   - CTA stays visible
   ========================================================== */
@media (min-width: 641px) and (max-width: 900px) {
  .header-inner { gap: 8px; height: 62px; }
  .logo-text { font-size: .95rem; }
  .logo-icon { width: 36px; height: 36px; font-size: 1rem; }

  /* Hide desktop nav links */
  .main-nav {
    display: none;
    position: fixed;
    top: 62px;
    right: 0;
    left: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
    gap: 4px;
    box-shadow: 0 10px 30px rgba(15,61,46,.1);
    border-top: 1px solid #E3EDE7;
    margin: 0;
    max-height: calc(100vh - 62px);
    overflow-y: auto;
    z-index: 999;
  }
  .main-nav.open { display: flex; }
  .main-nav > a {
    padding: 12px 8px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 1rem;
    font-weight: 600;
  }
  .main-nav > a:last-child { border-bottom: 0; }
  .main-nav > a::after { display: none; }

  /* Mobile user block hidden on tablet (user button is visible) */
  .mobile-user-block { display: none !important; }

  /* Show user button (compact) */
  .header-user { display: inline-flex !important; }
  .header-user-btn {
    padding: 6px 10px;
    height: 38px;
    font-size: .76rem;
    gap: 5px;
  }
  .header-user-btn .user-avatar { width: 22px; height: 22px; font-size: .72rem; }
  .header-user-btn .user-name { max-width: 62px; }
  .header-user-btn .user-icon { font-size: .9rem; }

  /* Show CTA (compact) */
  .header-cta {
    display: inline-flex !important;
    height: 38px;
    padding: 0 12px;
    font-size: .76rem;
    gap: 5px;
  }
  .header-cta .cta-label { display: inline; }
  .header-cta svg { width: 14px; height: 14px; }

  /* Show hamburger */
  .mobile-toggle { display: flex !important; }

  /* Push CTA + hamburger to left */
  .header-cta { margin-right: auto; }
}

/* ==========================================================
   BREAKPOINT 3: PHONE (<= 640px)
   - user button HIDDEN (moved into hamburger drawer)
   - CTA becomes icon-only
   - hamburger far left
   ========================================================== */
@media (max-width: 640px) {
  .header-inner { gap: 6px; height: 58px; padding: 0 12px; }
  .logo-text { display: none; }         /* hide brand name */
  .logo-icon { width: 38px; height: 38px; font-size: 1.05rem; }

  /* Hide desktop nav */
  .main-nav {
    display: none;
    position: fixed;
    top: 58px;
    right: 0;
    left: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 0;
    box-shadow: 0 10px 30px rgba(15,61,46,.1);
    border-top: 1px solid #E3EDE7;
    margin: 0;
    max-height: calc(100vh - 58px);
    overflow-y: auto;
    z-index: 999;
  }
  .main-nav.open { display: flex; }
  .main-nav > a {
    padding: 13px 6px;
    border-bottom: 1px solid #F1F5F9;
    font-size: .95rem;
    font-weight: 600;
  }
  .main-nav > a:last-child { border-bottom: 0; }
  .main-nav > a::after { display: none; }

  /* User button hidden — items go inside hamburger */
  .header-user { display: none !important; }

  /* Mobile user block visible inside drawer */
  .mobile-user-block {
    display: flex !important;
    flex-direction: column;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #E3EDE7;
  }
  .mobile-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 6px;
    color: #1A2332;
    font-weight: 500;
    font-size: .92rem;
    text-decoration: none;
    border-bottom: 1px solid #F1F5F9;
    background: transparent;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    width: 100%;
    text-align: right;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
  }
  .mobile-user-item:last-child { border-bottom: 0; }
  .mobile-user-item:hover { color: #16A34A; }
  .mobile-user-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, #16A34A, #15803D);
    color: #fff; display: grid; place-items: center;
    font-weight: 800; font-size: .78rem; flex-shrink: 0;
  }
  .mobile-user-icon {
    width: 26px; text-align: center; font-size: 1rem; flex-shrink: 0;
  }
  .mobile-user-form { margin: 0; width: 100%; }
  .mobile-user-logout { color: #B91C1C; }
  .mobile-user-logout:hover { color: #991B1B; }
  .mobile-user-register { color: #15803D; font-weight: 700; }

  /* CTA — icon-only */
  .header-cta {
    display: inline-flex !important;
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    gap: 0;
    border-radius: 10px;
    margin-right: auto;
  }
  .header-cta .cta-label { display: none; }
  .header-cta svg { width: 18px; height: 18px; }

  /* Hamburger */
  .mobile-toggle { display: flex !important; width: 40px; height: 40px; }
  .mobile-toggle span { width: 18px; }
}

/* ==========================================================
   Very small phone (<= 380px)
   ========================================================== */
@media (max-width: 380px) {
  .header-inner { gap: 5px; padding: 0 10px; }
  .logo-icon { width: 34px; height: 34px; font-size: .95rem; }
  .header-cta { width: 36px; height: 36px; }
  .mobile-toggle { width: 36px; height: 36px; }
}

/* ==========================================================
   TABLET (641–900px)
   ========================================================== */
@media (min-width: 641px) and (max-width: 900px) {
  .header-inner { gap: 8px; height: 62px; }
  .logo-text { font-size: .95rem; }
  .logo-icon { width: 36px; height: 36px; font-size: 1rem; }

  .main-nav {
    display: none;
    position: fixed;
    top: 62px; right: 0; left: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 16px;
    gap: 0;
    box-shadow: 0 10px 30px rgba(15,61,46,.1);
    border-top: 1px solid #E3EDE7;
    max-height: calc(100vh - 62px);
    overflow-y: auto;
    z-index: 999;
  }
  .main-nav.open { display: flex; }
  .main-nav > a {
    padding: 12px 6px;
    border-bottom: 1px solid #F1F5F9;
    font-size: .95rem;
    font-weight: 600;
  }
  .main-nav > a:last-child { border-bottom: 0; }
  .main-nav > a::after { display: none; }

  .header-cta {
    height: 38px;
    padding: 0 12px;
    font-size: .76rem;
    gap: 5px;
  }
  .header-cta .cta-label { display: none; }
  .header-cta svg { width: 16px; height: 16px; }

  .profile-trigger {
    padding: 4px 10px 4px 4px;
    height: 38px;
    font-size: .76rem;
    gap: 6px;
  }
  .profile-avatar { width: 26px; height: 26px; font-size: .72rem; }
  .profile-name { max-width: 70px; }

  .profile-menu {
    width: 240px;
  }

  .mobile-toggle { display: flex; width: 38px; height: 38px; }
  .mobile-toggle span { width: 18px; }
}

/* ==========================================================
   MOBILE (<= 640px)
   ========================================================== */
@media (max-width: 640px) {
  .header-inner { gap: 6px; height: 58px; padding: 0 12px; }
  .logo-text { display: none; }
  .logo-icon { width: 38px; height: 38px; font-size: 1.05rem; }

  .main-nav {
    display: none;
    position: fixed;
    top: 58px; right: 0; left: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 0;
    box-shadow: 0 10px 30px rgba(15,61,46,.1);
    border-top: 1px solid #E3EDE7;
    max-height: calc(100vh - 58px);
    overflow-y: auto;
    z-index: 999;
  }
  .main-nav.open { display: flex; }
  .main-nav > a {
    padding: 13px 6px;
    border-bottom: 1px solid #F1F5F9;
    font-size: .95rem;
    font-weight: 600;
  }
  .main-nav > a:last-child { border-bottom: 0; }
  .main-nav > a::after { display: none; }

  /* Hide profile trigger on phone — items inside hamburger */
  .profile-dropdown,
  .profile-trigger {
    display: none !important;
  }

  .header-cta {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
    gap: 0;
  }
  .header-cta .cta-label { display: none; }
  .header-cta svg { width: 18px; height: 18px; }

  /* Mobile user block visible inside drawer */
  .mobile-user-block {
    display: flex;
    flex-direction: column;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #E3EDE7;
  }
  .mobile-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 6px;
    color: #1A2332;
    font-weight: 500;
    font-size: .92rem;
    text-decoration: none;
    border-bottom: 1px solid #F1F5F9;
    background: transparent;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    width: 100%;
    text-align: right;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
  }
  .mobile-user-item:last-child { border-bottom: 0; }
  .mobile-user-item:hover { color: #16A34A; }
  .mobile-user-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, #16A34A, #15803D);
    color: #fff; display: grid; place-items: center;
    font-weight: 800; font-size: .78rem; flex-shrink: 0;
  }
  .mobile-user-icon {
    width: 26px; text-align: center; font-size: 1rem; flex-shrink: 0;
  }
  .mobile-user-form { margin: 0; width: 100%; }
  .mobile-user-logout { color: #B91C1C; }
  .mobile-user-logout:hover { color: #991B1B; }
  .mobile-user-register { color: #15803D; font-weight: 700; }

  .mobile-toggle { display: flex; width: 40px; height: 40px; }
  .mobile-toggle span { width: 18px; }
}

/* ==========================================================
   HEADER — Public site (light theme)
   Layout (RTL):  Logo | Nav | spacer | CTA | Profile ▾ | ☰
   ========================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(15,23,42,.05);
  transition: box-shadow .25s;
  width: 100%;
}
.site-header.scrolled {
  box-shadow: 0 4px 16px rgba(15,23,42,.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  flex-wrap: nowrap;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

/* -------- LOGO -------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.02rem;
  color: #0F172A;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #16A34A, #15803D);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  box-shadow: 0 3px 10px rgba(22,163,74,.22);
  flex-shrink: 0;
  transition: transform .3s;
}
.logo:hover .logo-icon { transform: rotate(-8deg) scale(1.05); }

/* -------- NAV -------- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.main-nav > a {
  position: relative;
  color: #475569;
  font-weight: 500;
  font-size: .88rem;
  text-decoration: none;
  padding: 8px 2px;
  white-space: nowrap;
  transition: color .2s;
}
.main-nav > a:hover { color: #15803D; }
.main-nav > a::after {
  content: '';
  position: absolute;
  bottom: 2px; right: 0; left: 0;
  height: 2px;
  background: #16A34A;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s;
}
.main-nav > a:hover::after { transform: scaleX(1); }

/* -------- SPACER -------- */
.header-spacer { flex: 1 1 auto; min-width: 8px; }

/* -------- CTA — always with text (even mobile) -------- */
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  background: linear-gradient(135deg, #16A34A, #15803D);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: .82rem;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  box-shadow: 0 3px 10px rgba(22,163,74,.25);
  transition: all .2s;
  flex-shrink: 0;
}
.header-cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(22,163,74,.35);
}
.header-cta svg { flex-shrink: 0; }

/* -------- PROFILE DROPDOWN -------- */
.profile-dropdown {
  position: relative;
  flex-shrink: 0;
}

.profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 5px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 9999px;
  color: #0F172A;
  font-family: inherit;
  font-weight: 600;
  font-size: .82rem;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  box-sizing: border-box;
  text-decoration: none;
  height: 40px;
}
.profile-trigger:hover {
  border-color: #BBF7D0;
  background: #F0FDF4;
  color: #15803D;
}
.profile-trigger[aria-expanded="true"] {
  border-color: #16A34A;
  background: #F0FDF4;
  box-shadow: 0 0 0 4px rgba(22,163,74,.1);
}

.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16A34A, #15803D);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: .82rem;
  flex-shrink: 0;
}
.profile-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-chevron {
  opacity: .5;
  transition: transform .25s;
  flex-shrink: 0;
}
.profile-trigger[aria-expanded="true"] .profile-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.profile-trigger.guest { color: #166534; }
.guest-avatar {
  background: #F0FDF4;
  color: #16A34A;
  font-size: 1rem;
}

/* -------- PROFILE MENU (dropdown) -------- */
.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 260px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15,23,42,.15), 0 4px 12px rgba(15,23,42,.06);
  overflow: hidden;
  animation: menuIn .22s cubic-bezier(.4,0,.2,1);
  transform-origin: top left;
  z-index: 1001;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.profile-menu[hidden] { display: none; }

.profile-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
  border-bottom: 1px solid #E2E8F0;
}
.profile-menu-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16A34A, #15803D);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.profile-menu-info {
  min-width: 0;
  flex: 1;
}
.profile-menu-info strong {
  display: block;
  font-size: .9rem;
  color: #0F172A;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-menu-info small {
  display: block;
  font-size: .74rem;
  color: #64748B;
  font-family: 'SFMono-Regular', Consolas, monospace;
  text-align: right;
  margin-top: 2px;
}

.profile-menu-links { padding: 6px; }
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #334155;
  font-weight: 600;
  font-size: .84rem;
  text-decoration: none;
  transition: .2s;
}
.profile-menu-item:hover {
  background: #F0FDF4;
  color: #15803D;
}
.profile-menu-item .menu-icon {
  font-size: 1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.profile-menu-logout-form {
  margin: 0;
  padding: 6px;
  border-top: 1px solid #F1F5F9;
}
.profile-menu-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: .84rem;
  cursor: pointer;
  transition: .2s;
}
.profile-menu-logout:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #991B1B;
}
.profile-menu-logout svg { flex-shrink: 0; }

/* -------- HAMBURGER -------- */
.mobile-toggle {
  display: none;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 9px;
  width: 38px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #334155;
  border-radius: 2px;
  transition: .2s;
}

.mobile-user-block { display: none; }

/* ==========================================================
   TABLET (641–900px)
   ========================================================== */
@media (min-width: 641px) and (max-width: 900px) {
  .header-inner { gap: 8px; height: 60px; }
  .logo-text { font-size: .92rem; }
  .logo-icon { width: 34px; height: 34px; font-size: 1rem; }

  .main-nav {
    display: none;
    position: fixed;
    top: 60px; right: 0; left: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 16px;
    gap: 0;
    box-shadow: 0 10px 30px rgba(15,23,42,.1);
    border-top: 1px solid #E2E8F0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 999;
  }
  .main-nav.open { display: flex; }
  .main-nav > a {
    padding: 12px 6px;
    border-bottom: 1px solid #F1F5F9;
    font-size: .92rem;
    font-weight: 600;
  }
  .main-nav > a:last-child { border-bottom: 0; }
  .main-nav > a::after { display: none; }

  .header-cta {
    height: 36px;
    padding: 0 12px;
    font-size: .75rem;
    gap: 5px;
  }
  .header-cta svg { width: 14px; height: 14px; }

  .profile-trigger {
    padding: 4px 10px 4px 4px;
    height: 36px;
    font-size: .75rem;
    gap: 5px;
  }
  .profile-avatar { width: 26px; height: 26px; font-size: .72rem; }
  .profile-name { max-width: 60px; }
  .profile-menu { width: 240px; }

  .mobile-toggle { display: flex; }
}

/* ==========================================================
   MOBILE (<= 640px) — CTA keeps text
   ========================================================== */
@media (max-width: 640px) {
  .header-inner { gap: 6px; height: 56px; padding: 0 10px; }
  .logo-text { display: none; }
  .logo-icon { width: 36px; height: 36px; font-size: 1.05rem; }

  .main-nav {
    display: none;
    position: fixed;
    top: 56px; right: 0; left: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 0;
    box-shadow: 0 10px 30px rgba(15,23,42,.1);
    border-top: 1px solid #E2E8F0;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    z-index: 999;
  }
  .main-nav.open { display: flex; }
  .main-nav > a {
    padding: 13px 6px;
    border-bottom: 1px solid #F1F5F9;
    font-size: .92rem;
    font-weight: 600;
  }
  .main-nav > a:last-child { border-bottom: 0; }
  .main-nav > a::after { display: none; }

  /* CTA compact WITH text */
  .header-cta {
    height: 36px;
    padding: 0 12px;
    font-size: .72rem;
    gap: 4px;
    border-radius: 9px;
  }
  .header-cta svg { width: 13px; height: 13px; }

  /* Profile hidden on mobile */
  .profile-dropdown,
  .profile-trigger {
    display: none !important;
  }

  /* Mobile user block inside hamburger */
  .mobile-user-block {
    display: flex;
    flex-direction: column;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #E2E8F0;
  }
  .mobile-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 6px;
    color: #334155;
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
    border-bottom: 1px solid #F1F5F9;
    background: transparent;
    border-top: 0; border-left: 0; border-right: 0;
    width: 100%;
    text-align: right;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
  }
  .mobile-user-item:last-child { border-bottom: 0; }
  .mobile-user-item:hover { color: #16A34A; }
  .mobile-user-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, #16A34A, #15803D);
    color: #fff; display: grid; place-items: center;
    font-weight: 800; font-size: .78rem; flex-shrink: 0;
  }
  .mobile-user-icon {
    width: 26px; text-align: center; font-size: 1rem; flex-shrink: 0;
  }
  .mobile-user-form { margin: 0; width: 100%; }
  .mobile-user-logout { color: #B91C1C; }
  .mobile-user-logout:hover { color: #991B1B; }
  .mobile-user-register { color: #15803D; font-weight: 700; }

  .mobile-toggle { display: flex; }
}

/* Extra small — very compact CTA but text stays */
@media (max-width: 380px) {
  .header-cta {
    padding: 0 8px;
    font-size: .68rem;
    gap: 3px;
  }
  .header-cta svg { width: 12px; height: 12px; }
}

/* ==========================================================
   Phase 32 — Mobile CTA keeps text + icon
   ========================================================== */
@media (max-width: 900px) {
  .header-cta .cta-label {
    display: inline !important;
  }
}
@media (max-width: 640px) {
  .header-cta {
    display: inline-flex !important;
    padding: 0 10px !important;
    gap: 4px !important;
    font-size: .72rem !important;
    height: 36px !important;
    width: auto !important;
    border-radius: 9px !important;
  }
  .header-cta .cta-label {
    display: inline !important;
    font-size: .72rem !important;
  }
  .header-cta svg {
    width: 13px !important;
    height: 13px !important;
  }
}
@media (max-width: 400px) {
  .header-cta {
    padding: 0 8px !important;
    font-size: .68rem !important;
  }
  .header-cta .cta-label {
    font-size: .68rem !important;
  }
  .header-cta svg {
    width: 12px !important;
    height: 12px !important;
  }
}

/* ==========================================================
   Phase 33b — Bigger desktop header
   ========================================================== */
@media (min-width: 901px) {
  .header-inner {
    height: 72px !important;
    gap: 14px !important;
  }
  .logo {
    font-size: 1.15rem !important;
    gap: 10px !important;
  }
  .logo-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.3rem !important;
  }
  .main-nav {
    gap: 24px !important;
  }
  .main-nav > a {
    font-size: .98rem !important;
    padding: 10px 4px !important;
  }
  .header-cta {
    font-size: .92rem !important;
    height: 44px !important;
    padding: 0 20px !important;
    gap: 8px !important;
  }
  .header-cta svg {
    width: 17px !important;
    height: 17px !important;
  }
  .profile-trigger {
    font-size: .9rem !important;
    height: 44px !important;
    padding: 6px 16px 6px 6px !important;
  }
  .profile-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: .88rem !important;
  }
  .profile-name {
    max-width: 110px !important;
  }
}