/* Tuthub theme, branding ported from DotTut (green #40b605, Ubuntu/Roboto/Inter)
   built on Bootstrap 5.3 color modes (data-bs-theme="light|dark"). */

:root {
  --th-accent: #40b605;
  --th-accent-hover: #379e04;
  --th-accent-rgb: 64, 182, 5;
  --th-dark-bg: #040a01;        /* DotTut background, hero/footer in both modes */
  --th-dark-surface: #0b1505;
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --heading-font: "Ubuntu", sans-serif;
  --nav-font: "Inter", sans-serif;
  scroll-behavior: smooth;
}

[data-bs-theme="light"] {
  --bs-body-bg: #f7faf5;
  --bs-body-color: #1f2b14;
  --bs-border-color: #dfe8d8;
  --th-surface: #ffffff;
  --th-heading: #14210c;
  --th-muted: #5d6b52;
  --th-navbar-bg: rgba(255, 255, 255, 0.92);
  --th-chip-bg: #ecf5e6;
}

[data-bs-theme="dark"] {
  --bs-body-bg: #040a01;
  --bs-body-color: #f3f6f4;
  --bs-border-color: #1d2913;
  --th-surface: #0b1505;
  --th-heading: #e1eff9;
  --th-muted: #93a18a;
  --th-navbar-bg: rgba(4, 10, 1, 0.92);
  --th-chip-bg: #11210a;
}

body {
  font-family: var(--default-font);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: var(--th-heading);
}

a {
  color: var(--th-accent);
  text-decoration: none;
}

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

.text-muted, .form-text {
  color: var(--th-muted) !important;
}

/* Buttons */
.btn-primary {
  --bs-btn-bg: var(--th-accent);
  --bs-btn-border-color: var(--th-accent);
  --bs-btn-hover-bg: var(--th-accent-hover);
  --bs-btn-hover-border-color: var(--th-accent-hover);
  --bs-btn-active-bg: var(--th-accent-hover);
  --bs-btn-active-border-color: var(--th-accent-hover);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: var(--th-accent-rgb);
}

.btn-outline-primary {
  --bs-btn-color: var(--th-accent);
  --bs-btn-border-color: var(--th-accent);
  --bs-btn-hover-bg: var(--th-accent);
  --bs-btn-hover-border-color: var(--th-accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--th-accent);
  --bs-btn-active-border-color: var(--th-accent);
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: var(--th-accent-rgb);
}

.btn-whatsapp {
  --bs-btn-bg: #25d366;
  --bs-btn-border-color: #25d366;
  --bs-btn-hover-bg: #1fb557;
  --bs-btn-hover-border-color: #1fb557;
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #1fb557;
  --bs-btn-active-color: #fff;
}

.badge.text-bg-primary {
  background-color: var(--th-accent) !important;
  color: #fff !important;
}

.text-accent { color: var(--th-accent) !important; }

.form-control:focus, .form-select:focus {
  border-color: var(--th-accent);
  box-shadow: 0 0 0 0.2rem rgba(var(--th-accent-rgb), 0.2);
}

/* Navbar */
.th-navbar {
  font-family: var(--nav-font);
  background: var(--th-navbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bs-border-color);
}

.th-navbar .navbar-brand {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--th-heading);
}

.th-navbar .navbar-brand .dot { color: var(--th-accent); }

.th-navbar .nav-link {
  color: var(--bs-body-color);
  font-weight: 500;
}

.th-navbar .nav-link:hover, .th-navbar .nav-link.active {
  color: var(--th-accent);
}

/* Hero, DotTut dark in both modes */
.th-hero {
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(64, 182, 5, 0.22), transparent 60%),
    radial-gradient(600px 300px at 10% 110%, rgba(64, 182, 5, 0.12), transparent 60%),
    var(--th-dark-bg);
  color: #f3f6f4;
  padding: 4.5rem 0 4rem;
}

.th-hero h1, .th-hero h2 { color: #ffffff; }
.th-hero .lead { color: #c9d6c2; }

.th-hero .tagline-word { color: var(--th-accent); }

/* Cards & surfaces */
.card {
  --bs-card-bg: var(--th-surface);
  --bs-card-border-color: var(--bs-border-color);
}

.th-card-hover {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.th-card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.12);
}

/* Category tiles */
.th-cat-tile {
  display: block;
  text-align: center;
  padding: 1.1rem 0.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--th-surface);
  color: var(--bs-body-color);
  height: 100%;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.th-cat-tile:hover {
  border-color: var(--th-accent);
  transform: translateY(-2px);
  color: var(--bs-body-color);
}

.th-cat-tile i {
  font-size: 1.7rem;
  color: var(--th-accent);
  display: block;
  margin-bottom: 0.4rem;
}

.th-cat-tile .ta {
  display: block;
  font-size: 0.78rem;
  color: var(--th-muted);
}

/* Logo avatar fallback (initial letter on green) */
.th-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--th-accent), #2c8003);
  color: #fff;
  font-family: var(--heading-font);
  font-weight: 700;
  border-radius: 0.75rem;
  overflow: hidden;
  flex-shrink: 0;
}

.th-avatar img { width: 100%; height: 100%; object-fit: cover; }
.th-avatar-sm { width: 48px; height: 48px; font-size: 1.3rem; }
.th-avatar-md { width: 64px; height: 64px; font-size: 1.7rem; }
.th-avatar-lg { width: 96px; height: 96px; font-size: 2.6rem; border-radius: 1rem; }

.th-verified { color: #1d9bf0; }

.th-chip {
  display: inline-block;
  background: var(--th-chip-bg);
  color: var(--bs-body-color);
  border-radius: 2rem;
  padding: 0.15rem 0.7rem;
  font-size: 0.8rem;
}

/* Section headings */
.th-section { padding: 2.75rem 0; }

.th-section-title {
  font-family: var(--heading-font);
  font-weight: 700;
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.th-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  background: var(--th-accent);
  border-radius: 2px;
}

/* Footer, dark in both modes */
.th-footer {
  background: var(--th-dark-bg);
  color: #c9d6c2;
  border-top: 2px solid var(--th-accent);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.th-footer h5 { color: #ffffff; }
.th-footer a { color: #c9d6c2; }
.th-footer a:hover { color: var(--th-accent); }

/* Stars */
.th-stars { color: #f5a623; letter-spacing: 1px; }

/* Chat */
.th-chat-box { height: 55vh; overflow-y: auto; }

.th-msg {
  max-width: 75%;
  border-radius: 1rem;
  padding: 0.5rem 0.9rem;
  margin-bottom: 0.5rem;
  width: fit-content;
}

.th-msg-mine {
  background: var(--th-accent);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 0.25rem;
}

.th-msg-theirs {
  background: var(--th-chip-bg);
  border-bottom-left-radius: 0.25rem;
}

/* Notification dropdown */
.th-notif-menu { width: 340px; max-height: 420px; overflow-y: auto; }

.th-notif-unread { background: rgba(var(--th-accent-rgb), 0.08); }

/* Sticky mobile contact bar on business pages */
.th-contact-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: var(--th-surface);
  border-top: 1px solid var(--bs-border-color);
  padding: 0.5rem 0.75rem;
}

@media (min-width: 768px) {
  .th-contact-bar { display: none; }
}

.th-page-bottom-pad { padding-bottom: 4.5rem; }

@media (min-width: 768px) {
  .th-page-bottom-pad { padding-bottom: 0; }
}
