/* main.css - Mahir Akuntansi® Global Styles */

/* ======= GLOBAL MOBILE SAFE ======= */
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }
* { box-sizing: border-box; }

/* ======= UTILITIES ======= */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 1.5rem; }
.section-sm { padding: 3rem 1.5rem; }
.section-inner { max-width: 1280px; margin: 0 auto; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--orange-lt);
  color: var(--orange);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .35rem .85rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--dark);
  margin-bottom: .75rem;
  line-height: 1.2;
  text-align: inherit;
}
.section-title span { color: var(--orange); }
.section-subtitle {
  color: var(--mid);
  font-size: 1.05rem;
  max-width: 620px;
  line-height: 1.7;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ======= BUTTONS ======= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  letter-spacing: .01em;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dk); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(249,115,22,.35); }
.btn-outline { background: transparent; color: var(--orange); border-color: var(--orange); }
.btn-outline:hover { background: var(--orange); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark2); transform: translateY(-2px); }
.btn-sm { padding: .5rem 1rem; font-size: .82rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1ebe5b; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,.3); }

/* ======= BADGE/LABEL ======= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.badge-orange { background: var(--orange); color: #fff; }
.badge-red { background: #EF4444; color: #fff; }
.badge-blue { background: #3B82F6; color: #fff; }
.badge-purple { background: #8B5CF6; color: #fff; }
.badge-green { background: #10B981; color: #fff; }
.badge-gray { background: var(--light); color: var(--mid); }

/* ======= CARDS ======= */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card-img {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--light);
  position: relative;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-img img { transform: scale(1.05); }
.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange-lt), #fff);
  color: var(--orange);
  font-size: 3rem;
}
.card-labels {
  position: absolute;
  top: .75rem;
  left: .75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}
.card-body { padding: 1.25rem; }
.card-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: .75rem;
}
.card-price .old-price {
  font-size: .85rem;
  color: var(--mid);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: .35rem;
}
.card-footer {
  padding: .75rem 1.25rem 1.25rem;
  display: flex;
  gap: .5rem;
}

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

/* ======= TABS ======= */
.tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.2rem;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--mid);
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.tab-btn:hover, .tab-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ======= TESTIMONIAL CARD ======= */
.testi-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  position: relative;
}
.testi-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 4rem;
  color: var(--orange);
  opacity: .15;
  font-family: Georgia, serif;
  line-height: 1;
}
.testi-stars { color: #F59E0B; font-size: .85rem; margin-bottom: .75rem; }
.testi-produk-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--orange-lt); color: var(--orange-dk);
  border: 1px solid rgba(167,154,138,.25);
  font-family: var(--font); font-size: .7rem; font-weight: 700;
  letter-spacing: .03em; line-height: 1.4;
  padding: .32rem .8rem; border-radius: 100px;
  margin-bottom: .9rem; max-width: 100%; text-decoration: none;
}
.testi-produk-badge i { font-size: .68rem; flex-shrink: 0; color: var(--orange); }
.testi-produk-badge span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px;
}
a.testi-produk-badge:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
a.testi-produk-badge:hover i { color: #fff; }
.testi-text { color: var(--dark3); font-size: .92rem; line-height: 1.7; margin-bottom: 1.25rem; }
.testi-author { display: flex; align-items: center; gap: .75rem; }
.testi-avatar {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dk));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}
.testi-name { font-weight: 700; font-size: .9rem; color: var(--dark3); }
.testi-role { font-size: .78rem; color: var(--mid); }

/* ======= TESTIMONIAL SCROLLING COLUMNS ======= */
.testi-section { overflow: hidden; }
.testi-columns-wrap {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  max-height: 740px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}
.testi-col {
  flex: 1 1 0;
  max-width: 360px;
  overflow: hidden;
}
.testi-col-md { display: none; }
.testi-col-lg { display: none; }
.testi-col-track {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  animation-name: testiScroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}
.testi-columns-wrap:hover .testi-col-track { animation-play-state: paused; }
@keyframes testiScroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
@media (min-width: 768px) {
  .testi-col-md { display: block; }
}
@media (min-width: 1024px) {
  .testi-col-lg { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .testi-col-track { animation: none; }
}

/* ======= MITRA LOGO CLOUD (adaptasi InfiniteSlider + ProgressiveBlur) ======= */
.mitra-cloud {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.75rem 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.mitra-track-wrap {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.mitra-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: mitraScroll 36s linear infinite;
  will-change: transform;
}
.mitra-track-wrap:hover .mitra-track { animation-play-state: paused; }
@keyframes mitraScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.mitra-track-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  height: 104px;
}
.mitra-logo {
  height: 72px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  opacity: .75;
  transition: var(--transition);
  filter: grayscale(30%);
}
.mitra-track-item:hover .mitra-logo {
  opacity: 1;
  transform: scale(1.08);
  filter: grayscale(0%);
}
.mitra-badge {
  background: var(--light);
  border-radius: 10px;
  padding: .6rem 1.2rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  color: var(--mid);
  font-size: .82rem;
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: var(--transition);
}
.mitra-track-item:hover .mitra-badge { border-color: var(--orange); color: var(--orange); background: var(--orange-lt); }
@media (max-width: 640px) {
  .mitra-cloud { padding: 1.25rem 0; }
}

/* ======= GALLERY FAN (kartu 3D bertumpuk) ======= */
.gallery-fan-section { padding: 5rem 1.5rem; }
.gallery-fan-card {
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(252, 247, 223, 0.5);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(167, 154, 138, 0.25);
  border-radius: 24px;
  overflow: hidden;
  padding-bottom: 2.5rem;
}
.gallery-fan-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  margin: 1.5rem 0 4rem;
  transition: transform .25s ease, background .25s ease;
}
.gallery-fan-btn:hover { background: var(--orange-dk); transform: translateY(-2px); }
.gallery-fan-btn i { transition: transform .25s ease; }
.gallery-fan-btn:hover i { transform: translateX(3px); }

.gallery-fan-desktop {
  position: relative;
  overflow: hidden;
  height: 480px;
  margin-bottom: -20px;
}
.gallery-fan-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  height: 100%;
  padding: 0 1rem;
}
.gallery-fan-card-item {
  display: block;
  flex-shrink: 0;
  margin-left: -185px;
  cursor: default;
  transition: transform .35s cubic-bezier(.25,.1,.25,1), opacity .4s ease;
}
.gallery-fan-card-item:first-child { margin-left: 0; }
.gallery-fan-card-inner {
  position: relative;
  width: 260px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0.8px 0 0.8px rgba(62,54,48,.05),
    2.4px 0 2.4px rgba(62,54,48,.10),
    6.4px 0 6.4px rgba(62,54,48,.18),
    20px 0 20px rgba(62,54,48,.30);
}
.gallery-fan-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Desktop besar / monitor lebar */
@media (min-width: 1280px) {
  .gallery-fan-card-inner { width: 320px; }
  .gallery-fan-card-item { margin-left: -228px; }
}

/* Laptop / PC standar (1024px - 1279px) */
@media (max-width: 1279px) and (min-width: 1024px) {
  .gallery-fan-desktop { height: 420px; }
  .gallery-fan-card-inner { width: 240px; }
  .gallery-fan-card-item { margin-left: -170px; }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  .gallery-fan-desktop { height: 320px; }
  .gallery-fan-card-inner { width: 175px; }
  .gallery-fan-card-item { margin-left: -125px; }
}

.gallery-fan-mobile { display: none; }

/* HP (di bawah 768px) */
@media (max-width: 767px) {
  .gallery-fan-desktop { display: none; }
  .gallery-fan-mobile {
    display: block;
    padding: 0 0 1rem;
    overflow: hidden;
  }
  .gallery-fan-marquee {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: gallery-fan-scroll 28s linear infinite;
  }
  .gallery-fan-marquee:hover { animation-play-state: paused; }
  .gallery-fan-marquee-track {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
  }
  .gallery-fan-marquee-item {
    display: block;
    flex-shrink: 0;
    width: 220px;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(62,54,48,.25);
  }
  .gallery-fan-marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  @keyframes gallery-fan-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-33.3333%); }
  }
}

/* HP kecil (di bawah 400px) - perkecil lagi marquee */
@media (max-width: 400px) {
  .gallery-fan-marquee-item { width: 165px; }
  .gallery-fan-card { padding-bottom: 1.75rem; }
  .gallery-fan-section { padding: 3.5rem 1rem; }
}

@media (max-width: 768px) {
  .mitra-track-item { padding: 0 1.25rem; height: 84px; }
  .mitra-logo { height: 54px; max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .mitra-track { animation: none; }
}

/* ======= STATS ======= */
.stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
}
.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: .4rem;
}
.stat-label { color: var(--mid); font-size: .88rem; font-weight: 500; }

/* ======= FORMS ======= */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: .875rem;
  color: var(--dark);
  margin-bottom: .45rem;
}
.form-control, .form-select {
  width: 100%;
  padding: .75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: var(--font);
  font-size: .9rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color .25s;
  outline: none;
}
.form-control:focus, .form-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
textarea.form-control { min-height: 140px; resize: vertical; }

/* ======= ALERTS ======= */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: .9rem;
  margin-bottom: 1.25rem;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ======= PAGINATION ======= */
.pagination {
  display: flex;
  gap: .35rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
  border: 2px solid var(--border);
  color: var(--dark3);
  transition: var(--transition);
}
.pagination a:hover, .pagination span.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ======= ARTIKEL CARD ======= */
.section-head-center { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-cta-center { text-align: center; margin-top: 2.5rem; }

.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2.5rem; flex-wrap: wrap; gap: 1rem; }

.artikel-card { display: block; text-decoration: none; color: inherit; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); transition: var(--transition); }
.artikel-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.artikel-card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--light); }
.artikel-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.artikel-card:hover .artikel-card-img img { transform: scale(1.05); }
.artikel-card-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; background: linear-gradient(135deg, var(--orange-lt), #fff); color: var(--orange); }
.artikel-card-body { padding: 1.5rem; }
.artikel-meta { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; font-size: .8rem; color: var(--mid); }
.artikel-meta span { display: flex; align-items: center; gap: .3rem; }
.artikel-card-title { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: .6rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.artikel-card-desc { font-size: .88rem; color: var(--mid); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.produk-card-btn-order { flex: 1; }

/* ======= DOKUMENTASI CARD ======= */
.dok-card { border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 4/3; cursor: pointer; }
.dok-card img, .dok-card-bg { width: 100%; height: 100%; object-fit: cover; display: block; }
.dok-card-bg { background: linear-gradient(135deg, var(--dark2), var(--dark)); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: rgba(255,255,255,.2); }
.dok-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 60%); opacity: 0; transition: var(--transition); display: flex; align-items: flex-end; padding: 1rem; }
.dok-card:hover .dok-card-overlay { opacity: 1; }
.dok-card-label { color: #fff; font-size: .85rem; font-weight: 600; }

/* ======= RESPONSIVE ======= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: 3.5rem 1.25rem; }
  .section-sm { padding: 2rem 1.25rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 1.75rem; }
  .section-subtitle { font-size: .95rem; }
  .section-head-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .section-head-row > a.btn { align-self: flex-start; }

  /* Footer */
  .footer { padding: 3rem 1.25rem 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }

  /* Stats */
  .stat-number { font-size: 2.2rem; }

  /* Testi columns */
  .testi-columns-wrap { max-height: 580px; gap: 1rem; }
}
@media (max-width: 640px) {
  .section { padding: 3rem 1rem; }
  .section-head-row { margin-bottom: 1.5rem; }
  /* Tabs scroll horizontal di mobile */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .25rem; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-title { font-size: 1.55rem; }
  .btn { padding: .65rem 1.2rem; font-size: .85rem; }
  .btn-lg { padding: .8rem 1.6rem; font-size: .9rem; }

  /* Footer single col */
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}
@media (max-width: 380px) {
  .section { padding: 2.5rem .9rem; }
}