/* ========== Global base ========== */
* { box-sizing: border-box; }
html, body { margin: 0; }

/* =========================================================
   HOME PAGE STYLES (diambil & discope dari homePage.html) :contentReference[oaicite:3]{index=3}
   ========================================================= */
body[data-page="home"] {
  font-family: 'Inter', sans-serif;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  background: 
    linear-gradient(135deg, rgb(37 43 105) 58%, rgb(152 26 30) 30%, rgba(245, 245, 9, 0.795) 100%),
    url("https://assets.astroawani.com/data/belanjawan-2026-assets/background.webp") no-repeat center center fixed;
  background-size: cover;
}
/* Hero Grid */
[data-page="home"] .hero {
  display:grid;
  grid-template-columns: 1fr 1fr;
  align-items:center;
  min-height:100vh;
  padding:0 5%;
  position:relative;
  overflow:hidden;
}

/* Left Content */
[data-page="home"] .hero-left {
  display:flex;
  flex-direction:column;
  justify-content:center;
  z-index:2;
}

/* Sequential animations */
[data-page="home"] .hero-left .logo-small { animation: floatUp 0.6s ease-out forwards; opacity:0; transform:translateY(40px);}
[data-page="home"] .hero-left h1 { animation: floatUp 0.6s ease-out 0.3s forwards; opacity:0; transform:translateY(40px);}
[data-page="home"] .hero-left h2 { animation: floatUp 0.6s ease-out 0.6s forwards; opacity:0; transform:translateY(40px);}
[data-page="home"] .hero-left p  { animation: floatUp 0.6s ease-out 0.9s forwards; opacity:0; transform:translateY(40px);}
[data-page="home"] .cta-btn       { animation: floatUp 0.6s ease-out 1.2s forwards; opacity:0; transform:translateY(40px);}
[data-page="home"] .disclaimer    { animation: floatUp 0.6s ease-out 1.4s forwards; opacity:0; transform:translateY(40px); }

@keyframes floatUp { to { opacity:1; transform:translateY(0); } }

[data-page="home"] .hero-left .logo-small { width:100px; margin-bottom:1rem; margin-top:2rem;}
[data-page="home"] .hero-left h1 { font-size:3rem; font-weight:900; line-height:1.2; margin:0 0 0.5rem; color:white; text-shadow:0 2px 4px rgba(0,0,0,0.3); white-space: nowrap; }
[data-page="home"] .hero-left h1 span { color:#f9d342; }
[data-page="home"] .hero-left h2 { font-size:2rem; font-weight:700; margin:0 0 1.2rem; color:white; text-shadow:0 1px 3px rgba(0,0,0,0.25); }
[data-page="home"] .hero-left p { font-size:1.2rem; line-height:1.6; margin-bottom:1rem; max-width:480px; color:#ffffff; font-weight:600; text-shadow:0 1px 2px rgba(0,0,0,0.2); }

/* Smaller CTA Button */
[data-page="home"] .cta-btn {
  max-width: 180px;
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgb(255, 252, 162);
  color: #003366;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom:0.3rem;
}
[data-page="home"] .cta-btn:hover { background:#f9d342; transform:translateY(-3px); color:#003366; }

/* Disclaimer text */
[data-page="home"] .disclaimer { font-size:0.85rem; color: #f9d342; text-shadow:0 1px 2px rgba(0,0,0,0.3); }

/* Right Content (asal absolute + bubbles desktop) */
[data-page="home"] .hero-right {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
[data-page="home"] .hero-right img { 
  max-width: 680px; 
  width: 80%; 
  height: auto;  
  z-index: 1;  
}

/* Thought Bubbles desktop */
[data-page="home"] .thought-bubble {
  position: absolute;
  background: rgba(255,255,255,0.95);
  padding: 0.8rem 1.2rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 1rem;
  color: #003366;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  white-space: nowrap;
  opacity: 0;
  animation: bubbleFloat 6s infinite;
}
[data-page="home"] .thought-bubble:nth-child(1){ bottom:420px; right:10%; animation-delay:1.6s; }
[data-page="home"] .thought-bubble:nth-child(2){ bottom:360px; right:5%; animation-delay:2.0s; }
[data-page="home"] .thought-bubble:nth-child(3){ bottom:300px; right:12%; animation-delay:2.4s; }
[data-page="home"] .thought-bubble:nth-child(4){ bottom:240px; right:7%; animation-delay:2.8s; }

/* Bubble float animation */
@keyframes bubbleFloat {
  0%{ opacity:0; transform:translateY(0) scale(0.8); }
  10%{ opacity:1; transform:translateY(-5px) scale(1); }
  50%{ opacity:1; transform:translateY(-15px) scale(1.05); }
  90%{ opacity:0; transform:translateY(-25px) scale(0.9); }
  100%{ opacity:0; transform:translateY(0) scale(0.8); }
}

/* === Mobile Styles (home) === */
@media(max-width:900px){
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
  }
  [data-page="home"] .hero{ 
    display: flex;
    flex-direction: column;
  }
  [data-page="home"] .hero-left{
    text-align:center;
    margin-bottom:2rem;
    order: 1;
  }
  [data-page="home"] .hero-left h1{ white-space:normal; }
  [data-page="home"] .cta-btn {
    position: relative;
    margin: 0 auto;
    display: block;
  }
  [data-page="home"] .logo-small {
    margin: 0 auto 1rem;
    display: block;
  }
  [data-page="home"] .hero-right {
    order: 2;
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow: visible; /* ✅ prevent cut-off */
    margin-bottom: 1rem; /* give breathing room */
  }
  [data-page="home"] .hero-img-large { max-width: 90%; margin: 0 auto 1rem; }
  [data-page="home"] .thought-bubble { display: none !important; animation: none !important; }
}

/* =========================================================
   MIDDLE PAGE STYLES (diambil & discope dari middlePage.html) :contentReference[oaicite:4]{index=4}
   ========================================================= */
body[data-page="middle"] {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: rgb(7, 10, 38);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  background: 
    linear-gradient(135deg, rgb(37 43 105) 58%, rgb(152 26 30) 30%, rgba(245, 245, 9, 0.795) 100%),
    url("https://assets.astroawani.com/data/belanjawan-2026-assets/background.webp") no-repeat center center fixed;
  background-size: cover;
}
/* Glass card */
[data-page="middle"] .glass-card {
  width: 90%;
  max-width: 400px;
  min-height: 400px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  color: #003366;
}

/* Progress bar */
[data-page="middle"] .progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 8px;
  width: 100%;
  background: rgba(0,0,0,0.05);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}
[data-page="middle"] .progress { height: 100%; width: 0%; background: #f9d342; transition: width 0.3s ease; }
[data-page="middle"] .progress-text {
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #003366;
}

/* Question */
[data-page="middle"] .question {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 3rem 0 2rem;
}

/* Answer buttons */
[data-page="middle"] .answer-btn {
  display: block;
  width: 90%;
  max-width: 400px;
  margin: 0.6rem auto;
  background: #fff;
  color: #003366;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s, color 0.3s;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
[data-page="middle"] .answer-btn:hover { background: #f9d342; color: #003366; transform: translateY(-3px); }

/* Animations */
[data-page="middle"] .fade-out { animation: fadeOut 0.4s forwards; }
[data-page="middle"] .fade-in  { animation: fadeIn 0.4s forwards; }
@keyframes fadeOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.95); } }
@keyframes fadeIn  { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: scale(1); } }

/* =========================================================
   END PAGE STYLES (diambil & discope dari endPage.html) :contentReference[oaicite:5]{index=5}
   ========================================================= */
body[data-page="end"] {
  margin:0;
  font-family:'Inter',sans-serif;
  background: 
  linear-gradient(135deg, rgb(37 43 105) 58%, rgb(152 26 30) 30%, rgba(245, 245, 9, 0.795) 100%);
  color:#003366;
  overflow-x:hidden;
  position:relative;
}
/* Sections */
[data-page="end"] section {
  padding:4rem 2rem;
  max-width:1000px;
  margin:0 auto;
}

/* Headings */
[data-page="end"] h1{
  font-size:2.5rem;
  margin-bottom:3rem;
  color:white;
  text-shadow:0 2px 4px rgba(0,0,0,0.3);
  text-align:center;
}

/* Benefits */
[data-page="end"] .benefits-container-wrapper{
  position: relative;
  padding-top:2rem;
  padding-bottom:2rem;
  text-align: center;
}
[data-page="end"] .benefits-container{
  display:flex;
  flex-wrap:wrap;
  gap:1.5rem;
  justify-content:center;
  position:relative;
  z-index:1;
}
[data-page="end"] .benefit-card{
  background: linear-gradient(145deg, #ffffff, #f8f4e3);
  border-radius:20px;
  padding:1.8rem 1.5rem;
  box-shadow:0 10px 25px rgba(0,0,0,0.15);
  flex:1 1 300px;
  transition: transform 0.3s, box-shadow 0.3s, opacity 0.6s, translateY 0.6s;
  opacity:0;
  transform:translateY(30px);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
[data-page="end"] .benefit-card.in-view{ opacity:1; transform:translateY(0); }
[data-page="end"] .benefit-card:hover{
  transform:translateY(-6px) scale(1.03);
  box-shadow:0 15px 30px rgba(0,0,0,0.25);
}
[data-page="end"] .benefit-title{
  font-weight:700;
  margin-bottom:0.5rem;
  font-size:1.25rem;
  display:flex;
  align-items:center;
  color:#003366;
  text-align:left;
}
[data-page="end"] .benefit-title i{ margin-right:0.5rem; font-size:1.5rem; }
[data-page="end"] .benefit-desc{ font-size:1rem; line-height:1.5; color:#003366; text-align:left; }

[data-page="end"] .more-btn{
  padding:1rem 2.5rem;
  background:#FFD700;
  color:#003366;
  border:none;
  border-radius:30px;
  font-weight:700;
  font-size:1.2rem;
  cursor:pointer;
  transition: all 0.3s;
  display:inline-block;
  margin-top:2rem;
  text-decoration:none;
}
[data-page="end"] .more-btn:hover{ background:#FFC107; transform:scale(1.05); }

/* Counter Section */
[data-page="end"] .counter-section{
  margin-top:5rem;
  text-align:center;
  position:relative;
}
[data-page="end"] .counter-section h2{
  font-size:2.5rem;
  margin-bottom:1rem;
  color:white;
  text-shadow:2px 2px 4px rgba(0,0,0,0.4);
}
[data-page="end"] .counter-number{
  font-size:6rem;
  font-weight:900;
  color:#FFD700;
  text-shadow:4px 4px 8px rgba(0,0,0,0.4);
  margin-bottom:1rem;
  transform: scale(0.8);
  opacity:0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}
[data-page="end"] .counter-number.in-view{ transform: scale(1); opacity:1; }
[data-page="end"] .counter-text{
  font-size:1.5rem;
  color:white;
  margin-bottom:2rem;
  opacity:0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}
[data-page="end"] .counter-text.in-view{ opacity:1; transform: translateY(0); }

[data-page="end"] .scroll-down-btn {
  background: none;
  border: none;
  color: #FFD700;
  font-size: 2rem;
  cursor: pointer;
  margin-top: 3rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* Button Section */
[data-page="end"] .button-section { display: flex; flex-direction: column; align-items: center; }
[data-page="end"] .next-step-heading {
  font-size: 1.5rem; color: white; text-align: center; margin-bottom: 0.5rem; text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
[data-page="end"] .next-step-subtext {
  font-size: 1rem; color: #f1f1f1; text-align: center; margin-bottom: 2rem; opacity: 0.9;
}
[data-page="end"] .button-group {
  display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem;
}

/* Base button style */
[data-page="end"] .action-btn {
  padding: 0.9rem 1.8rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  min-width: 180px;
  justify-content: center;
}

/* Primary (Retry) */
[data-page="end"] .retry-btn { background: #FFD700; color: #003366; border: none; }
[data-page="end"] .retry-btn:hover {
  background: #FFC107;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Secondary (Share Icons) */
[data-page="end"] .share-section { margin-top: 2rem; text-align: center; margin-bottom: 3rem; }
[data-page="end"] .share-label { font-size: 0.95rem; color: #003366; font-weight: 600; margin-bottom: 0.8rem; opacity: 0.9; }
[data-page="end"] .share-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
[data-page="end"] .icon-btn {
  width: 42px; height: 42px; border: none; border-radius: 50%;
  font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, opacity 0.2s; color: white;
}
[data-page="end"] .icon-btn:hover { transform: scale(1.1); opacity: 0.85; }

/* Brand colors */
.whatsapp { background: #25d366; }
.threads  { background: #000000; }
.twitter  { background: #000000; }
.facebook { background: #1877f2; }
.copy     { background: #555; }


/* Tooltip atas icon */
.copy-tip {
  position: absolute;
  top: -28px; /* jarak dari icon */
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
}
.copy-tip::after {
  content: "";
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.85);
}

/* Bila show */
.copy-tip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: tip-pop 0.35s ease-out;
}

@keyframes tip-pop {
  0% { transform: translateX(-50%) translateY(6px) scale(0.95); opacity: 0; }
  60%{ transform: translateX(-50%) translateY(0) scale(1.05); opacity: 1; }
  100%{transform: translateX(-50%) translateY(0) scale(1); }
}

.image-center { display: flex; justify-content: center; margin: 1rem 0; }
.image-center img { max-width: 400px; height: auto; }

/* Responsive (end) */
@media (max-width:768px){
  [data-page="end"] .benefits-container{ flex-direction:column; align-items:stretch; gap:1rem; }
  [data-page="end"] .benefit-card{ flex: 1; max-width: 100%; }
  [data-page="end"] .counter-number{ font-size:4.5rem; }
  [data-page="end"] .counter-section h2{ font-size:2rem; }
  [data-page="end"] .action-btn{ min-width: 100%; }
}
