:root {
  --primary:       #0d9488;
  --primary-dark:  #0f766e;
  --primary-light: #f0fdfa;
  --accent:        #06b6d4;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --bg:            #f8fafc;
  --card:          #ffffff;
  --border:        #e2e8f0;
  --radius:        12px;
  --shadow:        0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.04);
  --green:         #16a34a;
  --green-light:   #dcfce7;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px;
}

header {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: .85rem 1rem; position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; max-width: 900px; margin: 0 auto; }
.logo { font-weight: 700; font-size: 1.1rem; color: var(--primary); text-decoration: none; }
.lang-switch { display: flex; gap: .4rem; }
.lang-switch a {
  padding: .25rem .6rem; border-radius: 6px; font-size: .82rem; font-weight: 600;
  text-decoration: none; color: var(--text-muted); border: 1px solid var(--border); transition: all .15s;
}
.lang-switch a:hover  { border-color: var(--primary); color: var(--primary); }
.lang-switch a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.container { max-width: 900px; margin: 0 auto; padding: 0 1rem; }
main { padding: 2rem 0 3rem; }

.breadcrumb { font-size: .83rem; color: var(--text-muted); margin-bottom: 1.5rem; display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb span { color: var(--border); }

.hero { margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; line-height: 1.2; margin-bottom: .5rem; }
.hero p  { font-size: 1rem; color: var(--text-muted); max-width: 620px; }

/* ── Card ── */
.calc-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem; margin-bottom: 1.5rem;
}
.card-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); margin-bottom: 1rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.form-full { grid-column: 1 / -1; }

label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4rem; }
.label-hint { font-size: .75rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-muted); margin-top: .25rem; }

input[type="number"], select {
  width: 100%; padding: .65rem .85rem; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 1rem; color: var(--text); background: var(--bg); transition: border-color .15s;
  appearance: none; -webkit-appearance: none;
}
input[type="number"]:focus, select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.5rem; cursor: pointer;
}

/* ── Results ── */
.results {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius); padding: 1.5rem; color: #fff; margin-top: 1.25rem;
}
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.result-item { background: rgba(255,255,255,.15); border-radius: 8px; padding: .9rem 1rem; }
.result-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .85; margin-bottom: .3rem; }
.result-value { font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.result-main { grid-column: 1 / -1; background: rgba(255,255,255,.2); }
.result-main .result-value { font-size: 2rem; }

.share-btn {
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4);
  color: #fff; padding: .5rem 1.2rem; border-radius: 8px; font-size: .88rem;
  font-weight: 600; cursor: pointer; transition: background .15s; display: block; margin: 0 auto;
}
.share-btn:hover { background: rgba(255,255,255,.3); }

/* ── ROI Section ── */
.roi-section {
  background: var(--card); border: 2px solid var(--green); border-radius: var(--radius);
  padding: 1.5rem; margin-top: 1.5rem; box-shadow: var(--shadow);
}
.roi-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--green); margin-bottom: 1rem; }
.roi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1rem; }
.roi-item { background: var(--green-light); border-radius: 8px; padding: .9rem 1rem; }
.roi-item.highlight { background: var(--green); color: #fff; }
.roi-item.highlight .roi-label { opacity: .85; }
.roi-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--green); margin-bottom: .3rem; }
.roi-value { font-size: 1.4rem; font-weight: 800; color: var(--green); line-height: 1.1; }
.roi-item.highlight .roi-label,
.roi-item.highlight .roi-value { color: #fff; }

/* ── Sections ── */
.section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.section p  { color: var(--text-muted); margin-bottom: .8rem; line-height: 1.7; }
.section ul { color: var(--text-muted); padding-left: 1.2rem; }
.section ul li { margin-bottom: .4rem; line-height: 1.7; }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: .6rem; }
details { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
summary { padding: .9rem 1rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: .95rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.2rem; color: var(--primary); font-weight: 400; flex-shrink: 0; }
details[open] summary::after { content: '−'; }
details[open] summary { border-bottom: 1px solid var(--border); background: var(--primary-light); }
.faq-answer { padding: .9rem 1rem; color: var(--text-muted); line-height: 1.7; font-size: .93rem; }

/* ── Affiliate ── */
.affiliate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
.affiliate-card { border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem; text-align: center; text-decoration: none; color: var(--text); transition: box-shadow .15s, transform .15s; }
.affiliate-card:hover { box-shadow: 0 8px 24px rgba(13,148,136,.12); transform: translateY(-2px); }
.aff-name  { font-weight: 700; font-size: 1rem; margin-bottom: .25rem; }
.aff-desc  { font-size: .82rem; color: var(--text-muted); margin-bottom: .6rem; }
.aff-badge { display: inline-block; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 700; padding: .25rem .7rem; border-radius: 20px; }

footer { border-top: 1px solid var(--border); padding: 1.5rem 0; text-align: center; font-size: .85rem; color: var(--text-muted); }
footer a { color: var(--primary); text-decoration: none; margin: 0 .5rem; }
footer a:hover { text-decoration: underline; }

/* ── RTL ── */
[dir="rtl"] .header-inner { flex-direction: row-reverse; }
[dir="rtl"] .form-grid    { direction: rtl; }
[dir="rtl"] select { background-position: left .85rem center; padding-right: .85rem; padding-left: 2.5rem; }
[dir="rtl"] .breadcrumb  { flex-direction: row-reverse; }
[dir="rtl"] .section ul  { padding-left: 0; padding-right: 1.2rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .form-grid    { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .result-main  { grid-column: 1; }
  .roi-grid     { grid-template-columns: 1fr; }
  .calc-card    { padding: 1.25rem; }
}
@media (max-width: 380px) { .hero h1 { font-size: 1.4rem; } }
