/* ===========================
   JRB Accounting Solutions
   Global Stylesheet
   =========================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:        #4a148c;
  --primary-light:  #7b1fa2;
  --primary-dark:   #12005e;
  --accent:         #7b1fa2;
  --accent-bright:  #e040fb;
  --bg:             #f5f0fa;
  --surface:        #ffffff;
  --text:           #1a1a2e;
  --text-muted:     #5e5e7a;
  --border:         #e0d6f0;
  --white:          #ffffff;
  --shadow:         rgba(74, 20, 140, 0.12);
  --shadow-strong:  rgba(74, 20, 140, 0.25);
  --gradient:       linear-gradient(135deg, #e0d6f0 0%, #b388ff 45%, #9e58bf 100%);
  --gradient-card:  linear-gradient(160deg, #4a148c 0%, #7c1fa2 100%);
  --font-body:      'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --radius:         10px;
  --radius-lg:      18px;
  --transition:     0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ===========================
   NAVIGATION
   =========================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary-dark);
  background: var(--gradient);
  box-shadow: 0 2px 20px var(--shadow-strong);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-brand .logo-icon {
  width: 160px;
  height: 160px;
  background: transparent url("crm.jrbaccsol.co.za/api/Bigger%20logo.png") center/contain no-repeat;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: transparent;
  font-weight: 900;
  letter-spacing: -1px;
  flex-shrink: 0;
  overflow: hidden;
}

.nav-brand .brand-text,
.nav-brand .brand-sub {
  display: none;
}

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

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  transition: var(--transition);
  letter-spacing: 0.3px;
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
}

.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
  font-weight: 600;
}

.nav-cta {
  background: var(--accent-bright) !important;
  color: var(--white) !important;
  padding: 0.45rem 1.3rem !important;
  border-color: transparent !important;
}

.nav-cta:hover {
  background: #c51162 !important;
  border-color: transparent !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===========================
   PAGE HERO BANNER (inner pages)
   =========================== */
.page-hero {
  background: var(--gradient);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  position: relative;
}

.page-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

/* ===========================
   SECTION UTILITIES
   =========================== */
.section {
  padding: 5rem 2rem;
}

.section-alt {
  background: var(--surface);
}

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

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
  background: rgba(74,20,140,0.08);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.section-title span {
  color: var(--primary-light);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 3rem;
}

.text-center { text-align: center; }
.text-center .section-subtitle { margin-left: auto; margin-right: auto; }

.divider {
  width: 56px;
  height: 4px;
  background: var(--gradient-card);
  border-radius: 4px;
  margin: 1rem 0 2rem;
}

.divider-center { margin-left: auto; margin-right: auto; }

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 4px 16px var(--shadow);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-strong);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}

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

.btn-outline-dark:hover {
  background: var(--primary);
  color: var(--white);
}
.btn-white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-white:hover {
  background: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ===========================
   CARDS
   =========================== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow-strong);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(74,20,140,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.card-icon.purple { background: rgba(74,20,140,0.1); }
.card-icon.accent { background: rgba(224,64,251,0.1); }

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.6rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===========================
   GRID LAYOUTS
   =========================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: center;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ===========================
   IMAGE UTILITIES
   =========================== */
.img-rounded {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 48px var(--shadow-strong);
}

.img-rounded img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===========================
   STAT BOXES
   =========================== */
.stat-box {
  text-align: center;
  padding: 1.5rem;
}

.stat-box .stat-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-box .stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ===========================
   BADGE / PILL
   =========================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(74,20,140,0.08);
  color: var(--primary-light);
  border: 1px solid rgba(74,20,140,0.2);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ===========================
   FOOTER
   =========================== */
footer {
  background: var(--primary-dark);
  background: linear-gradient(135deg, #0d0035 0%, #12005e 100%);
  color: rgba(255,255,255,0.8);
  padding: 4rem 2rem 2rem;
  margin-top: auto;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.footer-brand .brand-tagline {
  font-size: 0.8rem;
  color: var(--white);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  color: var(--white);
}

.social-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
}

.footer-contact-item .icon { font-size: 0.9rem; margin-top: 0.1rem; flex-shrink: 0; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.4);
}

/* ===========================
   FLOATING SOCIAL BUTTONS
   =========================== */
.floating-social {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  z-index: 1200;
}

.floating-social-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(0,0,0,0.24);
  transition: var(--transition);
}

.floating-social-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.floating-social-btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.floating-social-btn.whatsapp {
  background: #25d366;
}

.floating-social-btn.facebook {
  background: #1877f2;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 .img-rounded { max-height: 300px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 24px var(--shadow-strong);
  }

  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 0.7rem 1rem; }
  .hamburger { display: flex; }
}

@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .section { padding: 3.5rem 1.25rem; }
  .floating-social {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .floating-social-btn {
    width: 48px;
    height: 48px;
    font-size: 1.05rem;
  }
  .floating-social-btn svg {
    width: 22px;
    height: 22px;
  }
}
