/* ==========================================================================
   Translog Connections - v2: CTA buttons, dark mode, i18n/a11y, services, polish
   ========================================================================== */
:root {
    --cta: #f97316;         /* orange */
    --cta-hover: #ffffff;   /* white on hover */
    --surface: #ffffff;
}

/* ---------- Orange CTA button (sitewide primary) ---------- */
.btn-primary,
a.btn-primary,
.btn-cta {
    background: var(--cta);      /* #f97316 (orange) */
    color: #ffffff;              /* white text on orange background */
    border-color: var(--cta);    /* #f97316 (orange) */
    padding: 10px 10px 10px 24px;
    gap: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-cta:hover { 
    background: var(--cta-hover); /* #ffffff (white) */
    border-color: var(--cta-hover);
    color: #14181d;               /* dark text on white background */
    transform: translateY(-2px); 
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.35); /* orange shadow */
}

.btn-primary::after,
.btn-cta::after {
    content: "\f061"; /* fa arrow-right */
    font-family: "Font Awesome 6 Free"; 
    font-weight: 900; 
    font-size: 12px;
    width: 34px; 
    height: 34px; 
    border-radius: 50%;
    background: #ffffff; /* WHITE circle default */
    color: #14181d;      /* dark arrow on white circle */
    display: grid; 
    place-items: center; 
    flex: 0 0 auto;
    transition: all .2s var(--ease);
}

.btn-primary:hover::after,
.btn-cta:hover::after { 
    transform: translate(2px, -2px); 
    background: #f97316; /* orange circle on hover */
    color: #ffffff;      /* white arrow on orange circle */
}

.btn-primary.btn-lg { padding: 12px 12px 12px 30px; }
.nav-cta { padding: 8px 8px 8px 18px; font-size: 14px; }
.nav-cta::after { width: 30px; height: 30px; font-size: 11px; }
.btn-sm { padding: 8px 8px 8px 18px; font-size: 14px; }
.btn-sm::after { width: 30px; height: 30px; font-size: 11px; }
/* keep a plain variant with no arrow when needed */
.btn-primary.no-arrow::after, .btn-cta.no-arrow::after { display: none; }

/* Learn more / read links -> small orange pill buttons */
.more, .read, .service-card .more, .bcard .read, .blog-card .read {
    display: inline-flex; 
    align-items: center; 
    gap: 10px;
    background: var(--cta);      /* #f97316 (orange) */
    color: #ffffff;              /* white text */
    font-weight: 500; 
    font-size: 14px;
    padding: 8px 8px 8px 16px; 
    border-radius: 999px; 
    width: fit-content;
    transition: all .2s var(--ease);
}

.more:hover, .read:hover { 
    background: var(--cta-hover); /* #ffffff (white) */
    color: #14181d;               /* dark text on white */
    transform: translateY(-1px);
    border: 1px solid var(--cta); /* orange border on hover */
}

.more i, .read i { 
    width: 26px; 
    height: 26px; 
    border-radius: 50%; 
    background: #ffffff; /* WHITE circle default */
    color: #14181d;      /* dark arrow on white circle */
    display: grid; 
    place-items: center; 
    font-size: 10px; 
    transform: none !important; 
}

.more:hover i, .read:hover i {
    background: #f97316; /* orange circle on hover */
    color: #ffffff;      /* white arrow on orange circle */
}

/* ---------- Nav utility cluster ---------- */
.nav-util { display: flex; align-items: center; gap: 8px; }
.util-btn { width: 42px; height: 42px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; font-size: 15px; transition: all .2s var(--ease); }
.util-btn:hover { background: var(--panel-2); }
.lang-wrap { position: relative; }
.lang-cur { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; width: auto; }
.lang-menu { position: absolute; top: 50px; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; min-width: 156px; z-index: 90; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .2s var(--ease); }
.lang-wrap.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 14px; color: var(--ink); }
.lang-menu button:hover, .lang-menu button.on { background: var(--panel-2); }
.lang-menu button .flag { font-size: 16px; }

/* Hide Google Translate chrome */
.goog-te-banner-frame, .goog-te-gadget-icon, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
body { top: 0 !important; position: static !important; }
#google_translate_element { display: none; }
.skiptranslate { display: none !important; }

/* ---------- Read-aloud accessibility FAB ---------- */
.a11y-fab { position: fixed; left: 20px; bottom: 20px; z-index: 120; }
.a11y-btn { width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: #fff; border: 0; cursor: pointer; box-shadow: var(--shadow); font-size: 18px; display: grid; place-items: center; transition: all .2s var(--ease); }
.a11y-btn:hover { transform: translateY(-2px); }
.a11y-btn.reading { background: var(--cta); color: #14181d; animation: a11ypulse 1.4s infinite; }
@keyframes a11ypulse { 0%,100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .5); } 50% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); } }
.a11y-label { position: absolute; left: 66px; bottom: 15px; background: var(--ink); color: #fff; font-size: 12.5px; padding: 6px 12px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
.a11y-fab:hover .a11y-label { opacity: 1; }

/* ---------- Dark mode ---------- */
[data-theme="dark"] {
    --paper: #0f141b;
    --surface: #161d26;
    --ink: #eef2f6;
    --ink-2: #b9c2cc;
    --muted: #7f8a97;
    --line: #26313f;
    --panel: #151c25;
    --panel-2: #10161e;
    --blue-strong: #f97316; /* changed to orange for dark mode */
}
[data-theme="dark"] body { background: var(--paper); color: var(--ink-2); }
[data-theme="dark"] .card,
[data-theme="dark"] .feature,
[data-theme="dark"] .tcard,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .bcard,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .form-card,
[data-theme="dark"] .ci-card,
[data-theme="dark"] .why-step,
[data-theme="dark"] .accordion-item,
[data-theme="dark"] .benefit-list li,
[data-theme="dark"] .bento-stat,
[data-theme="dark"] .chip,
[data-theme="dark"] .util-btn,
[data-theme="dark"] .car-btn,
[data-theme="dark"] .lang-menu,
[data-theme="dark"] .os-card,
[data-theme="dark"] .svc-frame-inner { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .navbar { background: rgba(22,29,38,.92); border-color: var(--line); }
[data-theme="dark"] .mobile-menu { background: var(--surface); }
[data-theme="dark"] .footer .social a { background: var(--surface); border-color: var(--line); color: var(--ink); }
[data-theme="dark"] .pagination a, [data-theme="dark"] .pagination span { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
[data-theme="dark"] .service-card .icon { background: #1d2733; }
[data-theme="dark"] .feature .fi, [data-theme="dark"] .ci-card .ci-ic, [data-theme="dark"] .benefit-list li .bi { background: #1d2733; }
[data-theme="dark"] .form-control, [data-theme="dark"] .uinput { background: var(--surface); border-color: var(--line); color: var(--ink); }
[data-theme="dark"] .bg-panel, [data-theme="dark"] .bg-light { background: var(--panel); }
[data-theme="dark"] .contact-panel { background: #14202e; }
[data-theme="dark"] .page-hero:not(.photo) { background: var(--panel); }
[data-theme="dark"] .cta, [data-theme="dark"] .cta-band, [data-theme="dark"] .bg-navy, [data-theme="dark"] .t-dark { background: #0a0e13; }
[data-theme="dark"] .svc-item { background: #1d2733; }
[data-theme="dark"] .svc-item.open { background: #232f3d; }
[data-theme="dark"] .btn-outline { color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .btn-dark { 
    background: var(--cta); 
    color: #ffffff; 
    border-color: var(--cta); 
}
[data-theme="dark"] .btn-dark:hover { 
    background: #ffffff; 
    color: #14181d; 
    border-color: #ffffff; 
}
[data-theme="dark"] .btn-dark::after { 
    background: #ffffff; /* WHITE circle default in dark mode */
    color: #14181d;      /* dark arrow on white circle */
}
[data-theme="dark"] .btn-dark:hover::after {
    background: #f97316; /* orange circle on hover */
    color: #ffffff;      /* white arrow on orange circle */
}
/* Dark-mode visibility fixes for dark-on-dark elements */
[data-theme="dark"] .nav-toggle { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
[data-theme="dark"] .mobile-close { background: var(--surface); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .a11y-btn { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
[data-theme="dark"] .a11y-btn.reading { background: var(--cta); color: #ffffff; border-color: var(--cta); }
[data-theme="dark"] .a11y-label { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
[data-theme="dark"] .btn-white { background: var(--surface); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .nav-links a:hover { background: #1d2733; }
[data-theme="dark"] .lang-menu button:hover, [data-theme="dark"] .lang-menu button.on { background: #1d2733; }
[data-theme="dark"] .util-btn:hover { background: #1d2733; }
[data-theme="dark"] .accordion-header i { color: var(--blue-strong); }
[data-theme="dark"] .breadcrumb a, [data-theme="dark"] .footer ul li a:hover { color: var(--blue-strong); }
[data-theme="dark"] .svc-badge { background: #1d2733; color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .chip.active, [data-theme="dark"] .chip:hover { background: var(--cta); color: #fff; border-color: var(--cta); }
[data-theme="dark"] .stats-band { background: #0a0e13; }
[data-theme="dark"] .bcard .thumb .badge, [data-theme="dark"] .blog-card .cat-badge { background: rgba(22,29,38,.92); color: var(--ink); }

/* ---------- Services index: alternating premium cards ---------- */
.svc-alt { display: grid; gap: 110px; }
.svc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.svc-row.rev .svc-row-media { order: -1; }
.svc-badge { display: inline-flex; align-items: center; gap: 9px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 8px 16px; border-radius: 999px; margin-bottom: 22px; }
.svc-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-strong); }
.svc-row h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 500; letter-spacing: -0.03em; margin-bottom: 16px; }
.svc-row .svc-lead { color: var(--muted); font-size: 17px; margin-bottom: 24px; max-width: 460px; }
.svc-check { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 14px; }
.svc-check li { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 15.5px; }
.svc-check li i { width: 24px; height: 24px; border-radius: 50%; background: rgba(249, 115, 22, .14); color: #f97316; display: grid; place-items: center; font-size: 11px; flex: 0 0 auto; }
.svc-hl { font-weight: 600; color: var(--blue-strong); font-size: 15.5px; margin-bottom: 26px; }
.svc-frame { position: relative; display: grid; place-items: center; padding: 40px; }
.svc-frame::before { content: ""; position: absolute; inset: 0; border-radius: 26px; background: repeating-radial-gradient(circle at center, transparent 0 54px, rgba(20,24,29,.05) 54px 55px); }
[data-theme="dark"] .svc-frame::before { background: repeating-radial-gradient(circle at center, transparent 0 54px, rgba(255,255,255,.05) 54px 55px); }
.svc-frame-inner { position: relative; z-index: 2; width: 100%; max-width: 420px; border-radius: 26px; overflow: hidden; background: #fff; box-shadow: var(--shadow); border: 8px solid #fff; }
.svc-frame-inner img { width: 100%; height: 400px; object-fit: cover; border-radius: 18px; }
.svc-badge-ic { position: absolute; z-index: 3; left: 22px; bottom: 22px; width: 52px; height: 52px; border-radius: 16px; background: var(--cta); color: #14181d; display: grid; place-items: center; font-size: 20px; box-shadow: var(--shadow-sm); }

/* ---------- Other services premium ---------- */
.os-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.os-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px 28px; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
.os-card::before { content: ""; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(249, 115, 22, .12), transparent 70%); opacity: 0; transition: opacity .3s var(--ease); }
.os-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.os-card:hover::before { opacity: 1; }
.os-card .os-ic { width: 58px; height: 58px; border-radius: 16px; background: #fef3e8; color: var(--blue-strong); display: grid; place-items: center; font-size: 24px; margin-bottom: 22px; transition: all .3s var(--ease); }
[data-theme="dark"] .os-card .os-ic { background: #2a2018; }
.os-card:nth-child(even) .os-ic { background: #fef3e8; color: var(--accent); }
[data-theme="dark"] .os-card:nth-child(even) .os-ic { background: #2a2018; }
.os-card:hover .os-ic { transform: scale(1.08) rotate(-4deg); }
.os-card h3 { font-size: 19px; font-weight: 500; margin-bottom: 6px; letter-spacing: -0.02em; }
.os-card .os-tag { color: var(--muted); font-size: 14px; margin-bottom: 18px; min-height: 20px; }
.os-card .os-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--blue-strong); font-weight: 500; font-size: 14.5px; }
.os-card .os-arrow i { transition: transform .2s var(--ease); }
.os-card:hover .os-arrow i { transform: translateX(4px); }

/* ---------- Why progress (scroll-driven) ---------- */
.why-steps::after { height: var(--why-progress, 0%); transition: height .25s linear; }
.why-step .why-num { transition: all .3s var(--ease); }
.why-step.active .why-num { border-color: var(--accent); color: #fff; background: var(--accent); }
.why-step.active .wi { box-shadow: 0 10px 24px rgba(249, 115, 22, .28); }

/* ---------- Pagination (fix oversized arrows) ---------- */
.pagination svg { width: 16px; height: 16px; }
.pg { display: flex; gap: 8px; justify-content: center; align-items: center; list-style: none; padding: 0; margin: 48px 0 0; flex-wrap: wrap; }
.pg a, .pg span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; font-size: 14.5px; background: var(--surface); transition: all .2s var(--ease); }
.pg a:hover { border-color: var(--blue-strong); color: var(--blue-strong); }
.pg .cur span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pg .disabled span { opacity: .4; }
.pg .gap span { border: 0; background: none; }

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] .hero-services li a i, [dir="rtl"] .more i, [dir="rtl"] .read i { transform: scaleX(-1) !important; }
[dir="rtl"] .btn-primary::after, [dir="rtl"] .btn-cta::after { transform: scaleX(-1); }
[dir="rtl"] .a11y-fab { left: auto; right: 20px; }
[dir="rtl"] .a11y-label { left: auto; right: 66px; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) { .nav-util { display: none; } }
@media (max-width: 992px) {
    .svc-row { grid-template-columns: 1fr; gap: 40px; }
    .svc-row.rev .svc-row-media { order: 0; }
    .svc-alt { gap: 70px; }
    .os-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .os-grid { grid-template-columns: 1fr; }
    .svc-frame-inner img { height: 320px; }
    .a11y-btn { width: 48px; height: 48px; font-size: 16px; }
}