/* ═══════════════════════════════════════════
   QPack – Premium Custom Packaging
   Main Stylesheet
═══════════════════════════════════════════ */

/* ── Root variables ── */
:root {
  --primary:       #1B6B45;
  --primary-dark:  #134d32;
  --primary-light: #22895a;
  --primary-xlt:   #e8f5ee;
  --accent:        #f0a500;
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-900: #111827;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.12), 0 8px 20px rgba(0,0,0,.07);
  --radius:   .75rem;
  --radius-lg: 1.25rem;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }

/* custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }

/* ── Tailwind colour overrides ── */
.text-primary      { color: var(--primary) !important; }
.bg-primary        { background-color: var(--primary) !important; }
.bg-primary-dark   { background-color: var(--primary-dark) !important; }
.bg-primary-xlt    { background-color: var(--primary-xlt) !important; }
.border-primary    { border-color: var(--primary) !important; }
.text-primary-light{ color: var(--primary-light) !important; }
.hover\:bg-primary-dark:hover  { background-color: var(--primary-dark) !important; }
.hover\:text-primary:hover     { color: var(--primary) !important; }
.hover\:border-primary:hover   { border-color: var(--primary) !important; }

/* ── Gradient text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #3db87a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section spacing ── */
.section { padding: 5rem 0; }
@media (max-width: 768px) { .section { padding: 3.5rem 0; } }

/* ── Section heading label ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-xlt);
  padding: .3rem .85rem;
  border-radius: 999px;
  margin-bottom: .85rem;
}
.section-label::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

/* ── Hero ── */
.hero-gradient {
  background: linear-gradient(135deg, #061a0e 0%, #0e3d24 40%, #1B6B45 75%, #0e3d24 100%);
  position: relative;
  overflow: hidden;
}
.hero-gradient::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(27,107,69,.35) 0%, transparent 60%),
                    radial-gradient(circle at 80% 20%, rgba(60,180,100,.18) 0%, transparent 50%);
  pointer-events: none;
}
/* dotted grid pattern */
.hero-gradient::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }

/* hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,.95);
  border-radius: 999px;
  padding: .45rem 1.1rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 1.5rem;
}
.hero-badge .dot {
  width: 7px; height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform: scale(1); }
  50%      { opacity:.6; transform: scale(1.4); }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 700;
  font-size: .9rem;
  padding: .875rem 2rem;
  border-radius: var(--radius);
  transition: all .2s ease;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  letter-spacing: .01em;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(27,107,69,.35);
}
.btn-white {
  background: white;
  color: var(--primary);
}
.btn-white:hover {
  background: #f0fdf4;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}
.btn-outline-white {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,.4);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.7);
}

/* ── Stats strip ── */
.stats-strip {
  background: white;
  border-bottom: 1px solid var(--gray-100);
  position: relative;
}
.stat-card {
  text-align: center;
  padding: 2rem 1rem;
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -.02em;
}
.stat-label {
  font-size: .8rem;
  color: #6b7280;
  margin-top: .4rem;
  font-weight: 500;
  letter-spacing: .02em;
}

/* ── Cards & hover ── */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(27,107,69,.15);
}
.card-hover {
  transition: transform .25s ease, box-shadow .25s ease;
}
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ── Service cards ── */
.service-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #3db87a);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(27,107,69,.15);
}
.service-icon {
  width: 56px; height: 56px;
  background: var(--primary-xlt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.6rem;
  transition: background .25s;
}
.service-card:hover .service-icon { background: var(--primary); }
.service-card:hover .service-icon svg { color: white !important; }

/* ── Process steps ── */
.process-step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}
.process-number {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 900;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  shrink: 0;
  position: relative;
  z-index: 1;
}
.process-connector {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--primary), rgba(27,107,69,.1));
  margin: 4px 0 4px 25px;
}

/* ── Portfolio ── */
.portfolio-item { overflow: hidden; }
.portfolio-item img { transition: transform .45s ease; }
.portfolio-item:hover img { transform: scale(1.07); }
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-filter-btn {
  padding: .4rem 1.1rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  border: 1.5px solid var(--gray-200);
  background: white;
  color: #6b7280;
  cursor: pointer;
  transition: all .2s;
}
.portfolio-filter-btn:hover,
.portfolio-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ── Testimonials ── */
.testimonial-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: .75rem; right: 1.5rem;
  font-size: 5rem;
  line-height: 1;
  color: var(--primary-xlt);
  font-family: Georgia, serif;
}
.stars { color: #f59e0b; letter-spacing: .1em; }

/* ── FAQ ── */
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-answer.open { max-height: 600px; }
.faq-toggle svg { transition: transform .3s ease; }
.faq-item.open .faq-toggle svg { transform: rotate(45deg); }
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq-item.open {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,107,69,.07);
}
.faq-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.faq-toggle:hover { background: var(--gray-50); }
.faq-item.open .faq-toggle { background: #f0fdf4; }

/* ── Quote form section ── */
.quote-section {
  background: linear-gradient(135deg, #0e3d24 0%, var(--primary) 50%, #0a2e1b 100%);
  position: relative;
  overflow: hidden;
}
.quote-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* ── Forms ── */
.form-input {
  width: 100%;
  padding: .8rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  background: white;
  color: var(--gray-900);
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,107,69,.12);
}
.form-input::placeholder { color: #9ca3af; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 1rem; padding-right: 2.5rem; }

/* ── Feature grid icons ── */
.feature-icon {
  width: 48px; height: 48px;
  background: var(--primary-xlt);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}

/* ── Contact page ── */
.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  background: white;
  transition: border-color .2s, box-shadow .2s;
}
.contact-info-item:hover {
  border-color: rgba(27,107,69,.25);
  box-shadow: var(--shadow-sm);
}
.contact-icon {
  width: 48px; height: 48px;
  background: var(--primary-xlt);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  shrink: 0;
  flex-shrink: 0;
}

/* ── Alert ── */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); font-size: .875rem; display: flex; align-items: center; gap: .75rem; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ── Admin sidebar ── */
.admin-nav a.active { background-color: var(--primary); color: white; }
.admin-nav a:not(.active):hover { background-color: var(--gray-100); }

/* ── Animate on scroll ── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Spinner ── */
.spinner { border: 3px solid #f3f3f3; border-top: 3px solid var(--primary); border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.divider-leaf {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--gray-200);
  margin: 2rem 0;
}
.divider-leaf::before, .divider-leaf::after { content: ''; flex: 1; height: 1px; background: currentColor; }

/* ── WYSIWYG output ── */
.wysiwyg-output h1,.wysiwyg-output h2,.wysiwyg-output h3,.wysiwyg-output h4{font-weight:700;color:#111827;margin-top:1.25em;margin-bottom:.5em;line-height:1.3}
.wysiwyg-output h1{font-size:1.75rem}.wysiwyg-output h2{font-size:1.4rem}.wysiwyg-output h3{font-size:1.15rem}.wysiwyg-output h4{font-size:1rem}
.wysiwyg-output p{margin-bottom:.85em}
.wysiwyg-output ul{list-style:disc;padding-left:1.5em;margin-bottom:.85em}
.wysiwyg-output ol{list-style:decimal;padding-left:1.5em;margin-bottom:.85em}
.wysiwyg-output li{margin-bottom:.35em}
.wysiwyg-output strong,.wysiwyg-output b{font-weight:700}
.wysiwyg-output em,.wysiwyg-output i{font-style:italic}
.wysiwyg-output a{color:var(--primary);text-decoration:underline}
.wysiwyg-output blockquote{border-left:3px solid var(--primary);padding-left:1em;color:#6b7280;font-style:italic;margin:1em 0}
.wysiwyg-output table{width:100%;border-collapse:collapse;margin-bottom:.85em}
.wysiwyg-output th,.wysiwyg-output td{border:1px solid var(--gray-200);padding:.5em .75em;text-align:left}
.wysiwyg-output th{background:var(--gray-50);font-weight:600}
.wysiwyg-output figure.image{margin:1em 0}.wysiwyg-output figure.image img{max-width:100%;border-radius:.5rem}
.wysiwyg-output hr{border:none;border-top:1px solid var(--gray-200);margin:1.5em 0}

/* ── Blog cards ── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Portfolio single ── */
.gallery-thumb { aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); cursor: pointer; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-thumb:hover img { transform: scale(1.08); }

/* ── Breadcrumb ── */
.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: #9ca3af; }
.breadcrumb a { color: #9ca3af; transition: color .2s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span.sep { color: #d1d5db; }

/* ── Page hero (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, #061a0e 0%, var(--primary) 100%);
  color: white;
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.page-hero > * { position: relative; z-index: 1; }

/* ── Reading Progress Bar ── */
#reading-progress {
  position: fixed; top: 0; left: 0; width: 0%;
  height: 3px; background: linear-gradient(90deg, var(--primary), var(--primary-light));
  z-index: 9999; transition: width .1s linear;
  box-shadow: 0 0 8px rgba(27,107,69,.4);
}

/* ── Back to Top ── */
#back-to-top {
  position: fixed; bottom: 6rem; right: 1.5rem;
  z-index: 49;
  width: 2.75rem; height: 2.75rem;
  background: var(--primary);
  color: white;
  border: none; border-radius: .75rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(27,107,69,.35);
  opacity: 0; transform: translateY(20px);
  transition: opacity .3s ease, transform .3s ease, background .2s;
  pointer-events: none;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover { background: var(--primary-dark); }

/* ── Table of Contents ── */
.toc-widget {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.toc-widget h4 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #6b7280;
  margin-bottom: .75rem;
}
.toc-widget ol {
  counter-reset: toc;
  list-style: none;
  padding: 0; margin: 0;
}
.toc-widget li {
  counter-increment: toc;
  margin-bottom: .4rem;
}
.toc-widget li a {
  display: flex; align-items: baseline; gap: .5rem;
  font-size: .875rem; font-weight: 500;
  color: #374151;
  text-decoration: none;
  padding: .25rem 0;
  transition: color .2s;
}
.toc-widget li a:hover { color: var(--primary); }
.toc-widget li a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: .75rem; font-weight: 700;
  color: var(--primary);
  opacity: .6;
}

/* ── Blog card reading time ── */
.reading-time {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .75rem; color: #9ca3af;
}

/* ── Responsive tweaks ── */
@media (max-width: 640px) {
  .stat-number { font-size: 2rem; }
  .hero-badge  { font-size: .72rem; padding: .35rem .9rem; }
}

/* ── Print styles ── */
@media print {
  header, footer, #wa-float, #back-to-top, #reading-progress,
  .cookie-banner, .newsletter-popup, .page-hero::after,
  .toc-widget, nav { display: none !important; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
  .wysiwyg-output { max-width: 100% !important; }
  .section { padding: 1rem 0; }
}

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ── Skip to content (a11y) ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: .75rem 1.5rem;
  background: var(--primary);
  color: white;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus { left: 1rem; }
