/* =========================================================
   ASEM DIGITAL SOLUTIONS
   GLOBAL PLATFORM UI
   Professional Responsive CSS
   Compatible with index.html + app.js
   ========================================================= */

/* =========================================================
   1. ROOT / DESIGN SYSTEM
   ========================================================= */

:root {
    --primary: #00aeea;
    --primary-dark: #008fc2;
    --secondary: #0b1f33;

    --bg: #f5f8fb;
    --surface: #ffffff;
    --surface-soft: #eef5f9;

    --text: #10202f;
    --text-soft: #5f7180;
    --border: #dce6ed;

    --success: #159957;
    --warning: #d98200;
    --danger: #d93025;

    --shadow-sm:
        0 4px 14px rgba(15, 40, 60, 0.07);

    --shadow-md:
        0 12px 35px rgba(15, 40, 60, 0.11);

    --shadow-lg:
        0 20px 55px rgba(15, 40, 60, 0.15);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --container: 1180px;

    --transition:
        180ms ease;

    --font:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}


/* =========================================================
   2. DARK MODE
   ========================================================= */

html[data-theme="dark"] {

    --bg: #07121d;
    --surface: #0d1c2a;
    --surface-soft: #122536;

    --text: #f2f7fa;
    --text-soft: #a9bac7;

    --border: #223a4c;

    --shadow-sm:
        0 4px 16px rgba(0, 0, 0, 0.25);

    --shadow-md:
        0 14px 38px rgba(0, 0, 0, 0.35);

    --shadow-lg:
        0 22px 60px rgba(0, 0, 0, 0.45);
}


/* =========================================================
   3. RESET
   ========================================================= */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    min-width: 320px;

    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(0, 174, 234, 0.08),
            transparent 28%
        ),
        var(--bg);

    color: var(--text);

    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;

    transition:
        background var(--transition),
        color var(--transition);
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

a {
    color: inherit;
}

::selection {
    background: rgba(0, 174, 234, 0.25);
}


/* =========================================================
   4. ACCESSIBILITY
   ========================================================= */

:focus-visible {
    outline: 3px solid rgba(0, 174, 234, 0.45);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
   5. GLOBAL CONTAINERS
   ========================================================= */

section,
header.hero {
    width: min(
        calc(100% - 40px),
        var(--container)
    );

    margin-inline: auto;
}

section {
    padding-block: 78px;
}

.section-header {
    max-width: 780px;
    margin: 0 auto 38px;
    text-align: center;
}

.section-header h2,
.section-header h3 {
    margin: 0 0 12px;
    line-height: 1.2;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.section-header h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-header p {
    margin: 0;
    color: var(--text-soft);
}


/* =========================================================
   6. NAVBAR
   ========================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    min-height: 72px;

    display: flex;
    align-items: center;
    gap: 24px;

    padding:
        10px
        max(20px, calc((100vw - var(--container)) / 2));

    background:
        color-mix(
            in srgb,
            var(--surface) 92%,
            transparent
        );

    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    box-shadow: var(--shadow-sm);
}

.logo {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;

    text-decoration: none;
}

.logo img {
    width: auto;
    height: 42px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    flex: 1;
}

.nav-links a {
    position: relative;

    padding: 9px 12px;

    color: var(--text-soft);

    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 600;

    border-radius: 9px;

    transition:
        color var(--transition),
        background var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--surface-soft);
}

.controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box,
#langSwitch,
#themeToggle {
    min-height: 40px;

    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);

    border-radius: 10px;

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.search-box {
    width: 170px;
    padding: 8px 11px;
}

.search-box::placeholder {
    color: var(--text-soft);
}

.search-box:focus,
#langSwitch:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(0, 174, 234, 0.12);

    outline: none;
}

#langSwitch {
    padding: 7px 9px;
    cursor: pointer;
}

#themeToggle {
    width: 40px;
    padding: 0;

    display: inline-grid;
    place-items: center;

    cursor: pointer;

    font-size: 1.05rem;
}

#themeToggle:hover {
    border-color: var(--primary);
    background: var(--surface-soft);
}


/* =========================================================
   7. HERO
   ========================================================= */

.hero {
    min-height: 540px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    padding-block: 100px;

    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";

    position: absolute;
    z-index: -1;

    width: 430px;
    height: 430px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(0, 174, 234, 0.2),
            transparent 68%
        );

    filter: blur(8px);
}

.hero h1 {
    max-width: 900px;

    margin: 0;

    font-size:
        clamp(
            2.3rem,
            7vw,
            5rem
        );

    line-height: 1.05;
    letter-spacing: -0.04em;

    background:
        linear-gradient(
            120deg,
            var(--text),
            var(--primary)
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

.hero p {
    max-width: 760px;

    margin:
        24px
        auto
        0;

    color: var(--text-soft);

    font-size:
        clamp(
            1rem,
            2vw,
            1.2rem
        );
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 12px;

    margin-top: 30px;
}


/* =========================================================
   8. BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;

    padding:
        10px
        20px;

    border-radius: 12px;

    background: var(--primary);
    color: #ffffff;

    text-decoration: none;

    font-weight: 700;

    box-shadow:
        0 8px 20px rgba(0, 174, 234, 0.2);

    cursor: pointer;

    transition:
        transform var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.btn:hover {
    background: var(--primary-dark);

    transform: translateY(-2px);

    box-shadow:
        0 12px 25px rgba(0, 174, 234, 0.28);
}

.btn:active {
    transform: translateY(0);
}


/* =========================================================
   9. CARDS GRID
   ========================================================= */

.cards {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(230px, 1fr)
        );

    gap: 20px;
}


/* =========================================================
   10. BASE CARD
   ========================================================= */

.card {
    position: relative;

    min-width: 0;

    padding: 26px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);

    color: var(--text);

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.card:hover {
    transform: translateY(-5px);

    border-color:
        rgba(0, 174, 234, 0.42);

    box-shadow: var(--shadow-md);
}

.card h3 {
    margin:
        10px
        0
        8px;

    line-height: 1.3;
}

.card p {
    margin: 0;
    color: var(--text-soft);
}


/* =========================================================
   11. PLATFORM CARDS
   ========================================================= */

.platform-card {
    width: 100%;

    appearance: none;
    -webkit-appearance: none;

    text-align: start;

    cursor: pointer;

    background: var(--surface);

    color: var(--text);
}

.platform-card:hover {
    border-color: var(--primary);
}

.platform-icon {
    width: 58px;
    height: 58px;

    display: grid;
    place-items: center;

    margin-bottom: 12px;

    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            rgba(0, 174, 234, 0.14),
            rgba(0, 174, 234, 0.04)
        );

    font-size: 1.8rem;
}


.platform-svg-icon {
    width: 34px;
    height: 34px;

    fill: none;

    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;

    color: var(--primary);
}


/* =========================================================
   12. PLATFORM RESULTS
   ========================================================= */

.platform-results {
    width: 100%;

    margin-top: 46px;

    padding: 35px;

    border:
        1px solid
        var(--border);

    border-radius: var(--radius-lg);

    background:
        linear-gradient(
            145deg,
            var(--surface),
            var(--surface-soft)
        );

    box-shadow: var(--shadow-md);
}

.platform-results[hidden] {
    display: none !important;
}

.platform-result-card {
    overflow: hidden;
    padding: 0;
}

.platform-result-card:hover {
    transform: translateY(-4px);
}

.platform-card-image {
    width: 100%;
    height: 190px;

    object-fit: cover;

    background: var(--surface-soft);
}

.platform-card-icon {
    width: 100%;
    min-height: 150px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            145deg,
            rgba(0, 174, 234, 0.12),
            var(--surface-soft)
        );

    font-size: 3rem;
}

.platform-card-content {
    padding: 22px;
}

.platform-card-category {
    display: inline-block;

    margin-bottom: 7px;

    color: var(--primary);

    font-size: 0.78rem;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.platform-card-content h3 {
    margin-top: 0;
}

.platform-card-content small {
    display: block;

    margin-top: 13px;

    color: var(--text-soft);
}

.platform-rating {
    margin-top: 13px;

    font-weight: 700;
}
/* =========================================================
   13. PRODUCT PRICE
   ========================================================= */

.product-price {
    display: inline-block;

    margin-top: 16px;

    color: var(--primary);

    font-size: 1.15rem;
}


/* =========================================================
   14. PROJECTS
   ========================================================= */

.project-card {
    min-height: 210px;
}

.project-card .platform-card-icon {
    width: 58px;
    min-height: 58px;

    border-radius: 16px;

    margin-bottom: 12px;
}


/* =========================================================
   15. PORTFOLIO
   ========================================================= */

.portfolio-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(260px, 1fr)
        );

    gap: 20px;
}

.portfolio-card {
    min-height: 220px;
}


/* =========================================================
   16. WHY ASEM
   ========================================================= */

#why ul {
    width: min(760px, 100%);

    margin:
        0
        auto;

    padding: 0;

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 14px;

    list-style: none;
}

#why li {
    padding: 18px 20px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 14px;

    box-shadow: var(--shadow-sm);

    font-weight: 650;
}

#why li::before {
    content: "✓";

    display: inline-grid;
    place-items: center;

    width: 26px;
    height: 26px;

    margin-inline-end: 10px;

    border-radius: 50%;

    background:
        rgba(21, 153, 87, 0.12);

    color: var(--success);

    font-weight: 900;
}


/* =========================================================
   17. PAYMENTS
   ========================================================= */

.payments {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 18px;
}

.payments img {
    width: 92px;
    height: 54px;

    object-fit: contain;

    padding: 8px;

    background: var(--surface);

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    box-shadow: var(--shadow-sm);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.payments img:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}


/* =========================================================
   18. LOADING / EMPTY / ERROR
   ========================================================= */

.platform-state {
    min-height: 210px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
}

.platform-state:hover {
    transform: none;
}

.platform-state-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.platform-state h3 {
    margin-bottom: 5px;
}

.platform-state .btn {
    margin-top: 16px;
}

.loading-spinner {
    width: 42px;
    height: 42px;

    margin-bottom: 18px;

    border:
        4px solid
        rgba(0, 174, 234, 0.15);

    border-top-color:
        var(--primary);

    border-radius: 50%;

    animation:
        asem-spin
        0.8s linear infinite;
}

@keyframes asem-spin {

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   19. SEARCH FILTER
   ========================================================= */

.platform-result-card[hidden],
.project-card[hidden] {
    display: none !important;
}


/* =========================================================
   20. FOOTER
   ========================================================= */

footer {
    margin-top: 40px;

    padding:
        45px
        20px;

    text-align: center;

    background:
        var(--secondary);

    color: #ffffff;
}

footer p {
    margin: 18px 0 0;

    color: rgba(255, 255, 255, 0.68);
}

.social {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;
}

.social a {
    display: inline-flex;

    min-height: 38px;

    align-items: center;
    justify-content: center;

    padding:
        7px
        14px;

    border:
        1px solid
        rgba(255, 255, 255, 0.15);

    border-radius: 9px;

    color: #ffffff;

    text-decoration: none;

    transition:
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.social a:hover {
    background:
        rgba(255, 255, 255, 0.08);

    border-color:
        rgba(255, 255, 255, 0.35);

    transform: translateY(-2px);
}


/* =========================================================
   21. SCROLL TOP
   ========================================================= */

#scrollTop {
    position: fixed;

    right: 22px;
    bottom: 22px;

    z-index: 900;

    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: var(--primary);
    color: #ffffff;

    box-shadow:
        0 10px 25px
        rgba(0, 174, 234, 0.3);

    cursor: pointer;

    font-size: 1.2rem;
    font-weight: 800;

    opacity: 0;

    transform:
        translateY(12px)
        scale(0.9);

    pointer-events: none;

    transition:
        opacity var(--transition),
        transform var(--transition),
        background var(--transition);
}

#scrollTop.visible {
    opacity: 1;

    transform:
        translateY(0)
        scale(1);

    pointer-events: auto;
}

#scrollTop:hover {
    background: var(--primary-dark);
}


/* =========================================================
   22. RTL
   ========================================================= */

html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .hero,
html[dir="rtl"] .section-header,
html[dir="rtl"] footer {
    text-align: center;
}

html[dir="rtl"] .platform-card,
html[dir="rtl"] .card {
    text-align: right;
}

html[dir="rtl"] .nav-links {
    direction: rtl;
}

html[dir="rtl"] .controls {
    direction: rtl;
}

html[dir="rtl"] #scrollTop {
    right: auto;
    left: 22px;
}


/* =========================================================
   23. TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .navbar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .logo {
        margin-inline-end: auto;
    }

    .nav-links {
        order: 3;

        width: 100%;

        overflow-x: auto;

        justify-content: flex-start;

        padding-bottom: 3px;

        scrollbar-width: thin;
    }

    .controls {
        margin-inline-start: auto;
    }

}


/* =========================================================
   24. MOBILE
   ========================================================= */

@media (max-width: 720px) {

    section,
    header.hero {
        width: min(
            calc(100% - 24px),
            var(--container)
        );
    }

    section {
        padding-block: 55px;
    }

    .navbar {
        gap: 10px;
        padding:
            10px
            12px;
    }

    .logo img {
        height: 36px;
    }

    .nav-links {
        gap: 2px;
    }

    .nav-links a {
        white-space: nowrap;

        padding:
            8px
            10px;

        font-size: 0.84rem;
    }

    .controls {
        width: 100%;
    }

    .search-box {
        flex: 1;
        width: auto;
    }

    .hero {
        min-height: 470px;
        padding-block: 75px;
    }

    .hero h1 {
        letter-spacing: -0.025em;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .platform-results {
        padding: 20px;
    }

    #why ul {
        grid-template-columns: 1fr;
    }

    .payments img {
        width: 82px;
        height: 50px;
    }

}


/* =========================================================
   25. SMALL PHONES
   ========================================================= */

@media (max-width: 430px) {

    body {
        font-size: 15px;
    }

    .navbar {
        align-items: stretch;
    }

    .logo {
        width: 100%;

        justify-content: center;

        margin: 0;
    }

    .controls {
        display: grid;

        grid-template-columns:
            1fr
            auto
            auto;
    }

    .search-box {
        min-width: 0;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .platform-results {
        border-radius: 18px;
    }

    #scrollTop {
        width: 42px;
        height: 42px;

        right: 14px;
        bottom: 14px;
    }

    html[dir="rtl"] #scrollTop {
        right: auto;
        left: 14px;
    }

}


/* =========================================================
   26. PRINT
   ========================================================= */

@media print {

    .navbar,
    .controls,
    .hero-actions,
    #scrollTop,
    .social {
        display: none !important;
    }

    body {
        background: #ffffff;
        color: #000000;
    }

    section {
        width: 100%;
        padding-block: 20px;
    }

    .card {
        box-shadow: none;
        break-inside: avoid;
    }

}


/* =========================================================
   END ASEM DIGITAL SOLUTIONS CSS
   ========================================================= */
.features{
    max-width:1100px;
    margin:60px auto;
    padding:20px;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:25px;
}

.features h2{
    grid-column:1/-1;
    text-align:center;
    margin-bottom:20px;
}

.feature{
    background:var(--card);
    padding:25px;
    border-radius:12px;
    text-align:center;
    transition:.3s;
    box-shadow:0 4px 12px rgba(0,0,0,.08);
}

.feature:hover{
    transform:translateY(-6px);
}

.feature h3{
    margin-bottom:12px;
}

.feature p{
    line-height:1.7;
}
.contact {
    text-align:center;
    padding:60px 20px;
}

.social {
    display:flex;
    justify-content:center;
    gap:20px;
    flex-wrap:wrap;
}

.social a {
    text-decoration:none;
    padding:12px 20px;
    background:var(--card);
    color:var(--text);
    border-radius:10px;
}
.header {
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:20px 40px;
    background:var(--bg);
}

.nav {
    display:flex;
    align-items:center;
    gap:20px;
    flex-wrap:wrap;
}

.nav a {
    text-decoration:none;
    color:var(--text);
    font-weight:bold;
}

.search-box {
    padding:8px 12px;
    border-radius:8px;
    border:1px solid #ccc;
}

.logo {
    font-size:22px;
    font-weight:bold;
}
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    border-bottom: 1px solid #ddd;
}

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: bold;
}

#langSwitch {
    padding: 8px;
    border-radius: 6px;
}
.payments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 25px;
    align-items: center;
    padding: 30px;
}

.payments-grid img {
    width: 100px;
    height: auto;
    margin: auto;
}
.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

.nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav a {
    font-weight: bold;
}
.header {
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:20px 40px;
}

.nav {
    display:flex;
    gap:25px;
    align-items:center;
}

.nav a {
    font-weight:bold;
}
/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: 0.3s;
}

/* Theme */
:root {
    --bg: #ffffff;
    --text: #222;
    --card: #f5f5f5;
}

.dark {
    --bg: #121212;
    --text: #f1f1f1;
    --card: #1e1e1e;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: var(--card);
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    text-decoration: none;
    color: var(--text);
}

/* Hero */
.hero {
    text-align: center;
    padding: 80px 20px;
}

/* All sections */
.services-grid,
.projects-grid,
.portfolio-grid,
.payments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 30px;
}

/* Cards */
.service-card,
.project-card {
    background: var(--card);
    padding: 25px;
    border-radius: 12px;
}

/* Images */
.portfolio-grid img {
    width: 100%;
    border-radius: 10px;
}

/* Dark button */
.theme-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 20px;
}

/* Mobile */
@media(max-width:700px){

.header {
    flex-direction: column;
    gap:20px;
}

.nav {
    flex-direction: column;
}

}
.logo img {
    width: auto;
    height: 58px;
    max-width: 180px;
    object-fit: contain;
}

/* TEMP SVG ICON DIAGNOSTIC */
.platform-icon {
    display: grid !important;
    place-items: center !important;
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    color: #000 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.platform-svg-icon {
    display: block !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.5 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
}
