/* Konverto — clean, professional design. Flat colors, system-like rhythm, no AI-looking fluff. */

:root {
    --primary: #1a56db;
    --primary-dark: #1443ad;
    --primary-soft: #eef4ff;
    --ink: #17203a;
    --muted: #5b6478;
    --line: #e5e9f2;
    --bg: #ffffff;
    --bg-soft: #f6f8fc;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(23, 32, 58, .06), 0 4px 16px rgba(23, 32, 58, .06);
    --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }

.container { width: min(1140px, 92%); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex; align-items: center; gap: 28px;
    height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-name { font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.main-nav { display: flex; gap: 22px; margin-inline-start: auto; }
.main-nav a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--ink); text-decoration: none; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch a {
    padding: 6px 12px; font-size: .8rem; font-weight: 600; color: var(--muted);
}
.lang-switch a:hover { text-decoration: none; background: var(--bg-soft); }
.lang-switch a.active { background: var(--ink); color: #fff; }

/* ---------- Hero ---------- */
.hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 64px 0 56px; text-align: center; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 12px; letter-spacing: -.02em; }
.hero p { color: var(--muted); font-size: 1.08rem; max-width: 640px; margin: 0 auto 28px; }
.hero-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-badges span {
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: 6px 14px; font-size: .85rem; color: var(--muted); font-weight: 500;
}

/* ---------- Tool grid ---------- */
.tools-section { padding: 48px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.01em; }
.section-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.tool-grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.tool-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 16px; color: var(--ink);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tool-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c9d4ea; }
.tool-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.tool-icon svg { width: 24px; height: 24px; }
.tool-card h3 { margin: 0; font-size: .98rem; font-weight: 600; line-height: 1.4; }
.tool-card p { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.5; }

/* ---------- Tool page ---------- */
.tool-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 40px 0 8px; text-align: center; }
.tool-hero h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 8px; }
.tool-hero .lead { color: var(--muted); max-width: 680px; margin: 0 auto; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }

.converter-box { max-width: 720px; margin: 32px auto; }
.dropzone {
    border: 2px dashed #b9c6e2; border-radius: var(--radius);
    background: #fff; padding: 48px 24px; text-align: center; cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--primary); background: var(--primary-soft); }
.dropzone .dz-icon { margin: 0 auto 12px; opacity: .85; }
.dropzone h2 { margin: 0 0 6px; font-size: 1.2rem; }
.dropzone p { margin: 0; color: var(--muted); font-size: .9rem; }
.dropzone input[type="file"] { display: none; }

.file-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.file-list li {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
    font-size: .9rem;
}
.file-list .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .fsize { margin-inline-start: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.file-list .remove { border: 0; background: none; color: #c0392b; cursor: pointer; font-size: 1.1rem; line-height: 1; }

.tool-options {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px; margin-top: 16px; display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select {
    width: 100%; padding: 10px 12px; font-family: inherit; font-size: .95rem;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }

.btn-convert {
    display: block; width: 100%; margin-top: 16px;
    background: var(--primary); color: #fff; border: 0; border-radius: var(--radius);
    padding: 15px; font-family: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer;
    transition: background .15s ease;
}
.btn-convert:hover { background: var(--primary-dark); }
.btn-convert:disabled { background: #9db9f5; cursor: not-allowed; }
.form-error {
    background: #fdecea; border: 1px solid #f5c6cb; color: #a5271f;
    border-radius: 10px; padding: 12px 16px; margin-top: 16px; font-size: .92rem;
}
.secure-note { text-align: center; color: var(--muted); font-size: .83rem; margin-top: 12px; }

/* ---------- Content sections (SEO) ---------- */
.content-section { max-width: 780px; margin: 0 auto; padding: 36px 0; }
.content-section h2 { font-size: 1.35rem; margin: 0 0 16px; }
.content-section p { color: #39415c; }
.steps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 16px 16px; position: relative; font-size: .93rem; color: #39415c;
}
.steps li::before {
    counter-increment: step; content: counter(step);
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .9rem;
    margin-bottom: 8px;
}
.faq { border-top: 1px solid var(--line); margin-top: 8px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 4px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: .98rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.3rem; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 4px; color: var(--muted); font-size: .93rem; }

/* ---------- Download page ---------- */
.result-card {
    max-width: 560px; margin: 56px auto; text-align: center;
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: 48px 32px; box-shadow: var(--shadow);
}
.result-card .ok-icon {
    width: 64px; height: 64px; border-radius: 50%; background: #e7f6ec;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.result-card h1 { margin: 0 0 8px; font-size: 1.5rem; }
.result-card p { color: var(--muted); margin: 0 0 24px; }
.btn-download {
    display: inline-block; background: var(--primary); color: #fff;
    padding: 14px 44px; border-radius: var(--radius); font-weight: 700; font-size: 1.05rem;
}
.btn-download:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.result-meta { margin-top: 18px; font-size: .85rem; color: var(--muted); }

/* ---------- Static pages ---------- */
.page-narrow { max-width: 780px; margin: 0 auto; padding: 48px 0 64px; }
.page-narrow h1 { font-size: 1.8rem; margin: 0 0 20px; }
.page-narrow h2 { font-size: 1.2rem; margin: 28px 0 10px; }
.page-narrow p, .page-narrow li { color: #39415c; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c3cadb; margin-top: 64px; }
.footer-grid {
    display: grid; gap: 32px; padding: 48px 0 32px;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
}
.footer-brand .brand-name { color: #fff; font-size: 1.2rem; }
.footer-brand p { font-size: .9rem; margin: 10px 0 0; }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { color: #c3cadb; font-size: .9rem; }
.site-footer ul a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .main-nav { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .tool-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .dropzone { padding: 32px 16px; }
}
