/* workspace/public/assets/css/styles.css */
:root {
  /* TBF Universal Design System & Corporate Palette */
  --color-primary: #0f2b48;          /* Deep Corporate Navy */
  --color-primary-light: #1b436d;    /* Mid Navy */
  --color-primary-dark: #091b2e;     /* Dark Navy */

  --color-accent: #c8952b;           /* Warm Gold */
  --color-accent-hover: #b07f1f;     /* Darker Gold */
  --color-accent-light: #fef7e9;     /* Light Gold Wash */

  --color-bg: #ffffff;               /* Pure White */
  --color-bg-subtle: #f8fafc;        /* Off-white / Soft Gray */
  --color-bg-card: #ffffff;          /* Card Background */

  --color-text-main: #1e293b;        /* Charcoal Main Body */
  --color-text-muted: #64748b;       /* Slate Secondary Text */
  --color-text-inverse: #ffffff;     /* White on Dark */

  --color-border: #e2e8f0;           /* Subtle Divider */
  --color-border-hover: #cbd5e1;

  /* Tourism Specific Palette Overlays */
  --primary: #14532d;                /* Emerald/Forest Green */
  --primary-light: #166534;
  --primary-dark: #052e16;
  --accent-gold: #c8952b;
  --accent-amber: #f59e0b;
  --accent-terracotta: #c2410c;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(15, 43, 72, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 43, 72, 0.12);

  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.25s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--color-text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Top Banner / Site Header (Consistent with thulamelabusiness.co.za) ── */
.site-header {
  background-color: var(--color-bg);
  color: var(--color-text-main);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition-normal), background-color var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
}

.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #f59e0b);
  width: 0%;
  transition: width 0.1s ease-out;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Brand Section: Logo + Text */
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--color-border);
  transition: transform var(--transition-normal);
}

.brand:hover .brand-logo {
  transform: scale(1.04);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  line-height: 1.15;
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Navbar Actions (Right side: Quick Links + Auth Slot + Hamburger) */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-quick-links {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text-main);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-link:hover {
  color: var(--color-accent);
  background-color: var(--color-bg-subtle);
}

.nav-link.active {
  color: var(--color-primary);
  font-weight: 700;
  background-color: var(--color-accent-light);
}

/* Modular Auth Slot (Login / Avatar Swap) */
.nav-auth-slot {
  display: flex;
  align-items: center;
}

.nav-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  background: transparent;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.nav-login-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
}

.nav-login-btn .login-icon {
  flex-shrink: 0;
}

.nav-user-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-avatar-btn:hover,
.nav-avatar-btn:focus-visible {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(15, 43, 72, 0.18);
  outline: none;
}

.nav-avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  user-select: none;
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow: hidden;
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-menu-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.user-menu-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--color-text-main);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.user-menu-dropdown a:hover {
  background-color: var(--color-bg-subtle);
  color: var(--color-accent);
}

/* Hamburger Button (3 bars, always visible) */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.nav-toggle:hover {
  background-color: var(--color-bg-subtle);
  border-color: var(--color-accent);
}

.nav-toggle:hover .hamburger-bar {
  background-color: var(--color-accent);
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text-main);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast), background-color var(--transition-fast);
}

/* Animate hamburger to X when drawer is open */
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Off-Canvas Drawer (Consistent with thulamelabusiness.co.za) ── */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 90vw;
  height: 100vh;
  background-color: var(--color-bg);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-drawer.is-active {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--color-accent);
  flex-shrink: 0;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.drawer-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.drawer-brand-text {
  display: flex;
  flex-direction: column;
}

.drawer-brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}

.drawer-brand-sub {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drawer-close {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-close:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background-color: var(--color-bg-subtle);
}

.drawer-body {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Member portal auth card inside drawer */
.drawer-auth-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: var(--color-text-inverse);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  gap: 0.75rem;
}

.drawer-auth-info {
  display: flex;
  flex-direction: column;
}

.drawer-auth-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.drawer-auth-sub {
  font-size: 0.72rem;
  color: #cbd5e1;
}

.drawer-auth-role {
  display: inline-block;
  background: rgba(200, 149, 43, 0.3);
  color: #fef7e9;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 3px;
  text-transform: uppercase;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

/* Drawer Navigation Groups */
.drawer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.75rem 0.5rem 0.25rem;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-main);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

.drawer-nav-item:hover {
  background-color: var(--color-bg-subtle);
  color: var(--color-accent);
}

.drawer-nav-item.active {
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: 700;
  border-left: 3px solid var(--color-accent);
}

.drawer-item-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 1.4rem;
  text-align: center;
}

.drawer-item-text {
  line-height: 1.3;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-light);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-accent {
  background-color: var(--accent-gold);
  color: #ffffff;
}

.btn-accent:hover {
  background-color: var(--accent-amber);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text-dark);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-verified {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-gold {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-category {
  background: #f1f5f9;
  color: #334155;
}

/* Card Grids */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin: 28px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-img-wrap {
  position: relative;
  height: 200px;
  background: #e2e8f0;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img {
  transform: scale(1.03);
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.card-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
  line-height: 1.4;
  flex: 1;
}

.card-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-price {
  font-weight: 800;
  color: var(--primary-dark);
  font-size: 1.15rem;
}

.card-price span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 48px 0 24px;
  margin-top: 60px;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-col h4 {
  color: #ffffff;
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #94a3b8;
}

.footer-col ul li a:hover {
  color: #f59e0b;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .nav-quick-links {
    display: none;
  }
  .brand-logo {
    width: 40px;
    height: 40px;
  }
  .brand-name {
    font-size: 1rem;
  }
  .brand-tagline {
    font-size: 0.65rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
