/* ============================================================
   Janosci — Global Bootstrap 5 Enhancement Layer
   Loaded last: polish, spacing, responsive fixes, UI tokens
   ============================================================ */

:root {
  --js-primary: #2563eb;
  --js-primary-dark: #1d4ed8;
  --js-accent: #f59e0b;
  --js-navy: #0f172a;
  --js-muted: #64748b;
  --js-border: #e2e8f0;
  --js-radius: 12px;
  --js-radius-lg: 16px;
  --js-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --js-shadow-sm: 0 2px 12px rgba(15, 23, 42, 0.06);
  --js-section-y: clamp(2.5rem, 5vw, 4rem);
  --js-header-logo-h: 72px;
  --js-header-logo-max-w: 240px;
  --js-footer-logo-h: 72px;
  --js-auth-logo-h: 64px;
  --js-navbar-logo-h: 48px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Logo (PNG) ── */
.header-logo-img {
  height: var(--js-header-logo-h);
  width: auto;
  max-width: var(--js-header-logo-max-w);
  object-fit: contain;
  display: block;
  filter: none;
}
.footer-logo-img {
  height: var(--js-footer-logo-h, 72px);
  width: auto;
  object-fit: contain;
  filter: none;
}
.auth-logo-img {
  height: var(--js-auth-logo-h);
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}
.navbar-brand-logo,
.sidebar-brand-logo {
  height: var(--js-navbar-logo-h);
  width: auto;
  object-fit: contain;
}

/* ── Sections ── */
.section {
  padding-top: var(--js-section-y);
  padding-bottom: var(--js-section-y);
}
.section-sm {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
}
.section-header h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: var(--js-navy);
  margin-bottom: 0.5rem;
}
.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--js-primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 0.65rem;
}

/* ── Page hero (inner pages) ── */
.page-hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #2563eb 100%);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}
.page-hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.15), transparent 50%);
  pointer-events: none;
}
.page-hero-banner .container {
  position: relative;
  z-index: 1;
}
.page-hero-banner h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #fff;
}
.page-hero-banner p {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  max-width: 560px;
  margin-bottom: 0;
}
.page-hero-breadcrumb {
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}
.page-hero-breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}
.page-hero-breadcrumb a:hover { color: #fff; }
.page-hero-breadcrumb span { color: rgba(255, 255, 255, 0.45); margin: 0 0.35rem; }

/* ── Bootstrap buttons ── */
.btn {
  font-weight: 600;
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--js-primary), var(--js-primary-dark));
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #3b82f6, var(--js-primary));
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}
.btn-gold {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0f172a;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.btn-gold:hover {
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}
.btn-outline-primary {
  border-width: 2px;
  font-weight: 600;
}

/* ── Forms ── */
.form-control,
.form-select {
  border: 1.5px solid var(--js-border);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--js-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--js-navy);
  margin-bottom: 0.4rem;
}

/* ── Cards ── */
.card,
.contact-card,
.contact-form-card,
.value-card,
.testimonial-card {
  border: 1px solid var(--js-border);
  border-radius: var(--js-radius-lg);
  box-shadow: var(--js-shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}
.contact-card,
.contact-form-card {
  background: #fff;
  padding: clamp(1.25rem, 3vw, 2rem);
  height: 100%;
}
.contact-card h2,
.contact-form-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.contact-info-list { display: flex; flex-direction: column; gap: 1rem; }
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem;
  background: #f8fafc;
  border-radius: var(--js-radius);
  border: 1px solid var(--js-border);
}
.info-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--js-primary), var(--js-primary-dark));
  color: #fff;
  border-radius: 10px;
  font-size: 1rem;
}
.info-text span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--js-muted);
  margin-bottom: 0.15rem;
}
.info-text strong {
  font-size: 0.92rem;
  color: var(--js-navy);
  font-weight: 700;
}
.value-card {
  background: #fff;
  padding: 1.5rem;
  text-align: center;
  height: 100%;
}
.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--js-shadow);
}
.value-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  color: var(--js-primary);
  border-radius: 14px;
  font-size: 1.35rem;
}
.stat-box {
  background: #f8fafc;
  border: 1px solid var(--js-border);
  border-radius: var(--js-radius);
  padding: 1.25rem;
  text-align: center;
}

/* ── Hero slider ── */
.hero-slider-section { margin-bottom: 0; }
.hero-swiper {
  width: 100%;
  height: clamp(380px, 55vh, 580px);
  border-radius: 0;
  overflow: hidden;
}
.hero-swiper .slide-img {
  loading: lazy;
}

/* ── Why choose us ── */
.why-section { background: #f8fafc; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
.why-feature-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: box-shadow 0.2s;
}
.why-feature-card:hover { box-shadow: var(--js-shadow-sm); }
.why-feature-card i {
  color: var(--js-primary);
  font-size: 0.9rem;
  width: 18px;
  flex-shrink: 0;
}
.why-feature-card strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--js-navy);
}
.why-feature-card span {
  font-size: 0.65rem;
  color: #94a3b8;
}

/* ── FAQ accordion ── */
.faq-accordion .accordion-item,
.home-faq-item {
  border: 1px solid var(--js-border);
  border-radius: 14px !important;
  margin-bottom: 0.65rem;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.faq-accordion .accordion-button,
.home-faq-accordion .accordion-button {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--js-navy);
  padding: 1rem 1.15rem;
  box-shadow: none;
}
.faq-accordion .accordion-button:not(.collapsed),
.home-faq-accordion .accordion-button:not(.collapsed) {
  background: rgba(23, 105, 232, 0.08);
  color: #1155c7;
}
.faq-accordion .accordion-body,
.home-faq-accordion .accordion-body {
  font-size: 0.94rem;
  color: #334155;
  line-height: 1.65;
  padding: 0 1.15rem 1.1rem;
}

/* ── About snippet (homepage) ── */
.about-snippet {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.about-snippet h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
}
.about-contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.88rem;
  color: var(--js-muted);
}
.about-contact-row i { color: var(--js-primary); margin-right: 0.35rem; }

/* ── Lazy load fade-in ── */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.35s ease;
}
img[loading="lazy"].is-loaded,
img[loading="lazy"]:not([data-src]) {
  opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  :root {
    --js-header-logo-h: 56px;
    --js-header-logo-max-w: 185px;
    --js-footer-logo-h: 58px;
    --js-auth-logo-h: 56px;
    --js-navbar-logo-h: 40px;
  }
  .header-logo-tagline { display: none !important; }
}

@media (max-width: 767px) {
  .why-grid { grid-template-columns: 1fr; }
  .hero-swiper { height: clamp(340px, 52vh, 460px); }
  .contact-card { margin-bottom: 0; }
}

@media (max-width: 575px) {
  .btn-lg { padding: 0.65rem 1.25rem; font-size: 0.9rem; }
}

/* Products page sidebar layout */
@media (max-width: 991px) {
  .products-layout { grid-template-columns: 1fr !important; }
  .sidebar { position: static !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
