/* ===== Local Fonts ===== */
@font-face {
    font-family: 'UKIJ Tor';
    src: url('font/UKIJTor.eot');
    src: url('font/UKIJTor.eot?#iefix') format('embedded-opentype'),
         url('font/UKIJTor.woff') format('woff'),
         url('font/UKIJTor.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===== Theme Variables ===== */

/* Dark Theme (Default) */
:root,
body.dark-theme {
    /* Colors - Dark */
    /* Slightly more transparent so blurred bg peeks through clearly */
    --bg-primary: rgba(15, 23, 42, 0.72);
    --bg-secondary: rgba(30, 41, 59, 0.65);
    --bg-tertiary: rgba(51, 65, 85, 0.72);
    --bg-card: rgba(30, 41, 59, 0.72);
    --bg-card-hover: rgba(39, 52, 73, 0.82);
    --bg-input: rgba(51, 65, 85, 0.82);

    /* Text Colors - Dark */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;

    /* Accent Colors */
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --accent-light: rgba(59, 130, 246, 0.1);

    /* Borders & Shadows - Dark */
    --border-color: rgba(51, 65, 85, 0.75);
    --border-light: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 8px 30px rgba(59, 130, 246, 0.25);
    --shadow-navbar: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);

    /* Navbar */
    --navbar-bg: rgba(15, 23, 42, 0.6);
    --navbar-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);

    /* Overlay gradient */
    --overlay-start: rgba(30, 41, 59, 0.75);
    --overlay-end: rgba(59, 130, 246, 0.55);

    /* Icon background */
    --icon-bg: rgba(59, 130, 246, 0.15);

    /* HTML canvas fallback (used only if image fails to load) */
    --html-bg-fallback: #0f172a;
}

/* Light Theme */
body.light-theme {
    /* Colors - Light */
    --bg-primary: rgba(255, 255, 255, 0.72);
    --bg-secondary: rgba(248, 250, 252, 0.62);
    --bg-tertiary: rgba(226, 232, 240, 0.72);
    --bg-card: rgba(255, 255, 255, 0.76);
    --bg-card-hover: rgba(241, 245, 249, 0.84);
    --bg-input: rgba(255, 255, 255, 0.88);

    /* Text Colors - Light */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    /* Accent Colors */
    --accent-primary: #2563eb;
    --accent-secondary: #3b82f6;
    --accent-hover: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.2);
    --accent-light: rgba(37, 99, 235, 0.08);

    /* Borders & Shadows - Light */
    --border-color: rgba(226, 232, 240, 0.82);
    --border-light: rgba(0, 0, 0, 0.06);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 30px rgba(37, 99, 235, 0.15);
    --shadow-navbar: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

    /* Navbar */
    --navbar-bg: rgba(255, 255, 255, 0.62);
    --navbar-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);

    /* Overlay gradient */
    --overlay-start: rgba(37, 99, 235, 0.7);
    --overlay-end: rgba(59, 130, 246, 0.5);

    /* Icon background */
    --icon-bg: #e8f0fe;

    /* HTML canvas fallback (used only if image fails to load) */
    --html-bg-fallback: #f8fafc;
}

/* ===== Reset and Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);

    /* IMPORTANT: body itself must NOT have a solid background-color
       because that would paint on top of body::before (the blurred image).
       Instead, the per-section containers (.services, .about, .contact,
       .footer, .hero slider) carry the tinted rgba backgrounds. */
    background: transparent;

    direction: ltr;
    transition: background-color 0.4s ease, color 0.4s ease;

    /* Force body to create its own stacking context so that
       body::before with z-index: -1 stays INSIDE body (between
       the html canvas fallback and body's children/content).
       Without this, ::before escapes to the root stacking context
       and is painted completely BEHIND html { background-color }. */
    position: relative;
    isolation: isolate;
    min-height: 100vh;
}

body.ug {
    direction: rtl;
    font-family: 'UKIJ Tor', 'UKIJ Ekran', 'Scheherazade', Tahoma, sans-serif;
}

/* ===== Blurred Global Background (service-bg.jpg) ===== */
html {
    min-height: 100%;
    /* Fallback color used only if service-bg.jpg fails to load.
       Adapted per-theme via CSS variable. */
    background-color: var(--html-bg-fallback, #0f172a);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url('../images/service-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    /* Blur the image itself — never the content on top. */
    filter: blur(8px) saturate(1.1);

    /* Expand slightly past viewport so the blurred halo edges
       (which fade to transparent) are cropped out of sight. */
    transform: scale(1.12);

    /* Full-strength so the image is visible through tinted sections.
       Readability is preserved by the rgba() tint on .services / .about
       / .contact / .footer containers. */
    opacity: 1;
    pointer-events: none;
}

/* Light theme: soften the blurred image so it doesn't wash out text. */
body.light-theme::before {
    filter: blur(8px) saturate(1.05) brightness(1.05);
    opacity: 0.92;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--navbar-shadow);
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.ug .nav-container {
    flex-direction: row-reverse;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: -0.3px;
    transition: color 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

body.ug .nav-menu {
    flex-direction: row-reverse;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

body.ug .nav-menu a::after {
    left: auto;
    right: 0;
}

.nav-menu a:hover {
    color: var(--accent-primary);
}

.nav-menu a:hover::after {
    width: 100%;
}

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

/* Theme Toggle Button */
.theme-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-glow);
}

.theme-icon {
    position: absolute;
    font-size: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-icon.sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-icon.moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

body.light-theme .theme-icon.sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

body.light-theme .theme-icon.moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.lang-switch {
    display: flex;
    gap: 8px;
}

.lang-btn {
    padding: 6px 14px;
    border: 1px solid var(--accent-primary);
    background-color: transparent;
    color: var(--accent-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background-color: var(--accent-primary);
    color: #fff;
}

.lang-btn:hover:not(.active) {
    background-color: var(--accent-light);
}

/* ===== Hero Slider ===== */
.hero {
    margin-top: 70px;
}

.slider {
    position: relative;
    width: 100%;
    height: 680px;              /* 600px → 680px: phone was 650px tall, needs room */
    overflow: hidden;
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient veil removed (user requested: "تەگلىك رەڭگىنى چىقىرۋەت") —
       hero slider images now show with no tint. */
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Static hero background (slides removed) ===== */
.hero {
    position: relative;
    width: 100%;
    height: 680px;                /* same as old .slider height */
    min-height: 680px;
    overflow: hidden;
}
.hero-static-bg {
    position: absolute;
    inset: 0;
    /* Single static image replacing the 4 cycling slides.
       Use 01.jpg as the static hero background (keeps the original look). */
    background-image: url('../images/01.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-content {
    /* Two-column layout: hero-text (left) + hero-mockup (right).
       body.ug flips to row-reverse so RTL users see mockup on
       their reading "right" side (which is visual LEFT). */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    text-align: left;
    color: #fff;
    max-width: 1200px;
    width: 100%;
    padding: 32px 48px;         /* add vertical padding so text/phone don't kiss edges */
    z-index: 5;
}

/* Columns share space; mockup slightly narrower so text dominates. */
.hero-text {
    flex: 1 1 55%;
    min-width: 0;
}
.hero-mockup {
    flex: 1 1 45%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== App mockup / Phone frame ===== */
.phone-frame {
    position: relative;
    width: min(260px, 100%);     /* 300px → 260px: height 650px → 563px, fits in 680px slider */
    aspect-ratio: 9 / 19.5;      /* modern phone ~19.5:9 */
    border-radius: 44px;
    background: linear-gradient(145deg, #0a0a0a, #1f2937 80%);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55),
        0 10px 25px rgba(59, 130, 246, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Top speaker / camera notch */
.phone-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 38%;
    height: 22px;
    border-radius: 16px;
    background: #050505;
    z-index: 2;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset;
}

/* ===== Phone mini-slider: app-01 ~ app-04 — MANUAL mode (no auto-animation) ===== */

.phone-slides {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 34px;
    background-color: #0f172a;
    z-index: 1;                  /* under the notch (z-index 2) */
}

/* All phone app images: hidden by default, only .active shows */
.phone-slide-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;   /* smooth fade when switching via arrows */
    transform: translateZ(0);
    backface-visibility: hidden;
}
.phone-slide-img.active {
    opacity: 1;
}

/* ===== Phone slider prev/next buttons (on left/right of phone) ===== */
.hero-mockup {
    /* establish containing block for absolutely-positioned arrows */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;          /* fully round */
    border: none;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.62);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    z-index: 10;                   /* above phone frame + its images */
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.phone-nav-btn:hover,
.phone-nav-btn:focus-visible {
    background: rgba(59, 130, 246, 0.9);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 10px 26px rgba(59, 130, 246, 0.45);
    outline: none;
}
.phone-nav-btn:active {
    transform: translateY(-50%) scale(0.97);
}

/* Left arrow sits visually to the LEFT of the phone */
.phone-nav-btn.prev {
    left: -14px;                   /* hang outside phone on the left */
}
/* Right arrow sits visually to the RIGHT of the phone */
.phone-nav-btn.next {
    right: -14px;                  /* hang outside phone on the right */
}

/* Responsive safety: on narrow screens, don't let arrows escape viewport */
@media (max-width: 768px) {
    .phone-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    .phone-nav-btn.prev { left: 2px; }
    .phone-nav-btn.next { right: 2px; }
}

/* ---- RTL / Uyghur layout ---- */
body.ug .hero-content {
    flex-direction: row-reverse;
    text-align: right;
}
/* Mirror the phone tilt so it still faces the text in RTL mode */
body.ug .phone-frame {
    transform: perspective(1100px) rotateY(6deg) rotateX(1.5deg);
}
body.ug .phone-frame:hover {
    transform: perspective(1100px) rotateY(2deg) rotateX(0.5deg) translateY(-2px);
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.35);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 400;
    opacity: 0.95;
}

.btn-primary {
    display: inline-block;
    padding: 14px 36px;
    background-color: #fff;
    color: var(--accent-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.2px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 52px;
    height: 52px;
    font-size: 22px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.slider-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--accent-primary);
    transform: translateY(-50%) scale(1.08);
}

.slider-btn.prev {
    left: 30px;
}

.slider-btn.next {
    right: 30px;
}

body.ug .slider-btn.prev {
    left: auto;
    right: 30px;
}

body.ug .slider-btn.next {
    right: auto;
    left: 30px;
}

.slider-dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.dot.active {
    background-color: #fff;
    transform: scale(1.35);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* ===== Section Common ===== */
section {
    padding: 90px 0;
    transition: background-color 0.4s ease;
}

.section-title {
    font-size: 38px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.4px;
    transition: color 0.4s ease;
}

.section-subtitle {
    font-size: 18px;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 56px;
    transition: color 0.4s ease;
}

/* ===== Services ===== */
.services {
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 28px;
}

.service-card {
    background-color: var(--bg-card);
    padding: 44px 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    border: 1px solid var(--border-light);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    background-color: var(--bg-card-hover);
}

.service-icon {
    font-size: 52px;
    margin-bottom: 20px;
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    background: var(--icon-bg);
    border-radius: 20px;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 14px;
    color: var(--accent-primary);
    font-weight: 600;
    transition: color 0.3s ease;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.85;
    transition: color 0.4s ease;
}

body.ug .service-card p {
    text-align: right;
}

/* ===== About ===== */
.about {
    background-color: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

body.ug .about-content {
    direction: rtl;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 28px;
}

body.ug .about-text .section-title {
    text-align: right;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 22px;
    line-height: 1.95;
    transition: color 0.4s ease;
}

body.ug .about-text p {
    text-align: right;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 36px;
}

.stat-item {
    text-align: center;
    padding: 24px 16px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.stat-number {
    font-size: 38px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.4s ease;
}

.about-image img {
    width: 100%;
    height: 470px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

/* ===== Contact ===== */
.contact {
    background-color: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

body.ug .contact-grid {
    direction: rtl;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

body.ug .contact-info {
    align-items: flex-end;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

body.ug .contact-item {
    flex-direction: row-reverse;
    text-align: right;
}

.contact-icon {
    font-size: 26px;
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    background-color: var(--icon-bg);
    color: var(--accent-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    transition: color 0.4s ease;
}

.contact-item p {
    color: var(--text-secondary);
    font-size: 15px;
    transition: color 0.4s ease;
}

.contact-form {
    background-color: var(--bg-card);
    padding: 44px;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: all 0.4s ease;
}

body.ug .contact-form {
    direction: rtl;
}

.form-group {
    margin-bottom: 22px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: var(--bg-input);
    color: var(--text-primary);
}

body.ug .form-group input,
body.ug .form-group textarea {
    text-align: right;
    direction: rtl;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.contact-form .btn-primary {
    width: 100%;
    background-color: var(--accent-primary);
    color: #fff;
}

.contact-form .btn-primary:hover {
    background-color: var(--accent-hover);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 64px 0 24px;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

body.ug .footer-content {
    direction: rtl;
    text-align: right;
}

.footer-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--accent-primary);
    font-weight: 700;
}

.footer-section h4 {
    font-size: 17px;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.footer-section p {
    color: var(--text-muted);
    line-height: 1.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-primary);
    padding-left: 4px;
}

body.ug .footer-section ul li a:hover {
    padding-left: 0;
    padding-right: 4px;
}

.social-links {
    display: flex;
    gap: 12px;
}

body.ug .social-links {
    justify-content: flex-end;
}

.social-link {
    display: inline-block;
    padding: 9px 18px;
    background-color: var(--icon-bg);
    color: var(--accent-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--accent-primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.4s ease, border-color 0.4s ease;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 14px;
    }

    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 18px;
    }

    .nav-controls {
        margin-left: auto;
    }

    body.ug .nav-controls {
        margin-left: 0;
        margin-right: auto;
    }

    .slider {
        height: 420px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 17px;
    }

    /* ---- Mobile hero: stack text + mockup vertically ---- */
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 0 24px;
        gap: 28px;
    }
    body.ug .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-text {
        flex: 0 0 auto;
        width: 100%;
    }
    .hero-mockup {
        flex: 0 0 auto;
        width: 100%;
    }
    .phone-frame {
        width: min(210px, 62vw);
        transform: none;    /* remove 3D tilt on touch devices */
    }
    body.ug .phone-frame {
        transform: none;
    }

    .section-title {
        font-size: 30px;
    }

    section {
        padding: 64px 0;
    }

    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .stat-number {
        font-size: 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 36px;
    }

    body.ug .footer-content {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    body.ug .social-links {
        justify-content: center;
    }

    .slider-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .slider-btn.prev {
        left: 12px;
    }

    .slider-btn.next {
        right: 12px;
    }

    body.ug .slider-btn.prev {
        right: 12px;
    }

    body.ug .slider-btn.next {
        left: 12px;
    }

    .contact-form {
        padding: 30px 22px;
    }
}

@media (max-width: 480px) {
    .slider {
        height: 370px;
    }

    .hero-content h1 {
        font-size: 26px;
    }

    .hero-content p {
        font-size: 15px;
    }

    section {
        padding: 50px 0;
    }

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

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

    .section-title {
        font-size: 26px;
    }

    .nav-container {
        padding: 12px 16px;
    }

    .logo {
        font-size: 20px;
    }

    .nav-menu {
        gap: 14px;
        font-size: 14px;
    }
}