/* GulfRates — dark navy + gold, simple and clean (TikTok-Saver-style layout) */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #0a1128;
  --navy2: #0e1a3d;
  --card: #101f42;
  --card2: #0c1730;
  --gold: #d4af37;
  --gold2: #f5c542;
  --text: #eef1f8;
  --muted: #9fb0d0;
  --line: #22335e;
  --green: #2fbf71;
  --red: #ff6b6b;
  --radius: 14px;
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 16px; }
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Header — simple sticky bar */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 17, 40, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.header-in { display: flex; align-items: center; gap: 18px; min-height: 58px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-size: 1.28rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo strong { color: var(--gold2); font-weight: 800; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold2), var(--gold));
  color: var(--navy); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.02rem; border: 2px solid #8a6d1f;
}
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.main-nav a { color: var(--muted); font-size: .93rem; padding: 7px 10px; border-radius: 8px; white-space: nowrap; }
.main-nav a:hover { color: var(--gold2); background: var(--navy2); text-decoration: none; }

/* Hero — one clear purpose */
.hero {
  background: linear-gradient(160deg, #12234f 0%, var(--navy2) 55%, var(--navy) 100%);
  border-bottom: 1px solid var(--line);
  padding: 34px 0 30px;
  text-align: center;
}
.hero h1 { font-size: clamp(1.55rem, 4.5vw, 2.4rem); line-height: 1.2; font-weight: 800; }
.hero h1 .gold-text { color: var(--gold2); }
.hero .sub { color: var(--muted); max-width: 640px; margin: 10px auto 0; font-size: 1.02rem; }

/* Big rate card */
.rate-card {
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  max-width: 560px; margin: 22px auto 0;
  padding: 22px 20px 18px;
  box-shadow: 0 10px 34px rgba(0,0,0,.45);
  text-align: center;
}
.rate-card .rc-label { color: var(--muted); font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
.rate-card .rc-big { font-size: clamp(2.7rem, 9vw, 3.9rem); font-weight: 800; color: var(--gold2); line-height: 1.1; margin: 4px 0 2px; }
.rate-card .rc-big small { font-size: 1.05rem; color: var(--muted); font-weight: 600; }
.rate-card .rc-change { font-size: .95rem; margin-bottom: 8px; min-height: 1.3em; }
.up { color: var(--red); } .down { color: var(--green); } .flat { color: var(--muted); }
.karat-rows { margin-top: 10px; border-top: 1px solid var(--line); }
.karat-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 1.06rem; }
.karat-row:last-child { border-bottom: 0; }
.karat-row .k { color: var(--text); font-weight: 600; }
.karat-row .v { color: var(--gold2); font-weight: 700; font-variant-numeric: tabular-nums; }
.updated-line { color: var(--muted); font-size: .85rem; margin-top: 12px; }
.rate-error { display: none; background: #3a1522; border: 1px solid var(--red); color: #ffd7d7; border-radius: 10px; padding: 10px 14px; max-width: 560px; margin: 14px auto 0; font-size: .95rem; }
.rate-error button { background: var(--red); color: #fff; border: 0; border-radius: 8px; padding: 6px 14px; margin-left: 8px; font-weight: 700; cursor: pointer; }

/* Buttons */
.btn { display: inline-block; border: 0; cursor: pointer; font-weight: 700; border-radius: 10px; padding: 12px 22px; font-size: 1rem; }
.btn-gold { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #231a00; }
.btn-gold:hover { text-decoration: none; filter: brightness(1.06); }
.btn-wa { background: #25d366; color: #07331a; }
.btn-wa:hover { text-decoration: none; filter: brightness(1.05); }
.share-row { margin-top: 16px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Sections + simple cards */
.section { padding: 30px 0 6px; }
.section h2 { font-size: 1.45rem; margin-bottom: 8px; }
.section .lead { color: var(--muted); max-width: 760px; margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.card {
  background: var(--card2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; display: block; color: var(--text);
}
a.card:hover { border-color: var(--gold); text-decoration: none; }
.card .c-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.card .c-big { font-size: 1.65rem; font-weight: 800; color: var(--gold2); font-variant-numeric: tabular-nums; }
.card .c-sub { color: var(--muted); font-size: .9rem; }
.card p { color: var(--muted); font-size: .95rem; }

/* Tables */
.rate-table { width: 100%; border-collapse: collapse; background: var(--card2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-variant-numeric: tabular-nums; }
.rate-table th, .rate-table td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line); }
.rate-table th:first-child, .rate-table td:first-child { text-align: left; }
.rate-table thead th { background: var(--navy2); color: var(--gold2); font-size: .92rem; }
.rate-table tr:last-child td { border-bottom: 0; }
.rate-table td.v { color: var(--gold2); font-weight: 700; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); }
.table-note { color: var(--muted); font-size: .85rem; margin-top: 8px; }

/* Text content (SEO depth lives here) */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.4rem; margin: 26px 0 8px; }
.prose h3 { font-size: 1.12rem; margin: 20px 0 6px; color: var(--gold2); }
.prose p { color: #d7deef; margin-bottom: 12px; }
.prose ul, .prose ol { margin: 0 0 12px 22px; color: #d7deef; }
.prose li { margin-bottom: 6px; }
.prose .example-box { background: var(--card2); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 14px 16px; margin: 14px 0; }
.prose .example-box p:last-child { margin-bottom: 0; }
.disclaimer { color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 12px; max-width: 780px; }

/* FAQ accordion */
.faq { max-width: 780px; }
.faq details { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--gold2); font-size: 1.2rem; }
.faq details[open ] summary::after { content: "–"; }
.faq details p { padding: 0 16px 14px; color: var(--muted); }

/* Converter + calculator */
.tool-box { background: var(--card2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; max-width: 560px; }
.tool-box label { display: block; font-size: .9rem; color: var(--muted); margin: 12px 0 5px; }
.tool-box label:first-child { margin-top: 0; }
.tool-box input, .tool-box select {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--navy); color: var(--text); font-size: 1.1rem;
}
.tool-box .result-line { margin-top: 16px; font-size: 1.25rem; font-weight: 700; color: var(--gold2); font-variant-numeric: tabular-nums; }
.tool-box .breakdown { margin-top: 10px; color: var(--muted); font-size: .95rem; }
.tool-box .breakdown div { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.tool-box .breakdown div:last-child { border-bottom: 0; color: var(--text); font-weight: 700; }
.swap-row { text-align: center; margin-top: 10px; }
.swap-row button { background: var(--navy2); color: var(--gold2); border: 1px solid var(--gold); border-radius: 8px; padding: 7px 16px; cursor: pointer; font-weight: 700; }

/* Ad placeholders (empty — this site's own codes go here later) */
.ad-slot {
  border: 1.5px dashed var(--line); border-radius: 10px; color: var(--muted);
  text-align: center; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 16px 10px; margin: 22px auto; max-width: 728px;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; background: var(--card2); }
.footer-in { padding: 26px 0 8px; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-bottom: 22px; }
.foot-cols h4 { color: var(--gold2); font-size: .98rem; margin-bottom: 9px; }
.foot-cols a { display: block; color: var(--muted); font-size: .93rem; padding: 3px 0; }
.foot-cols a:hover { color: var(--gold2); }
.foot-family { border-top: 1px solid var(--line); padding: 18px 0 6px; }
.foot-family h4 { color: var(--text); font-size: 1rem; margin-bottom: 12px; }
.family-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.family-card { background: var(--navy2); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; display: block; }
.family-card:hover { border-color: var(--gold); text-decoration: none; }
.family-card strong { color: var(--gold2); display: block; margin-bottom: 2px; }
.family-card span { color: var(--muted); font-size: .88rem; }
.copyright { color: var(--muted); font-size: .85rem; text-align: center; padding: 16px 0 20px; border-top: 1px solid var(--line); margin-top: 18px; }

@media (max-width: 640px) {
  .header-in { gap: 8px; }
  .main-nav { margin-left: 0; overflow-x: auto; flex-wrap: nowrap; max-width: 100%; padding-bottom: 4px; }
  .hero { padding: 24px 0 22px; }
  .section { padding: 22px 0 4px; }
}
