/*
 Theme Name: Titip Rawat Child
 Theme URI: https://titiprawat.com
 Description: Divi 5 Child Theme for Titip Rawat - Layanan Perawatan Makam Keluarga
 Author: Titip Rawat Team
 Template: Divi
 Version: 1.0.0
 Text Domain: titip-rawat
*/

/* ==========================================================================
   Titip Rawat — Custom Styling & Design System
   Exact layout & typography requested by User
   ========================================================================== */

#titip-rawat,
.tr-page {
  --ink: #24322d;
  --muted: #68756f;
  --green: #5f7868;
  --green-dark: #425b4d;
  --cream: #f6f3ed;
  --paper: #fffdf9;
  --line: #e8e3d9;
  --accent: #d9e4da;

  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  min-height: 100%;
}

#titip-rawat *,
#titip-rawat *::before,
#titip-rawat *::after,
.tr-page *,
.tr-page *::before,
.tr-page *::after {
  box-sizing: border-box;
}

#titip-rawat .wrap,
.tr-page .wrap {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* =========================
   HEADER
========================= */

#titip-rawat header,
.tr-page header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

#titip-rawat .brand,
.tr-page .brand {
  font-weight: 750;
  font-size: 22px;
  letter-spacing: -0.04em;
}

#titip-rawat .brand span,
.tr-page .brand span {
  color: var(--green);
}

#titip-rawat .mini-link,
.tr-page .mini-link {
  font-size: 13px;
  color: var(--muted);
}

/* =========================
   HERO
========================= */

#titip-rawat .hero,
.tr-page .hero {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: stretch;
  padding: 24px 0 54px;
}

#titip-rawat .eyebrow,
.tr-page .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.52);
  font-size: 12px;
  color: var(--green-dark);
  font-weight: 700;
}

#titip-rawat .dot,
.tr-page .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

#titip-rawat h1,
.tr-page h1 {
  font-size: clamp(42px, 6vw, 70px);
  line-height: .98;
  letter-spacing: -.055em;
  margin: 19px 0 20px;
  max-width: 650px;
}

#titip-rawat .hero-copy,
.tr-page .hero-copy {
  font-size: 17px;
  line-height: 1.62;
  color: var(--muted);
  max-width: 570px;
  margin: 0 0 24px;
}

/* =========================
   BUTTON
========================= */

#titip-rawat .cta-row,
.tr-page .cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#titip-rawat .wa,
.tr-page .wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  appearance: none;
  border: 0;
  border-radius: 14px;
  background: var(--green-dark);
  color: white !important;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  min-height: 48px;
  box-shadow: 0 8px 20px rgba(66,91,77,.16);
  transition: all 0.2s ease;
}

#titip-rawat .wa:hover,
.tr-page .wa:hover {
  opacity: .92;
}

#titip-rawat .wa:focus,
.tr-page .wa:focus {
  outline: 3px solid rgba(95,120,104,.24);
  outline-offset: 2px;
}

#titip-rawat .wa-note,
.tr-page .wa-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

/* =========================
   HERO IMAGE & ILLUSTRATION
========================= */

#titip-rawat .visual,
.tr-page .visual {
  position: relative;
  order: -1;
}

#titip-rawat .photo,
.tr-page .photo {
  aspect-ratio: 1.12 / 1;
  border-radius: 24px;
  background:
    linear-gradient(
      145deg,
      #dfe7df,
      #c8d4ca 48%,
      #b2c2b4
    );
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(66,91,77,.08);
}

#titip-rawat .photo img,
.tr-page .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#titip-rawat .photo::before,
.tr-page .photo::before {
  content: "";
  position: absolute;
  inset: 13% 9% 17%;
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.28),
      rgba(66,91,77,.11)
    ),
    repeating-linear-gradient(
      165deg,
      transparent 0 18px,
      rgba(66,91,77,.09) 19px 21px
    );
  transform: rotate(-5deg);
  pointer-events: none;
}

#titip-rawat .stone,
.tr-page .stone {
  position: absolute;
  left: 26%;
  right: 26%;
  bottom: 18%;
  height: 32%;
  border-radius: 48% 48% 15% 15%;
  background: #aab1aa;
  box-shadow: 0 18px 24px rgba(44,58,49,.18);
  pointer-events: none;
}

#titip-rawat .stone::before,
.tr-page .stone::before {
  content: "MAKAM KELUARGA";
  position: absolute;
  left: 0;
  right: 0;
  top: 43%;
  text-align: center;
  font-size: 12px;
  letter-spacing: .18em;
  color: #59625c;
  font-weight: 700;
}

#titip-rawat .grass,
.tr-page .grass {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 27%;
  background:
    linear-gradient(
      175deg,
      #95a895,
      #738c78
    );
  clip-path: polygon(
    0 40%,
    6% 23%,
    14% 37%,
    21% 14%,
    30% 34%,
    39% 10%,
    49% 33%,
    59% 17%,
    70% 37%,
    81% 11%,
    90% 35%,
    100% 16%,
    100% 100%,
    0 100%
  );
  pointer-events: none;
}

#titip-rawat .badge,
.tr-page .badge {
  position: absolute;
  left: 14px;
  bottom: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 13px 15px;
  box-shadow: 0 14px 34px rgba(48,58,52,.1);
  max-width: 210px;
  z-index: 2;
}

#titip-rawat .badge strong,
.tr-page .badge strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

#titip-rawat .badge small,
.tr-page .badge small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

/* =========================
   SECTION
========================= */

#titip-rawat .section,
.tr-page .section {
  padding: 58px 0;
}

#titip-rawat .section-head,
.tr-page .section-head {
  max-width: 650px;
  margin-bottom: 34px;
}

#titip-rawat .section-kicker,
.tr-page .section-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
}

#titip-rawat h2,
.tr-page h2 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -.04em;
  margin: 11px 0 0;
}

#titip-rawat .muted,
.tr-page .muted {
  color: var(--muted);
  line-height: 1.65;
}

/* =========================
   CARA KERJA
========================= */

#titip-rawat .steps,
.tr-page .steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

#titip-rawat .card,
.tr-page .card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  min-height: 180px;
}

#titip-rawat .num,
.tr-page .num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--green-dark);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 25px;
}

#titip-rawat .card h3,
.tr-page .card h3 {
  font-size: 17px;
  margin: 0 0 8px;
}

#titip-rawat .card p,
.tr-page .card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* =========================
   GALLERY
========================= */

#titip-rawat .gallery-shell,
.tr-page .gallery-shell {
  position: relative;
}

#titip-rawat .gallery,
.tr-page .gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 12px;
  padding: 2px 2px 10px;
}

#titip-rawat .gallery::-webkit-scrollbar,
.tr-page .gallery::-webkit-scrollbar {
  display: none;
}

#titip-rawat .gallery-card,
.tr-page .gallery-card {
  flex: 0 0 88%;
  scroll-snap-align: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 10px;
}

@media (min-width: 761px) {
  #titip-rawat .gallery-card,
  .tr-page .gallery-card {
    flex: 0 0 calc(50% - 6px);
  }
}

#titip-rawat .gallery-pair,
.tr-page .gallery-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#titip-rawat .gallery-photo,
.tr-page .gallery-photo {
  aspect-ratio: 1;
  border-radius: 13px;
  overflow: hidden;
  position: relative;
  background: #d8dfd8;
}

#titip-rawat .gallery-photo img,
.tr-page .gallery-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#titip-rawat .gallery-label,
.tr-page .gallery-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(255,253,249,.9);
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 750;
  color: var(--green-dark);
}

#titip-rawat .gallery-caption,
.tr-page .gallery-caption {
  padding: 13px 4px 3px;
  font-size: 13px;
  color: var(--muted);
}

#titip-rawat .gallery-nav,
.tr-page .gallery-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

#titip-rawat .gallery-dots,
.tr-page .gallery-dots {
  display: flex;
  gap: 6px;
}

#titip-rawat .gallery-dot,
.tr-page .gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd3cc;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

#titip-rawat .gallery-dot.active,
.tr-page .gallery-dot.active {
  background: var(--green-dark);
  width: 18px;
  border-radius: 999px;
}

#titip-rawat .gallery-arrows,
.tr-page .gallery-arrows {
  display: flex;
  gap: 7px;
}

#titip-rawat .gallery-arrow,
.tr-page .gallery-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--green-dark);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

#titip-rawat .gallery-arrow:hover,
.tr-page .gallery-arrow:hover {
  background: var(--accent);
}

/* =========================
   SERVICES
========================= */

#titip-rawat .service-band,
.tr-page .service-band {
  background: var(--green-dark);
  color: white;
  border-radius: 24px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

#titip-rawat .service-band h2,
.tr-page .service-band h2 {
  margin: 0 0 12px;
  color: white;
  max-width: 570px;
}

#titip-rawat .service-band p,
.tr-page .service-band p {
  margin: 0;
  color: rgba(255,255,255,.75);
  max-width: 610px;
  line-height: 1.65;
}

#titip-rawat .service-list,
.tr-page .service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-top: 20px;
}

#titip-rawat .service-list div,
.tr-page .service-list div {
  font-size: 14px;
  color: rgba(255,255,255,.9);
}

#titip-rawat .service-list span,
.tr-page .service-list span {
  display: inline-block;
  width: 18px;
}

/* =========================
   FINAL CTA
========================= */

#titip-rawat .final-cta,
.tr-page .final-cta {
  padding: 12px 0 58px;
  text-align: center;
}

#titip-rawat .final-cta h2,
.tr-page .final-cta h2 {
  max-width: 620px;
  margin: 0 auto 14px;
}

#titip-rawat .final-cta p,
.tr-page .final-cta p {
  max-width: 540px;
  margin: 0 auto 22px;
  color: var(--muted);
  line-height: 1.6;
}

#titip-rawat .final-cta .wa,
.tr-page .final-cta .wa {
  min-width: 220px;
}

/* =========================
   FOOTER
========================= */

#titip-rawat footer,
.tr-page footer {
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

/* =========================
   RESPONSIVE
========================= */

@media (min-width: 761px) {
  #titip-rawat .hero,
  .tr-page .hero {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 54px;
    align-items: center;
    padding: 42px 0 72px;
  }

  #titip-rawat .visual,
  .tr-page .visual {
    order: initial;
  }

  #titip-rawat .photo,
  .tr-page .photo {
    aspect-ratio: 4 / 4.7;
    border-radius: 28px;
  }

  #titip-rawat .steps,
  .tr-page .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  #titip-rawat .service-band,
  .tr-page .service-band {
    grid-template-columns: 1fr auto;
    padding: 36px;
  }

  #titip-rawat .section,
  .tr-page .section {
    padding: 76px 0;
  }
}

@media (max-width: 420px) {
  #titip-rawat .service-list,
  .tr-page .service-list {
    grid-template-columns: 1fr;
  }

  #titip-rawat .cta-row,
  .tr-page .cta-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  #titip-rawat .wa,
  .tr-page .wa {
    width: 100%;
  }
}

@media (max-width: 760px) {
  #titip-rawat footer,
  .tr-page footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  #titip-rawat *,
  .tr-page * {
    scroll-behavior: auto !important;
  }
}
