/* Preline UI Design System Enhancements for Celiol Dispenser */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: var(--font-mono) !important;
}

.font-sans {
  font-family: var(--font-sans) !important;
}

/* Preline Accordion Smooth Transitions */
.hs-accordion-content {
  transition: all 0.3s ease-in-out;
}
.hs-accordion:not(.active) .hs-accordion-content {
  display: none;
}
.hs-accordion.active .hs-accordion-toggle i[data-lucide="chevron-down"] {
  transform: rotate(180deg);
}

/* Preline Tabs Smooth Toggle */
[role="tabpanel"].hidden {
  display: none !important;
}

/* Preline Overlay Backdrop */
.hs-overlay-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 70;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f8fafc;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Hide scrollbar for mobile touch carousels/tabs while allowing scrolling */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Preline Carousel Core Styles */
.hs-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.hs-carousel-body {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.hs-carousel-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}
/* Carousel Dot Indicators (Hero carousel span dots only) */
.hs-carousel-pagination > span.active {
  background-color: #0369a1 !important;
  border-color: #0369a1 !important;
  width: 1.5rem !important;
  border-radius: 9999px !important;
}

/* Ensure sector buttons inside pagination keep their proper width and white active card styling */
.hs-carousel-pagination button.hs-carousel-pagination-item {
  width: auto !important;
  white-space: nowrap !important;
}
.hs-carousel-pagination button.hs-carousel-pagination-item.active {
  background-color: #ffffff !important;
  color: #111827 !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1) !important;
}

/* Sector Pills Track & Smooth Drag/Scroll Controls */
#sectorPillsTrack {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
#sectorPillsTrack.cursor-grabbing {
  cursor: grabbing;
}

/* Responsive Touch Target Sizing & Form Controls (Prevents iOS auto-zoom on input focus) */
@media (max-width: 640px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  select,
  textarea {
    font-size: 15px;
  }
  .hs-carousel-pagination button.hs-carousel-pagination-item {
    font-size: 11px !important;
    padding: 0.5rem 0.75rem !important;
  }
}

/* Running Cards Testimonials Marquee */
@keyframes marquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
  will-change: transform;
}

.animate-marquee:hover,
.animate-marquee:focus-within {
  animation-play-state: paused;
}

@media (hover: none) {
  .animate-marquee:active {
    animation-play-state: paused;
  }
}

/* Official Executive Corporate Print Rules for Technical Datasheet (Scandinavian Minimalism) */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 8.5pt !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  }

  /* Sembunyikan seluruh komponen antarmuka web saat mencetak */
  body * {
    visibility: hidden;
  }

  /* Tampilkan hanya lembar spesifikasi eksekutif resmi */
  #officialPrintDatasheet,
  #officialPrintDatasheet * {
    visibility: visible !important;
  }

  #officialPrintDatasheet {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    display: block !important;
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .no-print,
  #productDetailModal,
  #catalogRfqModal,
  header,
  footer,
  nav {
    display: none !important;
  }

  @page {
    size: A4 portrait;
    margin: 8mm 10mm 8mm 10mm;
  }

  /* Tabel Spesifikasi Eksekutif & Katalog: Bersih Tanpa Background Color di Teks, 1px border #E2E8F0 */
  .exec-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 3px !important;
    margin-bottom: 5px !important;
    background-color: #ffffff !important;
  }

  .exec-table th,
  .exec-table td {
    border: 1px solid #e2e8f0 !important;
    padding: 4.5px 8px !important;
    font-size: 7.5pt !important;
    vertical-align: middle !important;
    background-color: #ffffff !important;
  }

  .exec-table th {
    background-color: #ffffff !important;
    color: #1e293b !important;
    font-weight: 800 !important;
    border: 1px solid #e2e8f0 !important;
    border-bottom: 2px solid #1e293b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    font-size: 7pt !important;
  }

  /* Hindari pemotongan halaman di elemen dokumen */
  tr, .print-avoid-break {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    background-color: #ffffff !important;
  }

  .exec-page-break {
    page-break-before: always !important;
    break-before: always !important;
  }
}

/* Editorial Single Article Polish & Typography Support */
.article-body {
  font-size: 15px;
  line-height: 1.8;
  color: #334155;
}

@media (min-width: 640px) {
  .article-body {
    font-size: 16px;
  }
}

.article-body h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  line-height: 1.35;
}

@media (min-width: 640px) {
  .article-body h2 {
    font-size: 1.55rem;
  }
}

.article-body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.article-body p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.article-body ul {
  list-style-type: disc !important;
  padding-left: 1.5rem !important;
  margin-top: 1rem !important;
  margin-bottom: 1.5rem !important;
}

.article-body ul li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-body ol {
  list-style-type: decimal !important;
  padding-left: 1.5rem !important;
  margin-top: 1rem !important;
  margin-bottom: 1.5rem !important;
}

.article-body ol li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-body strong {
  color: #0f172a;
  font-weight: 700;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.article-body table th {
  background-color: transparent;
  color: #0f172a;
  font-weight: 700;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid #cbd5e1;
}

.article-body table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.article-body table tr:last-child td {
  border-bottom: none;
}

.article-body table tr:hover td {
  background-color: transparent;
}
