/* PidoSoft shared stylesheet */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.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;
}

/* ─── Brand & WCAG AA accessible colors ─────────────── */
.hero-gradient     { background: linear-gradient(135deg, #173451 0%, #1e4a72 100%); }
.btn-primary       { background-color: #c25400; color: #ffffff; transition: background-color .2s; }
.btn-primary:hover { background-color: #a64400; color: #ffffff; }
.btn-outline       { border: 2px solid #b94e00; color: #b94e00; transition: all .2s; }
.btn-outline:hover { background-color: #c25400; border-color: #c25400; color: #ffffff; }
.text-primary      { color: #b94e00; }
.bg-primary        { background-color: #c25400; }
.bg-secondary      { background-color: #173451; }
.border-primary    { border-color: #c25400; }
.bg-warm           { background: #fff7ee; }
.hero-accent       { color: #c25400; }
.who-heading       { color: #173451; }

.group:hover .group-hover\:text-primary { color: #b94e00; }

/* WhatsApp button & link (light + dark aware) */
.wa-link { color: #15803d; }
.wa-btn {
  border: 1px solid #16a34a;
  color: #15803d;
  background-color: transparent;
}
.wa-btn:hover { background-color: #f0fdf4; }

/* Contact form feedback alerts (light + dark aware) */
.alert-success {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.alert-error {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Accessible focus outlines */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #f68c2c;
  outline-offset: 2px;
}

/* ─── Mobile navigation ─────────────────────────────── */
.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.desktop-quote-btn {
  display: none;
}
.mobile-drawer {
  display: none;
  background-color: #132c45;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-drawer.open {
  display: block;
}
.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #d1d5db;
  transition: background-color .15s, color .15s;
}
.mobile-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.mobile-nav-link.active {
  background-color: rgba(246, 140, 44, 0.16);
  color: #f68c2c;
  font-weight: 600;
}
@media (min-width: 640px) {
  .desktop-quote-btn { display: inline-flex; }
}
@media (min-width: 768px) {
  .mobile-menu-btn { display: none; }
  .mobile-drawer,
  .mobile-drawer.open { display: none; }
}

/* ─── Service sidebar sticky wrapper (no card overlap) ─ */
@media (min-width: 1024px) {
  .service-sidebar-sticky {
    position: sticky;
    top: 6.5rem;
    align-self: start;
  }
}

/* ─── Blog sticky category bar (clears h-20 / 80px nav) ─ */
.blog-cat-bar {
  position: sticky;
  top: 5rem;
  z-index: 40;
  background-color: #ffffff;
}

/* ─── Blog prose (article body) ─────────────────────── */
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 1.75rem 0 .75rem; color: #111827; }
.prose h3 { font-size: 1.25rem; font-weight: 600; margin: 1.5rem 0 .5rem; color: #111827; }
.prose p  { margin-bottom: 1rem; color: #374151; line-height: 1.75; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; color: #374151; }
.prose li { margin-bottom: .35rem; line-height: 1.65; }
.prose blockquote {
  border-left: 4px solid #c25400;
  padding: .75rem 1.25rem;
  background: #fff7ee;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}
.prose a    { color: #b94e00; text-decoration: underline; }
.prose code { background: #f3f4f6; padding: .1rem .35rem; border-radius: 4px; font-size: .875em; }
.prose pre  { background: #1f2937; color: #f9fafb; padding: 1rem 1.25rem; border-radius: 8px; overflow-x: auto; margin: 1rem 0; }
.prose img  { max-width: 100%; border-radius: 8px; margin: 1.5rem 0; }

/* ─── Dark mode ─────────────────────────────────────── */
.dark body { background: #0f172a; color: #dce8f5; }

.dark .bg-white     { background: #1e293b !important; }
.dark .bg-gray-50   { background: #152034 !important; }
.dark .bg-gray-100  { background: #1e293b !important; }
.dark .bg-gray-800  { background: #162236 !important; }
.dark .bg-gray-900  { background: #040d1a !important; }
.dark .bg-warm      { background: #162236 !important; }
.dark .blog-cat-bar { background: #1e293b !important; border-color: #243348 !important; }

.dark .text-gray-900,
.dark .text-gray-800 { color: #e8edf5 !important; }
.dark .text-gray-700,
.dark .text-gray-600 { color: #b4c7dc !important; }
.dark .text-gray-500,
.dark .text-gray-400 { color: #94aec6 !important; }

.dark .text-primary,
.dark .hero-accent,
.dark .section-tag,
.dark .prose a,
.dark .group:hover .group-hover\:text-primary { color: #f68c2c !important; }

.dark .btn-outline { border-color: #f68c2c; color: #f68c2c; }
.dark .btn-outline:hover { background-color: #c25400; border-color: #c25400; color: #ffffff; }
.dark .who-heading { color: #e8edf5 !important; }

.dark .wa-link { color: #4ade80 !important; }
.dark .wa-btn {
  border-color: #22c55e;
  color: #4ade80;
}
.dark .wa-btn:hover { background-color: rgba(34, 197, 94, 0.14); }

.dark .alert-success {
  background-color: rgba(22, 163, 74, 0.16);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.4);
}
.dark .alert-error {
  background-color: rgba(220, 38, 38, 0.18);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.4);
}

.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-b,
.dark .border-t { border-color: #243348 !important; }
.dark .border-gray-800 { border-color: #1a3352 !important; }

.dark .shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, .5) !important; }
.dark .shadow-md { box-shadow: 0 4px 12px rgba(0, 0, 0, .6) !important; }

.dark input,
.dark select,
.dark textarea {
  background: #0f172a !important;
  color: #dce8f5 !important;
  border-color: #334155 !important;
}

.dark .stats-band { background: #0d2137 !important; }
.dark [style*="background:#fff7ee"] { background: #162236 !important; }

.dark .prose h2, .dark .prose h3 { color: #e8edf5 !important; }
.dark .prose p,  .dark .prose li { color: #b4c7dc !important; }
.dark .prose blockquote { background: #162236 !important; border-left-color: #f68c2c; }
.dark .prose code { background: #243348 !important; color: #e8edf5 !important; }

/* Logo glow on dark surfaces */
header img[alt="PidoSoft"] {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .7))
          drop-shadow(0 0 3px rgba(255, 255, 255, .35));
}
footer img[alt="PidoSoft"] {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .6))
          drop-shadow(0 0 2px rgba(255, 255, 255, .3));
}

/* ─── Hero section (light/dark aware) ───────────────── */
.hero-section {
  background: linear-gradient(135deg, #ffffff 0%, #fff7ee 100%);
}
.dark .hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #0d2137 100%);
}
.hero-badge {
  background: rgba(194, 84, 0, .12);
  color: #9c4100;
}
.dark .hero-badge {
  background: rgba(246, 140, 44, .18) !important;
  color: #f68c2c !important;
}
.hero-outline-btn {
  border: 2px solid #cbd5e1;
  color: #1f2937;
  transition: background .2s, border-color .2s, color .2s;
}
.hero-outline-btn:hover { background: #f1f5f9; }
.dark .hero-outline-btn {
  border-color: #334155;
  color: #cbd5e1;
}
.dark .hero-outline-btn:hover { background: #1e293b; }
.dark .hero-section img {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .6))
          drop-shadow(0 0 4px rgba(255, 255, 255, .3));
}

#themeToggle { transition: all .2s; }

/* ─── Keyframes ─────────────────────────────────────── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes shimmerSlide {
  from { transform: skewX(-15deg) translateX(-250%); }
  to   { transform: skewX(-15deg) translateX(350%); }
}

/* ─── Hero stagger ──────────────────────────────────── */
.hs > * {
  opacity: 0;
  animation: heroFadeUp .85s cubic-bezier(.22, 1, .36, 1) both;
}
.hs > *:nth-child(1) { animation-delay: .08s; }
.hs > *:nth-child(2) { animation-delay: .18s; }
.hs > *:nth-child(3) { animation-delay: .28s; }
.hs > *:nth-child(4) { animation-delay: .40s; }
.hs > *:nth-child(5) { animation-delay: .52s; }

.hs-r {
  opacity: 0;
  animation: heroFadeRight .9s cubic-bezier(.22, 1, .36, 1) .3s both;
}

/* ─── Scroll-reveal (no-JS safe: only hides when html.js is set) ── */
.js [data-sr] {
  opacity: 0;
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1),
              transform .8s cubic-bezier(.22, 1, .36, 1);
  will-change: transform, opacity;
}
.js [data-sr="l"] { transform: translateX(-52px); }
.js [data-sr="r"] { transform: translateX(52px); }
.js [data-sr="u"] { transform: translateY(40px); }
.js [data-sr="s"] { transform: scale(.93); }
.js [data-sr].in  { opacity: 1 !important; transform: none !important; }

[data-d="1"] { transition-delay: .07s; }
[data-d="2"] { transition-delay: .14s; }
[data-d="3"] { transition-delay: .21s; }
[data-d="4"] { transition-delay: .28s; }
[data-d="5"] { transition-delay: .35s; }
[data-d="6"] { transition-delay: .42s; }
[data-d="7"] { transition-delay: .49s; }
[data-d="8"] { transition-delay: .56s; }

/* ─── Premium card lift ─────────────────────────────── */
.card-hover {
  transition: transform .35s cubic-bezier(.22, 1, .36, 1),
              border-color .2s ease,
              box-shadow .35s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  border-color: #f68c2c;
  box-shadow: 0 16px 48px rgba(246, 140, 44, .18);
}

/* ─── Button shimmer ────────────────────────────────── */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .24), transparent);
  transform: skewX(-15deg) translateX(-250%);
  animation: shimmerSlide 2.4s ease 1.2s infinite;
}
.btn-primary:hover::after { animation-play-state: paused; }

/* ─── Nav scroll enhancement ────────────────────────── */
header { transition: box-shadow .3s ease; }
header.nav-scrolled { box-shadow: 0 6px 36px rgba(0, 0, 0, .38) !important; }

header .nav-lnk { position: relative; padding-bottom: 3px; }
header .nav-lnk::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 2px;
  background: #f68c2c;
  border-radius: 2px;
  transition: left .28s cubic-bezier(.22, 1, .36, 1),
              right .28s cubic-bezier(.22, 1, .36, 1);
}
header .nav-lnk:hover::after,
header .nav-lnk.active::after { left: 0; right: 0; }

.stat-cell { transition: background .25s ease; }

/* ─── Section heading accent line ───────────────────── */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #b94e00;
  margin-bottom: .75rem;
}
.section-tag::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.section-tag.before\:hidden::before,
.section-tag--center::before {
  display: none;
}

/* ─── Reduced motion accessibility ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hs > *,
  .hs-r {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .js [data-sr] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .btn-primary::after {
    animation: none !important;
    display: none;
  }
  .card-hover,
  .card-hover:hover {
    transform: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
  }
}
