/* ═══════════════════════════════════════════════
   ZAKAT CALCULATOR — styles.css
   ═══════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-transform: initial !important;
}

/* ─── Design Tokens ─── */
:root {
  --gold:        #C9A84C;
  --gold-light:  #E8C87A;
  --gold-pale:   #F5EDD4;
  --deep:        #1A1208;
  --ink:         #2D2416;
  --body:        #4A3F2F;
  --muted:       #8C7B65;
  --border:      #D4BF9A;
  --bg:          #FDFAF4;
  --white:       #FFFFFF;
  --section-bg:  #F7F1E6;
  --radius:      12px;
  --shadow:      0 4px 24px rgba(26, 18, 8, 0.08);
  --shadow-lg:   0 12px 48px rgba(26, 18, 8, 0.15);
}

/* :root{
    --main-color: #1EBCB8;
    --main-color-2: #FE6766;
    --red: #c0392b;;
    --black: #333;
    --white: #fff;
    --light-black: #777;
    --light-white: #fff9;
    --dark-bg: rgba(0,0,0,.7);
    --light-bg: #eee;
    --border: 0.1rem solid var(--black);
    --box-shadow: 0 .5rem 1rem rgba(0,0,0,.1);
    --box-shadow-dark: 1px 1px 20px rgba(0,0,0,0.3);
    --image-box-shadow: 1px 4px 20px rgba(0, 0, 0, 0.8);
    --text-shadow: 0 1.5rem 3rem rgba(0,0,0,.3);
    --border-1: 1px solid #ccc;
    --border-light: .5px solid #ddd;
    --swiper-pagination-color: var(--main-color);
} */

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--body);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
.hero {
  background: var(--deep);
  padding: 56px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 120%, rgba(201, 168, 76, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-arabesque {
  font-size: 28px;
  color: var(--gold);
  opacity: 0.7;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  display: block;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.hero h1 span {
  color: var(--gold-light);
  font-style: italic;
}

.hero p {
  color: rgba(255, 255, 255, 0.55);
  max-width: 480px;
  margin: 0 auto 24px;
  font-size: 14px;
  font-weight: 300;
}

.nisab-bar {
  display: inline-flex;
  gap: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 40px;
  padding: 10px 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.nisab-bar span {
  color: var(--gold-light);
  font-weight: 500;
}


/* ══════════════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════════════ */
.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.section-label {
  /* font-family: 'Cormorant Garamond', serif; */
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}


/* ══════════════════════════════════════════════
   MASLAK SELECTOR
══════════════════════════════════════════════ */
.maslak-wrap {
  display: flex;
  gap: 12px;
  margin-bottom: 36px;
}

.maslak-btn {
  flex: 1;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  transition: all 0.22s ease;
  display: flex;
  align-items: center;
  gap: 14px;
}

.maslak-btn.active {
  border-color: var(--gold);
  background: #FFFBF0;
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.12);
}

.maslak-btn:hover:not(.active) {
  border-color: var(--gold-light);
}

.maslak-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s;
}

.maslak-btn.active .maslak-dot {
  border-color: var(--gold);
}

.maslak-btn.active .maslak-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
}

.maslak-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.maslak-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}


/* ══════════════════════════════════════════════
   COLLAPSIBLE SECTIONS
══════════════════════════════════════════════ */
.section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: fadeUp 0.4s ease both;
}

.section:nth-child(2) { animation-delay: 0.06s; }
.section:nth-child(3) { animation-delay: 0.12s; }
.section:nth-child(4) { animation-delay: 0.18s; }
.section:nth-child(5) { animation-delay: 0.24s; }

.section-header {
  background: var(--section-bg);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.18s;
}

.section-header:hover {
  background: #EEE5D0;
}

.section-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
}

.section-total {
  font-size: 14px;
  font-weight: 500;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  min-width: 100px;
  text-align: right;
}

.section-chevron {
  color: var(--muted);
  transition: transform 0.25s;
  font-size: 12px;
  margin-left: 8px;
}

.section.collapsed .section-chevron {
  transform: rotate(-90deg);
}

.section-body {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.section.collapsed .section-body {
  display: none;
}

.liab-note {
  font-size: 12px;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
}


/* ══════════════════════════════════════════════
   FORM FIELDS
══════════════════════════════════════════════ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field label .optional {
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  color: var(--border);
  font-size: 11px;
}

.optional {
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  color: var(--border);
  font-size: 11px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 14px;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
  font-weight: 500;
}

.input-suffix {
  position: absolute;
  right: 14px;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}

input[type="number"] {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px 11px 32px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--bg);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

input[type="number"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
  background: var(--white);
}

input[type="number"].grams {
  padding-left: 14px;
}

.field-result {
  background: var(--section-bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--gold);
  font-weight: 500;
  display: flex;
  justify-content: space-between;
}


/* ══════════════════════════════════════════════
   TOOLTIP
══════════════════════════════════════════════ */
.tooltip {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  line-height: 16px;
  cursor: help;
  margin-left: 4px;
  font-weight: 700;
  vertical-align: middle;
  position: relative;
}

.tooltip:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 400;
  padding: 6px 10px;
  border-radius: 6px;
  z-index: 10;
  width: 200px;
  white-space: normal;
  text-align: left;
}


/* ══════════════════════════════════════════════
   NISAB SELECTOR
══════════════════════════════════════════════ */
.nisab-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}

.nisab-opt {
  flex: 1;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nisab-opt.active {
  border-color: var(--gold);
  background: #FFFBF0;
}

.nisab-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s;
}

.nisab-opt.active .nisab-radio {
  border-color: var(--gold);
}

.nisab-opt.active .nisab-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
}

.nisab-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.nisab-amount {
  font-size: 12px;
  color: var(--muted);
}


/* ══════════════════════════════════════════════
   ACTION BUTTONS
══════════════════════════════════════════════ */
.calc-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--deep);
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.35);
  position: relative;
  overflow: hidden;
}

.calc-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.2s;
}

.calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201, 168, 76, 0.45);
}

.calc-btn:hover::after {
  background: rgba(255, 255, 255, 0.1);
}

.calc-btn:active {
  transform: translateY(0);
}

.reset-btn {
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s;
  margin-top: 10px;
}

.reset-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}


/* ══════════════════════════════════════════════
   RESULT PANEL
══════════════════════════════════════════════ */
.result-panel {
  background: var(--deep);
  border-radius: 20px;
  padding: 36px;
  margin-top: 32px;
  margin-bottom: 24px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.result-panel::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.2), transparent 70%);
  pointer-events: none;
}

.result-panel::after {
  content: '☽';
  position: absolute;
  bottom: 20px;
  right: 32px;
  font-size: 80px;
  opacity: 0.06;
  color: var(--gold);
  line-height: 1;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.result-item {
  position: relative;
}

.result-item-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 6px;
  font-weight: 500;
}

.result-item-value {
  font-family: 'DM Sans', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.1;
}

.result-item-value.gold-val {
  color: var(--gold-light);
}

.result-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.zakat-amount-wrap {
  text-align: center;
  padding: 28px;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), rgba(201, 168, 76, 0.05));
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 14px;
  position: relative;
}

.zakat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.zakat-value {
  font-family: 'DM Sans', serif;
  font-size: 52px;
  font-weight: 600;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 6px;
}

.zakat-rate {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

/* Nisab Status Badge */
.nisab-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 14px;
}

.nisab-status.eligible {
  background: rgba(46, 125, 86, 0.25);
  color: #7ECDA6;
  border: 1px solid rgba(46, 125, 86, 0.4);
}

.nisab-status.not-eligible {
  background: rgba(139, 32, 32, 0.25);
  color: #F0A0A0;
  border: 1px solid rgba(139, 32, 32, 0.4);
}

.nisab-status.pending {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
}


/* ══════════════════════════════════════════════
   ZAKAT RULES SECTION
══════════════════════════════════════════════ */
.rules-section {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

.rules-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 24px;
  text-align: center;
}

.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rule-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

.rule-card:hover {
  box-shadow: var(--shadow-lg);
}

.rule-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.rule-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.rule-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}


/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.sub-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.45);
  /* text-align: center; */
  padding: 28px 24px;
  font-size: 12px;
  line-height: 1.7;
}

.sub-footer .container {
  max-width: 1000px;
  margin: 0 auto;
}

.sub-footer h3 {
  font-family: 'Cormorant Garamond', serif;
  margin-bottom: 6px;
  /* text-align: center; */
}

.sub-footer ul {
  display: flex;
  gap: 3px;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.highlight-pulse {
  animation: pulse 0.5s ease;
}


/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 640px) {
  .section-body       { grid-template-columns: 1fr; }
  .result-grid        { grid-template-columns: 1fr 1fr; }
  .rules-grid         { grid-template-columns: 1fr; }
  .maslak-wrap        { flex-direction: column; }
  .nisab-selector     { flex-direction: column; }
  .zakat-value        { font-size: 40px; }
}
