/* ========================================
   AllCalculator.store — Global Design System
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #1a56db;
  --primary-dark: #1344b4;
  --primary-light: #3b72f0;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #f8faff;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #1a56db;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.14);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font: 'Inter', sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --transition: .2s ease;
  --max-w: 1200px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, select, textarea { font-family: var(--font); }

/* ── Container ── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 8px; font-weight: 600; font-size: .95rem; transition: all var(--transition); line-height: 1; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(26,86,219,.35); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,86,219,.45); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(245,158,11,.35); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 10px; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ── Badge ── */
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 50px; font-size: .75rem; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.badge-blue { background: #dbeafe; color: var(--primary); }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-amber { background: #fef3c7; color: #92400e; }

/* ── Section ── */
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title .badge { margin-bottom: 14px; }
.section-title h2 { margin-bottom: 14px; }
.section-title p { color: var(--text-muted); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* ── Cards ── */
.card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: all .25s ease; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-body { padding: 24px; }

/* ── Grid ── */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Form Elements ── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--text); }
.form-control { width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: 8px; font-size: 1rem; color: var(--text); background: #fff; transition: border-color var(--transition), box-shadow var(--transition); }
.form-control:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.form-control::placeholder { color: var(--text-light); }
select.form-control { cursor: pointer; }

/* ── Breadcrumb ── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--text-muted); flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--text-light); }
.breadcrumb-current { color: var(--text); font-weight: 500; }

/* ── Alert / Result Box ── */
.result-box { background: linear-gradient(135deg, #1a56db, #3b72f0); color: #fff; border-radius: var(--radius); padding: 32px; text-align: center; margin-top: 24px; }
.result-box .result-label { font-size: .9rem; opacity: .85; margin-bottom: 8px; }
.result-box .result-value { font-size: 2.5rem; font-weight: 800; font-family: var(--font-heading); }
.result-box .result-sub { font-size: .875rem; opacity: .8; margin-top: 6px; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 20px; }
.result-item { background: rgba(255,255,255,.15); border-radius: 10px; padding: 16px; }
.result-item-label { font-size: .78rem; opacity: .8; margin-bottom: 4px; }
.result-item-val { font-size: 1.3rem; font-weight: 700; }

/* ── FAQ ── */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-question { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; cursor: pointer; font-weight: 600; font-size: 1rem; background: #fff; transition: background var(--transition); }
.faq-question:hover { background: #f1f5f9; }
.faq-icon { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; transition: transform .3s ease; }
.faq-answer { padding: 0 22px; max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease; background: #f8faff; }
.faq-answer p { color: var(--text-muted); }
.faq-item.open .faq-answer { max-height: 400px; padding: 18px 22px; }
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--accent); }

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { background: #1e293b; color: #fff; padding: 12px 16px; text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.data-table tr:nth-child(even) td { background: #f8faff; }
.data-table tr:hover td { background: #eff6ff; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-weight: 600; font-size: .9rem; border: 1px solid var(--border); color: var(--text-muted); transition: all var(--transition); }
.pagination a:hover, .pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Tag / Filter ── */
.tag { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 50px; border: 1.5px solid var(--border); font-size: .82rem; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all var(--transition); }
.tag:hover, .tag.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Search Bar ── */
.search-wrap { position: relative; }
.search-wrap .search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.1rem; pointer-events: none; }
.search-wrap input { padding-left: 46px; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 32px 0; }

/* ── Utility ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .btn-lg { padding: 14px 28px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.7rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  h1 { font-size: 1.75rem; }
}
