:root {
    --bg: #121519;
    --bg-soft: #151a1f;
    --card: #191f25;
    --card-hover: #1b2731;
    --text: #f1f5f8;
    --muted: #8e9aa5;
    --blue: #1f6aa5;
    --blue-light: #5bb5ed;
    --border: rgba(255, 255, 255, .07);
    --blue-border: rgba(31, 106, 165, .38);
    --blue-glow: rgba(31, 106, 165, .18);
    --shadow: 0 20px 55px rgba(0, 0, 0, .35);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(31, 106, 165, .08),
            transparent 38%
        ),
        var(--bg);
    color: var(--text);
    font-family: "Cairo", sans-serif;
    line-height: 1.7;
}

a {
    color: inherit;
}

button,
textarea {
    font-family: inherit;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(18, 21, 25, .82);
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition:
        background .3s ease,
        border-color .3s ease,
        box-shadow .3s ease;
}

.site-header.scrolled {
    background: rgba(18, 21, 25, .94);
    border-bottom-color: rgba(31, 106, 165, .18);
    box-shadow: 0 10px 35px rgba(0, 0, 0, .22);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.brand:hover {
    color: #fff;
}

.logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
    transition:
        transform .3s ease,
        filter .3s ease;
}

.brand:hover .logo-img {
    transform: scale(1.06);
    filter: drop-shadow(0 0 12px rgba(31, 106, 165, .35));
}


/* =========================================================
   MAIN
========================================================= */

.arabic-tool-section {
    width: 100%;
    min-height: calc(100vh - 80px);
    padding: 90px 0 80px;
    position: relative;
}

.arabic-tool-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: min(800px, 90%);
    height: 400px;
    transform: translateX(-50%);
    pointer-events: none;
    background:
        radial-gradient(
            circle,
            rgba(31, 106, 165, .08),
            transparent 68%
        );
    filter: blur(15px);
}


/* =========================================================
   SECTION HEADING
========================================================= */

.arabic-tool-section .section-heading {
    position: relative;
    z-index: 1;
    width: min(900px, calc(100% - 40px));
    margin: 0 auto 42px;
    text-align: center;
}

.arabic-tool-section .section-label {
    display: inline-block;
    margin-bottom: 9px;
    color: var(--blue-light);
    font-family: "Alexandria", sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .5px;
}

.arabic-tool-section .section-heading h1 {
    margin: 0 auto 12px;
    color: #fff;
    font-family: "Alexandria", sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    line-height: 1.55;
    text-shadow:
        0 0 14px rgba(31, 106, 165, .28);
}

.arabic-tool-section .section-heading p {
    max-width: 760px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.9;
}


/* =========================================================
   TOOL CARD
========================================================= */

.arabic-tool-card {
    position: relative;
    z-index: 1;
    width: min(1000px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .025),
            rgba(255, 255, 255, .008)
        ),
        #151a1f;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow:
        0 25px 65px rgba(0, 0, 0, .35),
        0 0 45px rgba(31, 106, 165, .04);
    overflow: hidden;
}

.arabic-tool-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;
    width: 70%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(91, 181, 237, .5),
        transparent
    );
}


/* =========================================================
   INPUT / OUTPUT
========================================================= */

.io-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field {
    min-width: 0;
}

.field .label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
    color: #dce5ec;
    font-size: 14px;
    font-weight: 800;
}

.textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px 16px;
    box-sizing: border-box;
    resize: vertical;
    outline: none;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 13px;
    background: #101419;
    color: #eef4f8;
    font-family: "Cairo", sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.9;
    caret-color: var(--blue-light);
    transition:
        border-color .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}

.textarea::placeholder {
    color: #5f6c77;
}

.textarea:hover {
    border-color: rgba(31, 106, 165, .28);
}

.textarea:focus {
    border-color: rgba(91, 181, 237, .55);
    background: #11171c;
    box-shadow:
        0 0 0 3px rgba(31, 106, 165, .12),
        0 0 25px rgba(31, 106, 165, .08);
}

.textarea[readonly] {
    cursor: default;
}


/* =========================================================
   ACTIONS
========================================================= */

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.btn {
    min-width: 125px;
    height: 46px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 11px;
    font-family: "Cairo", sans-serif;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    outline: none;
    transition:
        transform .25s ease,
        border-color .25s ease,
        background .25s ease,
        box-shadow .25s ease,
        color .25s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn.primary {
    color: #fff;
    border: 1px solid rgba(91, 181, 237, .35);
    background:
        linear-gradient(
            135deg,
            #1f6aa5,
            #2581c5
        );
    box-shadow:
        0 8px 25px rgba(31, 106, 165, .18);
}

.btn.primary:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 181, 237, .65);
    box-shadow:
        0 12px 30px rgba(31, 106, 165, .28),
        0 0 22px rgba(31, 106, 165, .12);
}

.btn.ghost {
    color: #cbd5dc;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .025);
}

.btn.ghost:hover {
    transform: translateY(-2px);
    color: #fff;
    border-color: rgba(91, 181, 237, .35);
    background: rgba(31, 106, 165, .08);
}


/* =========================================================
   NOTES
========================================================= */

.hint {
    margin-top: 20px;
    padding: 14px 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, .018);
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 12px;
}

.hint summary {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dce5ec;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
}

.hint summary::marker {
    color: var(--blue-light);
}

.hint ul {
    margin: 12px 0 0;
    padding-right: 20px;
}

.hint li {
    margin: 6px 0;
    color: #84919c;
    font-size: 12px;
    line-height: 1.8;
}

.hint li::marker {
    color: var(--blue-light);
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    width: 100%;
    margin: 0;
    padding: 35px 0 30px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .05);
    background: #101317;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #eaf2f7;
    font-family: "Alexandria", sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.footer-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.footer-content p {
    margin: 0;
    color: #697681;
    font-size: 12px;
}

.footer-content small {
    color: #56626c;
    font-size: 11px;
}


/* =========================================================
   BACK TO TOP
========================================================= */

.back-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    background: #1f6aa5;
    border: 1px solid rgba(91, 181, 237, .35);
    border-radius: 50%;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, .35),
        0 0 20px rgba(31, 106, 165, .12);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition:
        opacity .3s ease,
        transform .3s ease,
        background .3s ease,
        box-shadow .3s ease;
}

.back-top:hover {
    color: #fff;
    background: #2581c5;
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, .4),
        0 0 25px rgba(31, 106, 165, .2);
}

.back-top i {
    font-size: 17px;
}


/* =========================================================
   WHATSAPP
========================================================= */

.whatsapp-float {
    position: fixed;
    left: -176px;
    bottom: 30px;
    z-index: 9999;
    width: 230px;
    height: 62px;
    box-sizing: border-box;
    display: block;
    color: #fff;
    text-decoration: none;
    background: #151c22;
    border: 1px solid rgba(37, 211, 102, .55);
    border-left: 0;
    border-radius: 0 18px 18px 0;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, .35),
        0 0 25px rgba(37, 211, 102, .10);
    transition:
        left .4s cubic-bezier(.22, 1, .36, 1),
        border-color .3s ease,
        box-shadow .3s ease;
}

.whatsapp-float:hover {
    left: 0;
    border-color: rgba(37, 211, 102, .8);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, .45),
        0 0 30px rgba(37, 211, 102, .18);
}

.whatsapp-icon {
    position: absolute;
    top: 4px;
    right: 7px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #25d366;
    border-radius: 13px;
    box-shadow:
        0 0 0 4px #151c22,
        0 0 18px rgba(37, 211, 102, .35);
    transition:
        transform .3s ease,
        border-radius .3s ease;
}

.whatsapp-icon i {
    font-size: 28px;
    line-height: 1;
}

.whatsapp-text {
    position: absolute;
    top: 50%;
    right: 72px;
    transform: translateY(-50%);
    white-space: nowrap;
    color: #fff;
    font-family: "Cairo", sans-serif;
    font-size: 14px;
    font-weight: 800;
    opacity: 0;
    transition: opacity .25s ease;
}

.whatsapp-float:hover .whatsapp-text {
    opacity: 1;
}

.whatsapp-float:hover .whatsapp-icon {
    transform: scale(1.05);
    border-radius: 15px;
}


/* =========================================================
   PRELOADER
========================================================= */

.preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 11, 14, .70);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 1;
    visibility: visible;
    transition: opacity .7s ease, visibility .7s ease;
}

.preloader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    position: relative;
    width: 190px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-orbit {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.preloader-orbit span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    margin: -2.5px;
    border-radius: 50%;
    background: var(--blue-light);
    box-shadow:
        0 0 6px var(--blue-light),
        0 0 14px rgba(31, 106, 165, .75);
    opacity: 0;
    animation:
        preloader-orbit 3.8s cubic-bezier(.45, 0, .25, 1) infinite;
}

.preloader-orbit span:nth-child(1)  { animation-delay: 0s; }
.preloader-orbit span:nth-child(2)  { animation-delay: .12s; }
.preloader-orbit span:nth-child(3)  { animation-delay: .24s; }
.preloader-orbit span:nth-child(4)  { animation-delay: .36s; }
.preloader-orbit span:nth-child(5)  { animation-delay: .48s; }
.preloader-orbit span:nth-child(6)  { animation-delay: .60s; }
.preloader-orbit span:nth-child(7)  { animation-delay: .72s; }
.preloader-orbit span:nth-child(8)  { animation-delay: .84s; }
.preloader-orbit span:nth-child(9)  { animation-delay: .96s; }
.preloader-orbit span:nth-child(10) { animation-delay: 1.08s; }
.preloader-orbit span:nth-child(11) { animation-delay: 1.20s; }
.preloader-orbit span:nth-child(12) { animation-delay: 1.32s; }
.preloader-orbit span:nth-child(13) { animation-delay: 1.44s; }
.preloader-orbit span:nth-child(14) { animation-delay: 1.56s; }
.preloader-orbit span:nth-child(15) { animation-delay: 1.68s; }
.preloader-orbit span:nth-child(16) { animation-delay: 1.80s; }
.preloader-orbit span:nth-child(17) { animation-delay: 1.92s; }
.preloader-orbit span:nth-child(18) { animation-delay: 2.04s; }

@keyframes preloader-orbit {

    0% {
        opacity: 0;
        transform: rotate(90deg) translateY(0);
    }

    10% {
        opacity: .9;
    }

    45% {
        opacity: 1;
        transform: rotate(270deg) translateY(-82px);
    }

    70% {
        opacity: .75;
        transform: rotate(450deg) translateY(-82px);
    }

    88% {
        opacity: .35;
    }

    100% {
        opacity: 0;
        transform: rotate(450deg) translateY(0);
    }
}

.preloader-logo {
    position: relative;
    z-index: 2;
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #121519;
    box-shadow:
        0 0 0 1px rgba(77, 168, 232, .18),
        0 0 25px rgba(31, 106, 165, .18);
    animation: preloader-logo 3s ease-in-out infinite;
}

.preloader-logo img {
    width: 68px;
    height: 68px;
    object-fit: contain;
    display: block;
}

@keyframes preloader-logo {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.035);
    }
}

.preloader-name {
    position: absolute;
    top: calc(50% + 65px);
    left: 50%;
    transform: translateX(-50%);
    color: #eaf6ff;
    font-family: "Alexandria", sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .5px;
    white-space: nowrap;
    text-shadow:
        0 0 10px rgba(31, 106, 165, .45);
    opacity: .9;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 820px) {

    .arabic-tool-section {
        padding: 75px 0 60px;
    }

    .arabic-tool-section .section-heading {
        width: calc(100% - 28px);
        margin-bottom: 32px;
    }

    .arabic-tool-section .section-heading h1 {
        font-size: clamp(26px, 5vw, 36px);
    }

    .arabic-tool-card {
        width: calc(100% - 28px);
        padding: 22px;
    }

    .io-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 600px) {

    .arabic-tool-section {
        padding: 65px 0 50px;
    }

    .arabic-tool-section .section-heading {
        width: calc(100% - 18px);
        margin-bottom: 27px;
    }

    .arabic-tool-section .section-label {
        font-size: 12px;
    }

    .arabic-tool-section .section-heading h1 {
        font-size: 25px;
        line-height: 1.6;
    }

    .arabic-tool-section .section-heading p {
        font-size: 12px;
        line-height: 1.85;
    }

    .arabic-tool-card {
        width: calc(100% - 18px);
        padding: 15px;
        border-radius: 14px;
    }

    .field .label {
        font-size: 12px;
    }

    .textarea {
        min-height: 125px;
        padding: 11px 12px;
        font-size: 13px;
        border-radius: 11px;
    }

    .actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn {
        width: 100%;
        height: 43px;
        font-size: 12px;
    }

    .hint {
        padding: 12px;
    }

    .hint li {
        font-size: 11px;
    }

    .site-footer {
        padding: 28px 15px 24px;
    }

    .back-top {
        right: 15px;
        bottom: 15px;
        width: 40px;
        height: 40px;
    }

    .whatsapp-float {
        left: -158px;
        bottom: 22px;
        width: 210px;
        height: 54px;
        border-radius: 0 15px 15px 0;
    }

    .whatsapp-icon {
        top: 4px;
        right: 6px;
        width: 46px;
        height: 46px;
        border-radius: 11px;
    }

    .whatsapp-icon i {
        font-size: 24px;
    }

    .whatsapp-text {
        right: 62px;
        font-size: 12px;
    }

    .preloader-content {
        width: 160px;
        height: 160px;
    }

    .preloader-logo {
        width: 68px;
        height: 68px;
    }

    .preloader-logo img {
        width: 59px;
        height: 59px;
    }

    .preloader-orbit span {
        width: 4px;
        height: 4px;
        margin: -2px;
    }

    .preloader-name {
        top: calc(50% + 56px);
        font-size: 11px;
    }
}

@media (max-width: 400px) {

    .arabic-tool-section .section-heading h1 {
        font-size: 23px;
    }

    .arabic-tool-card {
        width: calc(100% - 12px);
        padding: 12px;
    }

    .textarea {
        min-height: 115px;
        font-size: 12px;
    }

    .hint li {
        font-size: 10px;
    }
}