/* ══════════════════════════════════════════════════════════
   GSTBill.app — Page-Specific Styles
   Navy + Emerald palette
   ══════════════════════════════════════════════════════════ */

/* ── HERO SECTION (old pages) ── */
.hero{padding:0;text-align:center;background:transparent;}
.hero .container{padding:0;}

/* ── CONTENT BOX ── */
.content-box{
  background:var(--gray-bg);border-radius:var(--radius);
  padding:20px;margin-bottom:20px;
}
.content-box h2{margin-top:0;}
.content-box h3{margin-top:0;}

/* ── COMPARISON BOX ── */
.comparison-box{
  background:var(--green-pale);
  border-left:4px solid var(--green);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  padding:16px 20px;margin:20px 0;
  font-size:15px;line-height:1.7;
}
.comparison-box h3{color:var(--green-dark);margin-top:0;}
.comparison-box p{color:#374151;}

/* ── INFO BOX ── */
.info-box{
  background:var(--sky);
  border-left:4px solid var(--sky-mid);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  padding:16px 20px;margin:20px 0;
  font-size:15px;line-height:1.7;
}

/* ── FEATURES GRID ── */
.features-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;margin:16px 0;
}
.feature{
  background:var(--gray-bg);
  border-radius:var(--radius);
  padding:18px;transition:transform .2s, box-shadow .2s;
}
.feature:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm);}
.feature h3{font-size:15px;color:var(--navy);margin:0 0 6px;}
.feature p{font-size:13px;color:var(--mid);margin:0;line-height:1.6;}

/* ── DOWNLOADS GRID ── */
.downloads-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:12px;margin:16px 0;
}
.download-card{
  background:var(--white);
  border:1px solid var(--gray-line);
  border-radius:var(--radius);
  padding:18px;text-align:center;
  transition:transform .2s, border-color .2s, box-shadow .2s;
}
.download-card:hover{transform:translateY(-2px);border-color:var(--green);box-shadow:var(--shadow-sm);}
.download-card h3{font-size:14px;color:var(--navy);margin:0 0 6px;}
.download-card p{font-size:12px;color:var(--mid);margin:4px 0;line-height:1.5;}
.download-filename{
  display:inline-block;font-size:10px;font-weight:600;
  color:var(--green-dark);background:var(--green-light);
  padding:2px 8px;border-radius:6px;margin-bottom:6px;
}

/* ── BTN STYLES ── */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 22px;border-radius:999px;
  font-size:14px;font-weight:600;
  text-decoration:none;transition:transform .15s, background .15s, box-shadow .15s;
  border:none;cursor:pointer;
  font-family:'DM Sans',system-ui,sans-serif;
  min-height:var(--tap);
}
.btn-primary{
  background:var(--green);color:var(--white);
  box-shadow:var(--shadow-brand);
}
.btn-primary:hover,.btn-primary:focus-visible{
  background:var(--green-dark);transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(5,150,105,.28);
}
.btn-secondary{
  background:var(--white);color:var(--navy);
  border:1px solid var(--gray-line);
}
.btn-secondary:hover,.btn-secondary:focus-visible{
  border-color:var(--green);transform:translateY(-1px);
  background:var(--green-pale);
}

/* ── CALCULATOR ── */
.calculator-box{
  background:var(--white);
  border:2px solid var(--green);
  border-radius:var(--radius);
  padding:24px;margin:20px 0;
}
.form-group{margin-bottom:14px;}
.form-group label{
  display:block;font-size:13px;font-weight:600;
  color:var(--navy);margin-bottom:6px;
}
.form-group input,
.form-group select,
.form-group textarea{
  width:100%;padding:12px 14px;
  border:1px solid var(--gray-line);border-radius:var(--radius-sm);
  font-size:15px;font-family:'DM Sans',system-ui,sans-serif;
  background:var(--white);color:var(--dark);
  transition:border-color .15s, box-shadow .15s;
  min-height:var(--tap);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
  outline:none;border-color:var(--green);
  box-shadow:0 0 0 4px rgba(5,150,105,.15);
}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.result-box{
  background:var(--green-pale);
  border-radius:var(--radius);
  padding:16px;margin-top:16px;
}
.result-item{
  display:flex;justify-content:space-between;
  font-size:14px;padding:4px 0;color:#374151;
}
.result-item.total{
  font-weight:700;font-size:16px;color:var(--navy);
  border-top:2px solid var(--green);padding-top:8px;margin-top:4px;
}
.result-note{
  font-size:12px;color:var(--mid);
  margin-top:8px;padding:10px;
  background:var(--white);border-radius:var(--radius-sm);
}

/* ── STEPS LIST ── */
.steps-list{list-style:none;counter-reset:step;margin:0;padding:0;}
.steps-list li{
  counter-increment:step;position:relative;
  padding:14px 0 14px 44px;
  border-bottom:1px solid var(--gray-hairline);
  font-size:14px;color:#374151;line-height:1.7;
}
.steps-list li:last-child{border-bottom:none;}
.steps-list li::before{
  content:counter(step);
  position:absolute;left:0;top:14px;
  width:28px;height:28px;border-radius:50%;
  background:var(--green);color:var(--white);
  font-size:12px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}
.steps-list li strong{display:block;color:var(--navy);font-size:14.5px;margin-bottom:2px;}

/* ── HIGHLIGHT SPANS ── */
.highlight{
  background:var(--green-light);
  padding:2px 6px;border-radius:4px;
  font-weight:600;color:var(--green-dark);
}
span.highlight{font-size:inherit;}

/* ── TABLE WRAPPER ── */
.table-wrapper{overflow-x:auto;margin:16px 0;-webkit-overflow-scrolling:touch;}

/* ── INTERNAL LINKS ── */
.internal-links{
  background:var(--gray-bg);border-radius:var(--radius);
  padding:16px;margin:20px 0;
}
.internal-links h3{font-size:14px;color:var(--navy);margin:0 0 8px;}
.internal-links a{
  display:inline-block;font-size:12px;padding:6px 14px;
  background:var(--white);border:1px solid var(--gray-line);
  border-radius:999px;margin:3px;
  color:var(--green-dark);text-decoration:none;
  transition:all .15s;
}
.internal-links a:hover,.internal-links a:focus-visible{
  border-color:var(--green);background:var(--green-pale);
}

/* ── WHATSAPP ICON (retained for /blog/whatsapp-gst-invoice-guide/) ── */
.whatsapp-icon{width:18px;height:18px;fill:currentColor;}

/* ── LEGACY COMPAT VARIABLES ── */
:root{
  --accent-green:#059669;
  --spacing-xs:0.5rem;--spacing-sm:1rem;--spacing-md:2rem;
  --spacing-lg:3rem;--spacing-xl:4rem;--spacing-2xl:6rem;
  --radius-md:10px;--radius-lg:16px;
}

/* ── LEGACY MARGINS ── */
.mt-lg{margin-top:2rem;}
.mb-lg{margin-bottom:2rem;}
.mb-0{margin-bottom:0!important;}

/* ── FAQ TOGGLE COMPAT ── */
.faq-toggle{
  font-size:22px;color:var(--green);font-weight:300;
  flex-shrink:0;margin-left:12px;transition:transform .25s;
}
.faq-item.active .faq-toggle{transform:rotate(45deg);}

/* ── BLOG POST META ── */
.post-header{margin-bottom:24px;}
.post-content{line-height:1.8;color:#374151;}
.post-content p{margin-bottom:14px;font-size:15px;}
.post-content h2{margin:28px 0 12px;}
.post-content h3{margin:20px 0 8px;}
.post-content ul,.post-content ol{margin:0 0 16px 22px;}
.post-content li{margin-bottom:6px;font-size:15px;}
.post-content strong{color:var(--navy);}
.post-content a{
  color:var(--green-dark);text-decoration:underline;
  text-decoration-color:rgba(5,150,105,.35);
}

/* ── EXAMPLE BOX ── */
.example-box{
  background:var(--amber);border-radius:var(--radius);
  padding:16px;margin:16px 0;
  font-size:14px;line-height:1.7;
}

/* ── MONOSPACE / CODE ── */
pre,code,.code-block{
  font-family:'DM Mono',ui-monospace,monospace;
  font-size:13px;
  background:var(--gray-bg);
  border-radius:var(--radius-sm);
  padding:2px 6px;
}
pre{padding:14px;overflow-x:auto;margin:16px 0;line-height:1.6;}

/* ── FAQ CONTAINER ── */
.faq-container{
  margin:28px 0;
  background:var(--white);
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid var(--gray-line);
}
.faq-item{
  border-bottom:1px solid var(--gray-hairline);
  transition:background-color .15s;
}
.faq-item:last-child{border-bottom:none;}
.faq-item.active{background:var(--gray-bg);}
.faq-question{
  cursor:pointer;padding:18px 20px;
  display:flex;justify-content:space-between;align-items:center;
  user-select:none;transition:background-color .15s;
  min-height:var(--tap);
}
.faq-question:hover{background:rgba(5,150,105,.05);}
.faq-question h4{
  margin:0;font-size:15px;font-weight:600;
  color:var(--navy);flex:1;
}
.faq-toggle{
  font-size:26px;color:var(--green);font-weight:300;
  flex-shrink:0;margin-left:12px;transition:transform .3s ease;
}
.faq-item.active .faq-toggle{transform:rotate(45deg);}
.faq-answer{max-height:0;overflow:hidden;transition:max-height .3s ease;}
.faq-item.active .faq-answer{max-height:900px;}
.faq-answer p{
  margin:0;padding:0 20px 18px 20px;
  font-size:14px;line-height:1.75;color:#374151;
}
.faq-answer p:first-child{padding-top:0;}

/* ── STICKY BOTTOM CTA (mobile) ── */
.sticky-cta{
  display:none;
  position:fixed;bottom:0;left:0;right:0;
  background:var(--white);
  border-top:1px solid var(--gray-line);
  padding:10px 16px;
  padding-bottom:calc(10px + env(safe-area-inset-bottom));
  z-index:99;text-align:center;
  box-shadow:0 -4px 16px rgba(11,37,69,.08);
}
.sticky-cta a{
  display:flex;align-items:center;justify-content:center;gap:8px;
  width:100%;padding:13px;border-radius:12px;
  background:var(--green);color:var(--white);
  font-size:15px;font-weight:700;text-decoration:none;
  transition:background .15s, transform .15s;
  min-height:var(--tap);
  box-shadow:var(--shadow-brand);
}
.sticky-cta a:hover,.sticky-cta a:focus-visible{background:var(--green-dark);}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — mobile overrides
   ══════════════════════════════════════════════════════════ */
@media (max-width:600px){
  .features-grid{grid-template-columns:1fr;}
  .downloads-grid{grid-template-columns:1fr;}
  .form-row{grid-template-columns:1fr;}

  .sticky-cta{display:block;}
  /* Extra bottom padding so sticky CTA doesn't overlap content */
  .page-wrapper{padding-bottom:calc(72px + env(safe-area-inset-bottom));}

  .faq-question{
    flex-direction:column;align-items:flex-start;gap:10px;
    padding:16px;
  }
  .faq-question h4{font-size:14px;}
  .faq-toggle{align-self:flex-end;margin-left:0;margin-top:-30px;}
  .faq-answer p{padding:0 16px 16px 16px;}
}

/* ══════════════════════════════════════════════════════════
   TEMPLATE GALLERY
   ══════════════════════════════════════════════════════════ */
.template-gallery{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:20px;margin:24px 0 8px;
}
.tpl-card{
  background:var(--white);
  border:1px solid var(--gray-line);
  border-radius:16px;overflow:hidden;
  display:flex;flex-direction:column;
  transition:transform .2s, box-shadow .2s, border-color .2s;
  position:relative;
}
.tpl-card:hover{
  transform:translateY(-4px);
  box-shadow:0 16px 36px rgba(11,37,69,.10);
  border-color:var(--green);
}
.tpl-ribbon{
  position:absolute;top:12px;right:12px;z-index:2;
  background:var(--green);color:var(--white);
  font-size:10px;font-weight:700;letter-spacing:.04em;
  padding:4px 10px;border-radius:999px;text-transform:uppercase;
  box-shadow:var(--shadow-brand);
}
.tpl-preview-wrap{
  background:linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%);
  padding:24px 20px 18px;
  display:flex;align-items:flex-start;justify-content:center;
  border-bottom:1px solid var(--gray-line);
  min-height:380px;
}
.tpl-preview{
  width:100%;max-width:280px;
  background:#fff;
  box-shadow:0 8px 24px rgba(15,23,42,.12), 0 2px 6px rgba(15,23,42,.05);
  border-radius:4px;
  padding:14px 14px 12px;
  font-size:8px;line-height:1.45;color:#111;
  font-family:'DM Sans',system-ui,sans-serif;
}
.tpl-h{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;}
.tpl-biz{font-size:11px;font-weight:800;color:#111;letter-spacing:-.01em;}
.tpl-biz-sub{font-size:7px;color:#6b7280;margin-top:2px;line-height:1.35;}
.tpl-label{font-size:6px;text-transform:uppercase;letter-spacing:.08em;color:#9ca3af;font-weight:700;margin-bottom:1px;}
.tpl-val{font-size:8.5px;font-weight:700;color:#111;}
.tpl-right{text-align:right;}
.tpl-bill-to{border-top:1px dashed #e5e7eb;padding-top:6px;margin-top:8px;}
.tpl-tbl{width:100%;border-collapse:collapse;margin:8px 0 4px;font-size:7.2px;}
.tpl-tbl th{background:#f3f4f6;padding:3px 4px;text-align:left;font-weight:700;color:#374151;font-size:6.2px;text-transform:uppercase;letter-spacing:.03em;}
.tpl-tbl td{padding:3px 4px;border-bottom:1px solid #f3f4f6;color:#1f2937;}
.tpl-tbl td.num,.tpl-tbl th.num{text-align:right;}
.tpl-totals{margin-top:4px;}
.tpl-row{display:flex;justify-content:space-between;gap:8px;font-size:7.2px;color:#374151;padding:1.5px 4px;}
.tpl-row.bold{font-weight:700;color:#111;}
.tpl-grand{display:flex;justify-content:space-between;margin-top:4px;padding:5px 6px;background:#111;color:#fff;border-radius:3px;font-weight:800;font-size:9px;letter-spacing:.01em;}
.tpl-sig{text-align:right;margin-top:10px;font-size:6.5px;color:#6b7280;padding-top:8px;border-top:1px dashed #e5e7eb;font-style:italic;}

/* Variants */
.tpl-preview.modern{border-top:3px solid var(--green);}
.tpl-preview.modern .tpl-biz{color:var(--green-dark);}
.tpl-preview.modern .tpl-grand{background:var(--green);}
.tpl-preview.modern .tpl-tbl th{background:var(--green-pale);color:var(--green-dark);}

.tpl-preview.minimal .tpl-biz{font-size:12px;letter-spacing:-.02em;text-transform:uppercase;}
.tpl-preview.minimal .tpl-tbl th{background:transparent;border-bottom:1.5px solid #111;color:#111;}
.tpl-preview.minimal .tpl-tbl td{border-bottom:1px solid #f0f0f0;}
.tpl-preview.minimal .tpl-grand{background:transparent;color:#111;border-top:2px solid #111;border-radius:0;padding:5px 0 2px;}
.tpl-preview.minimal .tpl-totals{border-top:none;}

.tpl-preview.colored{padding:0 14px 12px;}
.tpl-band{margin:0 -14px 8px;padding:10px 14px;background:linear-gradient(135deg,var(--navy) 0%,var(--navy-tint) 100%);color:#fff;border-radius:4px 4px 0 0;display:flex;justify-content:space-between;align-items:flex-start;gap:10px;}
.tpl-preview.colored .tpl-band .tpl-biz{color:#fff;font-size:12px;}
.tpl-preview.colored .tpl-band .tpl-biz-sub{color:rgba(255,255,255,.85);}
.tpl-preview.colored .tpl-band .tpl-label{color:rgba(255,255,255,.75);}
.tpl-preview.colored .tpl-band .tpl-val{color:#fff;}
.tpl-preview.colored .tpl-grand{background:linear-gradient(135deg,var(--navy) 0%,var(--navy-tint) 100%);}

/* Meta strip */
.tpl-meta{padding:14px 16px 4px;display:flex;flex-direction:column;gap:6px;}
.tpl-meta h3{font-size:15px;color:var(--navy);margin:0;font-weight:700;}
.tpl-tagline{font-size:12px;color:var(--mid);margin:0;line-height:1.5;}
.tpl-bestfor{
  display:inline-flex;align-items:center;gap:4px;
  font-size:10px;font-weight:600;color:var(--green-dark);
  background:var(--green-light);padding:3px 8px;border-radius:999px;
  margin-top:4px;width:fit-content;
}

/* Download actions */
.tpl-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:10px 16px 0;}
.tpl-dl{
  display:flex;align-items:center;justify-content:center;gap:4px;
  padding:10px 4px;background:var(--gray-bg);
  border:1px solid var(--gray-line);border-radius:8px;
  font-size:11px;font-weight:600;color:var(--navy);
  text-decoration:none;transition:all .15s;
  min-height:38px;
}
.tpl-dl:hover,.tpl-dl:focus-visible{
  background:var(--green-pale);border-color:var(--green);color:var(--green-dark);
}
.tpl-dl svg{width:11px;height:11px;flex-shrink:0;}

.tpl-cta{
  margin:10px 16px 16px;padding:12px;
  background:var(--green);color:var(--white);
  border-radius:10px;text-align:center;
  font-size:13px;font-weight:700;text-decoration:none;
  display:flex;align-items:center;justify-content:center;gap:6px;
  transition:transform .15s, background .15s, box-shadow .15s;
  min-height:var(--tap);
  box-shadow:var(--shadow-brand);
}
.tpl-cta:hover,.tpl-cta:focus-visible{
  background:var(--green-dark);transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(5,150,105,.3);color:var(--white);
}
.tpl-cta svg{width:14px;height:14px;}

/* Gallery intro callout */
.tpl-intro{
  background:var(--green-pale);
  border:1px solid #bbf7d0;
  border-radius:14px;
  padding:18px 22px;margin:0 0 20px;
  display:flex;align-items:center;gap:16px;flex-wrap:wrap;
}
.tpl-intro-text{flex:1;min-width:220px;}
.tpl-intro h3{margin:0 0 4px;font-size:16px;color:var(--green-dark);}
.tpl-intro p{margin:0;font-size:14px;color:#374151;line-height:1.55;}
.tpl-intro-cta{
  display:inline-flex;align-items:center;gap:6px;
  padding:11px 18px;background:var(--green);color:var(--white);
  border-radius:999px;font-weight:600;font-size:14px;text-decoration:none;
  transition:transform .15s, background .15s, box-shadow .15s;
  white-space:nowrap;min-height:var(--tap);
  box-shadow:var(--shadow-brand);
}
.tpl-intro-cta:hover,.tpl-intro-cta:focus-visible{
  background:var(--green-dark);transform:translateY(-1px);color:var(--white);
}

@media (max-width:640px){
  .template-gallery{grid-template-columns:1fr;gap:16px;}
  .tpl-preview-wrap{min-height:340px;padding:20px 16px 14px;}
  .tpl-actions{grid-template-columns:repeat(3,1fr);}
  .tpl-dl{font-size:10.5px;padding:10px 2px;}
  .tpl-intro{padding:14px 16px;}
  .tpl-intro-cta{width:100%;justify-content:center;}
}

@media (min-width:1280px){
  .template-gallery{grid-template-columns:repeat(4,1fr);gap:18px;}
  .tpl-preview-wrap{min-height:400px;padding:20px 14px 14px;}
  .tpl-meta h3{font-size:14px;}
  .tpl-tagline{font-size:11.5px;}
}
