/* متغیرهای پایهٔ تم و رنگ */
:root {
    --bg-color: #f9fafb;
    --panel-color: rgba(255, 255, 255, 0.82);
    --text-color: #0b1224;
    --text-muted: #5b6478;
    --primary-accent: #2563eb;
    --primary-accent-2: #60a5fa;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --card-bg: rgba(255, 255, 255, 0.72);
    --card-shadow: 0px 18px 50px rgba(15, 23, 42, 0.08);
    --card-hover-shadow: 0px 26px 70px rgba(15, 23, 42, 0.12);
    --border-radius: 18px;
    --nav-width: 1100px;
    --gradient: linear-gradient(135deg, #2563eb, #1e40af);
    --outline: rgba(15, 23, 42, 0.08);
    /* رنگ و گرادیانت عنوان H1 در حالت روشن */
    --h1-gradient: linear-gradient(135deg, #0b1224 0%, #0f172a 45%, #161e2f 100%);
}

/* تنظیمات تم تیره */
body.theme-dark {
    --bg-color: #020617;
    --panel-color: rgba(10, 14, 28, 0.7);
    --text-color: #e5edff;
    --text-muted: #94a3b8;
    --primary-accent: #0ea5e9;
    --primary-accent-2: #38bdf8;
    --glass-bg: rgba(7, 11, 24, 0.65);
    --card-bg: rgba(14, 20, 38, 0.72);
    --card-shadow: 0px 18px 60px rgba(6, 8, 21, 0.55);
    --card-hover-shadow: 0px 30px 90px rgba(14, 165, 233, 0.25);
    --gradient: linear-gradient(135deg, #0ea5e9, #2563eb);
    --outline: rgba(255, 255, 255, 0.1);
    /* رنگ و گرادیانت عنوان H1 در حالت تیره: روشن و درخشان */
    --h1-gradient: linear-gradient(135deg, #e5f6ff 0%, #b6e6ff 45%, #7fd4ff 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbars for card/panel/modal elements while preserving scroll behavior */
/* Targets common UI containers that open on click */
.card,
.panel,
.modal,
.contact-modal-body,
.contact-tab-pane,
.about-digital,
.about-stats-card,
.contact-modal,
details,
.dropdown,
.social-media-buttons {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.card::-webkit-scrollbar,
.panel::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.contact-modal-body::-webkit-scrollbar,
.contact-tab-pane::-webkit-scrollbar,
.about-digital::-webkit-scrollbar,
.about-stats-card::-webkit-scrollbar,
.contact-modal::-webkit-scrollbar,
details::-webkit-scrollbar,
.dropdown::-webkit-scrollbar,
.social-media-buttons::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

/* Utility class for any additional container you want to hide scrollbars on */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Samim', 'Inter', sans-serif;
    background:
        radial-gradient(circle at 18% 18%, rgba(17, 24, 39, 0.06), transparent 32%),
        radial-gradient(circle at 82% 8%, rgba(14, 165, 233, 0.08), transparent 30%),
        var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s ease, color 0.3s ease;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* تیتل‌ها با فونت Digi Hamishe Bold */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Digi Hamishe Bold', 'Samim', sans-serif;
}

.section-title h2 {
    font-family: 'Digi Hamishe Bold', 'Samim', sans-serif;
}

.badge {
    font-family: 'Digi Hamishe Bold', 'Samim', sans-serif;
}

/* متن‌های توضیحات با Samim */
p,
.card p {
    font-family: 'Samim', 'Inter', sans-serif;
}

body.loading {
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.28), transparent 35%);
    pointer-events: none;
    z-index: -3;
}

/* افکت نور عقب‌ران (نور موس) */
/* Mouse Light Effect */
.mouse-light {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(37, 99, 235, 0.1) 40%, transparent 70%);
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
    filter: blur(40px);
}

body.theme-dark .mouse-light {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.06) 40%, transparent 70%);
}

/* لودر صفحه ورودی: ویدیو، لوگو و اسپینر */
/* Intro Loader */
.intro-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

.intro-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.intro-overlay {
    position: absolute;
    inset: 0;
    /* Bright hero-like overlay for light theme so the loader video feels warm and bright */
    background:
        radial-gradient(circle at 18% 15%, rgba(17, 24, 39, 0.06), transparent 32%),
        radial-gradient(circle at 82% 12%, rgba(14, 165, 233, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(249, 250, 251, 0.82) 0%, rgba(249, 250, 251, 0.75) 42%, rgba(249, 250, 251, 0.88) 100%);
    z-index: 0;
}

body.theme-dark .intro-overlay {
    /* Darker overlay in dark mode so video remains visible but moody */
    background:
        radial-gradient(circle at 22% 18%, rgba(0, 0, 0, 0.44), transparent 34%),
        radial-gradient(circle at 78% 26%, rgba(14, 165, 233, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.96) 100%);
}

.intro-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.intro-content {
    text-align: center;
    animation: introFadeIn 1s ease forwards;
    position: relative;
    z-index: 10;
}

@keyframes introFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.intro-logo {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 80px;
    color: var(--text-color);
    /* dark in light theme */
    letter-spacing: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0px;
    margin-bottom: 30px;
    animation: logoPulse 2s ease-in-out infinite;
    position: relative;
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.intro-logo svg path {
    stroke: currentColor;
}

body.theme-dark .intro-logo {
    color: var(--primary-accent-2);
}

.intro-logo.moving {
    animation: logoMove 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes logoMove {
    0% {
        font-size: 80px;
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(0, -20px) scale(0.8);
    }

    100% {
        font-size: 20px;
        transform: translate(var(--target-x), var(--target-y)) scale(1);
        opacity: 1;
    }
}

.intro-logo span {
    color: var(--primary-accent-2);
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.intro-logo svg {
    width: 60px;
    height: 60px;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--primary-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    margin-top: 20px;
    font-size: 16px;
    color: var(--text-muted);
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.btn:active,
.nav-item:active {
    transform: scale(0.96) !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

#cursor-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
}

.cursor-particle {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-accent);
    transform: translate(-50%, -50%) scale(1);
    will-change: transform, opacity;
    opacity: 0.95;
    transition: opacity 0.3s ease, width 0.2s ease, height 0.2s ease;
    filter: drop-shadow(0 8px 20px rgba(14, 165, 233, 0.22));
}

.cursor-particle.small {
    width: 6px;
    height: 6px;
    opacity: 0.8;
    filter: none;
    background: rgba(14, 165, 233, 0.95);
}

.flex {
    display: flex;
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.flex-col {
    flex-direction: column;
}

.text-center {
    text-align: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.nav-btn {
    outline: none;
    border: none;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-primary {
    background-image: var(--gradient);
    color: #fff;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.2);
    border: 1px solid var(--outline);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 45px rgba(17, 24, 39, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--outline);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
    transform: translateY(-2px);
}

.badge {
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary-accent);
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 48px;
    border: 1px solid var(--outline);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

body.theme-dark .badge {
    background: rgba(255, 255, 255, 0.05);
    color: #e5edff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ناوبری بالای صفحه */
.navbar-container {
    position: fixed;
    top: 24px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

.navbar {
    pointer-events: auto;
    width: 90%;
    max-width: var(--nav-width);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--outline);
    border-radius: 100px;
    padding: 12px 26px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
    display: flex;
    /* Keep layout fixed: prevent direction (rtl/ltr) from reordering navbar children */
    direction: ltr;
    align-items: center;
    justify-content: space-between;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navbar.scrolled {
    transform: translateY(-5px) scale(0.98);
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.25);
}

body.theme-dark .navbar {
    background: linear-gradient(135deg, rgba(7, 11, 24, 0.8), rgba(7, 11, 24, 0.68));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.navbar::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 100px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
    pointer-events: none;
    opacity: 0.6;
}

.logo {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: var(--text-color);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover {
    transform: scale(1.1) rotate(-2deg);
}

.logo span {
    color: var(--primary-accent-2);
    display: inline-block;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    animation: fadeInScroll 2s ease 3s forwards;
    opacity: 0;
    transition: opacity 0.5s ease;
}

@keyframes fadeInScroll {
    to {
        opacity: 1;
    }
}

.scroll-indicator.scrolling {
    opacity: 0 !important;
}

.mouse-scroll {
    width: 20px;
    height: 35px;
    border: 2px solid var(--primary-accent);
    border-radius: 15px;
    position: relative;
    display: flex;
    justify-content: center;
    opacity: 0.7;
}

.mouse-scroll::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--primary-accent);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {

    0%,
    100% {
        top: 6px;
        opacity: 1;
    }

    50% {
        top: 20px;
        opacity: 0.3;
    }
}

.scroll-text {
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

/* مودال — پنجرهٔ جزئیات */
/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    animation: overlayRipple 0.6s ease-out;
}

@keyframes overlayRipple {
    0% {
        background: radial-gradient(circle at var(--click-x, 50%) var(--click-y, 50%), rgba(37, 99, 235, 0.4) 0%, rgba(0, 0, 0, 0) 0%);
    }

    100% {
        background: radial-gradient(circle at var(--click-x, 50%) var(--click-y, 50%), rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.75) 100%);
    }
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--outline);
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.7s cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* Modal responsive برای موبایل */
@media (max-width: 768px) {
    .modal {
        max-width: 95%;
        width: 95%;
        max-height: 90vh;
        border-radius: 20px;
    }

    .modal-header {
        padding: 20px 24px;
    }

    .modal-header h3 {
        font-size: 22px;
    }

    .modal-body {
        padding: 20px 24px;
    }
}

@media (max-width: 480px) {
    .modal {
        max-width: 98%;
        width: 98%;
        max-height: 95vh;
        border-radius: 16px;
        top: 50%;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header h3 {
        font-size: 18px;
    }

    .modal-close {
        font-size: 28px;
        width: 32px;
        height: 32px;
    }

    .modal-body {
        padding: 16px 20px;
    }

    .modal-image {
        max-height: 200px;
    }
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    animation: smoothModalOpen 0.8s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes smoothModalOpen {
    0% {
        transform: translate(-50%, -50%) scale(0.7) translateY(50px);
        opacity: 0;
    }

    60% {
        transform: translate(-50%, -50%) scale(1.02) translateY(-5px);
    }

    100% {
        transform: translate(-50%, -50%) scale(1) translateY(0);
        opacity: 1;
    }
}

.modal.closing {
    animation: smoothModalClose 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes smoothModalClose {
    0% {
        transform: translate(-50%, -50%) scale(1) translateY(0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.7) translateY(50px);
        opacity: 0;
    }
}

.modal-header {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    padding: 24px 32px;
    border-bottom: 1px solid var(--outline);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.modal-header h3 {
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--outline);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 20px;
}

.modal-close:hover {
    background: var(--primary-accent);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    padding: 32px;
}

.modal-image {
    width: 100%;
    height: 280px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-content p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.modal-features {
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.modal-features h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-accent);
}

.modal-features ul {
    list-style: none;
}

.modal-features li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text-muted);
}

.modal-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-accent);
    font-weight: bold;
    font-size: 18px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-accent);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--primary-accent);
    transform: translateY(-2px);
}

.nav-links a:hover::after {
    width: 100%;
}

body.theme-dark .nav-links a:hover {
    color: #fff;
}

.nav-btn {
    background-image: var(--gradient);
    color: white;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Fallback: ensure all buttons are pill-shaped like the badge */
.btn,
button,
.nav-btn,
.mobile-menu .nav-btn {
    border-radius: 100px !important;
}

.nav-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.3);
}

.language-btn {
    background: rgba(255, 255, 255, 0.86);
    color: var(--text-color);
    padding: 10px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--outline);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-left: 12px;
    cursor: pointer;
}

.language-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.3);
}

body.theme-dark .language-btn {
    background: rgba(7, 11, 24, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e5edff;
}

/* Navbar will follow document direction (rtl for Persian/Arabic) */

body[dir="rtl"] .language-menu {
    right: auto;
    left: 26px;
}

.language-menu {
    position: fixed;
    top: 80px;
    right: 26px;
    background: linear-gradient(135deg, var(--panel-color) 0%, rgba(255, 255, 255, 0.95) 100%);
    border: 1px solid var(--outline);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
    padding: 4px;
    display: none;
    z-index: 1200;
    width: fit-content;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.theme-dark .language-menu {
    background: linear-gradient(135deg, rgba(14, 20, 38, 0.95), rgba(7, 11, 24, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.language-menu.active {
    display: block;
    transform: scale(1);
    opacity: 1;
}

.language-option {
    display: block;
    width: 100%;
    padding: 6px 10px;
    background: none;
    border: none;
    color: var(--text-color);
    text-align: start;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.language-option:hover {
    background: rgba(14, 165, 233, 0.1);
    transform: translateX(2px);
}

body.theme-dark .language-option {
    color: #e5edff;
}

body.theme-dark .language-option:hover {
    background: rgba(14, 165, 233, 0.15);
    transform: translateX(2px);
}

/* @font-face برای فونت‌های فارسی */
@font-face {
    font-family: 'Digi Hamishe Bold';
    src: url('../fonts/Digi%20Hamishe%20Bold.ttf') format('truetype');
    font-weight: bold;
}

@font-face {
    font-family: 'Samim';
    src: url('../fonts/Samim.ttf') format('truetype');
}

@font-face {
    font-family: 'SGKara-Light';
    src: url('../fonts/SGKara-Light_p30download.com.ttf') format('truetype');
    font-weight: 300;
}



@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* دکمهٔ تغییر حالت تم */
.theme-toggle {
    position: fixed;
    left: 26px;
    top: 130px;
    padding: 11px 16px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text-color);
    border: 1px solid var(--outline);
    box-shadow: 0 16px 50px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1200;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(10deg);
}

body.theme-dark .theme-toggle {
    background: rgba(7, 11, 24, 0.8);
    color: #e5edff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* منوی Hamburger برای موبایل */
.hamburger-menu {
    display: none;
    position: fixed;
    right: 20px;
    top: 24px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(96, 165, 250, 0.95));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 14px;
    cursor: pointer;
    z-index: 1150;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.hamburger-menu:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(96, 165, 250, 1));
    transform: scale(1.08);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.3);
}

body.theme-dark .hamburger-menu {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.95), rgba(56, 189, 248, 0.95));
    border: 1px solid rgba(14, 165, 233, 0.2);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.2);
}

body.theme-dark .hamburger-menu:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 1), rgba(56, 189, 248, 1));
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.3);
}

.hamburger-menu span {
    width: 24px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.theme-dark .hamburger-menu span {
    background: #fff;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* منوی پایین‌رو موبایل */
.mobile-menu {
    display: none;
    position: fixed;
    top: 24px;
    right: 0;
    width: 100%;
    max-width: 320px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.92));
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--outline);
    border-radius: 0 0 20px 0;
    padding: 0;
    flex-direction: column;
    gap: 0;
    z-index: 1140;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
}

body.theme-dark .mobile-menu {
    background: linear-gradient(135deg, rgba(7, 11, 24, 0.97), rgba(7, 11, 24, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.4);
}

.mobile-menu.active {
    display: flex;
    animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-menu a {
    display: block;
    padding: 16px 24px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    transition: all 0.3s ease;
    text-align: right;
    direction: rtl;
}

body.theme-dark .mobile-menu a {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: #e5edff;
}

.mobile-menu a:hover {
    background: rgba(14, 165, 233, 0.1);
    padding-right: 28px;
}

body.theme-dark .mobile-menu a:hover {
    background: rgba(14, 165, 233, 0.15);
}

.close-mobile-menu:hover {
    transform: rotate(90deg);
    color: var(--primary-accent);
}

body.theme-dark .close-mobile-menu:hover {
    color: var(--primary-accent-2);
}

.mobile-menu .nav-btn {
    width: calc(100% - 48px);
    margin: 12px 24px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    border: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* نمایش منوی موبایل در اندازه‌های کوچک */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .mobile-menu {
        display: none;
        flex-direction: column;
    }

    .mobile-menu.active {
        display: flex;
    }

    .navbar .nav-btn {
        display: none;
    }

    .language-btn {
        display: none;
    }
}

/* Theme Toggle Mobile Responsive */
@media (max-width: 768px) {
    .theme-toggle {
        display: none !important;
    }

    .mobile-theme-toggle {
        padding: 16px 24px;
        background: none;
        border: none;
        border-top: 1px solid rgba(15, 23, 42, 0.1);
        color: var(--text-color);
        cursor: pointer;
        font-size: 14px;
        text-align: right;
        direction: rtl;
        width: 100%;
        transition: all 0.3s ease;
        font-weight: 500;
    }

    .mobile-theme-toggle:hover {
        background: rgba(14, 165, 233, 0.1);
        padding-right: 28px;
    }

    .mobile-language-btn {
        padding: 16px 24px;
        background: none;
        border: none;
        border-top: 1px solid rgba(15, 23, 42, 0.1);
        color: var(--text-color);
        cursor: pointer;
        font-size: 14px;
        text-align: right;
        direction: rtl;
        width: 100%;
        transition: all 0.3s ease;
        font-weight: 500;
    }

    .mobile-language-btn:hover {
        background: rgba(14, 165, 233, 0.1);
        padding-right: 28px;
    }

    body.theme-dark .mobile-language-btn {
        border-top-color: rgba(255, 255, 255, 0.08);
        color: #e5edff;
    }

    body.theme-dark .mobile-language-btn:hover {
        background: rgba(14, 165, 233, 0.15);
    }

    body.theme-dark .mobile-theme-toggle {
        border-top-color: rgba(255, 255, 255, 0.08);
        color: #e5edff;
    }

    body.theme-dark .mobile-theme-toggle:hover {
        background: rgba(14, 165, 233, 0.15);
    }
}

/* Tablet & Large Phones: 768px and below */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .navbar {
        width: 70%;
        max-width: 350px;
        padding: 10px 20px;
        justify-content: center;
    }

    .navbar .logo {
        font-size: 16px;
    }

    .navbar .nav-btn {
        display: none;
    }

    .hero h1 {
        font-size: 40px;
        line-height: 1.2;
    }

    .badge {
        padding: 10px 22px;
        font-size: 14px;
        margin-bottom: 20px;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .section-title p {
        font-size: 14px;
    }

    .grid-3 {
        gap: 20px;
    }

    .card {
        padding: 20px;
        min-height: 280px;
    }

    .grid-3[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }


    .container {
        padding: 0 16px;
    }
}

/* Small Phones: 640px and below */
@media (max-width: 640px) {
    .navbar {
        width: 70%;
        max-width: 280px;
        padding: 8px 16px;
        justify-content: center;
    }

    .navbar .logo {
        font-size: 14px;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 32px;
        line-height: 1.2;
    }

    .hero p {
        font-size: 15px;
        line-height: 1.5;
    }

    .badge {
        padding: 8px 18px;
        font-size: 12px;
        margin-bottom: 16px;
    }

    .section-title {
        margin-bottom: 24px;
    }

    .section-title h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    .section-title p {
        font-size: 13px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
    }

    .btn.btn-primary,
    .btn.btn-secondary {
        margin-bottom: 12px;
    }

    .card {
        padding: 16px;
        min-height: 240px;
        border-radius: 10px;
    }

    .card h3 {
        font-size: 16px;
    }

    .card p {
        font-size: 13px;
    }

    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .grid-3[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }


    .container {
        padding: 0 12px;
    }

    section {
        padding: 40px 0 !important;
    }

    .hero {
        padding: 80px 0 60px 0 !important;
    }
}

/* Extra Small Phones: 480px and below */
@media (max-width: 480px) {
    .navbar {
        width: 60%;
        max-width: 240px;
        padding: 6px 12px;
        justify-content: center;
    }

    .navbar .logo {
        font-size: 12px;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 26px;
        line-height: 1.2;
    }

    .hero p {
        font-size: 14px;
        line-height: 1.4;
    }

    .badge {
        padding: 6px 14px;
        font-size: 11px;
        margin-bottom: 14px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
    }

    .section-title h2 {
        font-size: 20px;
        line-height: 1.3;
    }

    .section-title p {
        font-size: 12px;
    }

    .card {
        padding: 14px;
        min-height: 200px;
        border-radius: 8px;
    }

    .card h3 {
        font-size: 14px;
    }

    .card p {
        font-size: 12px;
    }

    .card-icon {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }


    .container {
        padding: 0 10px;
    }

    section {
        padding: 32px 0 !important;
    }

    .hero {
        padding: 60px 0 40px 0 !important;
    }

    .scroll-indicator {
        display: none;
    }
}

/* بخش قهرمان (Hero) */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0;
}

.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(1.06) contrast(1.05) saturate(1.08);
}

body.theme-dark .video-bg {
    filter: brightness(0.85) contrast(1.05) saturate(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 15%, rgba(17, 24, 39, 0.06), transparent 32%),
        radial-gradient(circle at 82% 12%, rgba(14, 165, 233, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.90) 42%, rgba(255, 255, 255, 0.00) 100%);
    z-index: -1;
    pointer-events: none;
    backdrop-filter: blur(12px);
}

body.theme-dark .hero-overlay {
    background:
        radial-gradient(circle at 22% 18%, rgba(14, 165, 233, 0.28), transparent 34%),
        radial-gradient(circle at 78% 26%, rgba(14, 165, 233, 0.22), transparent 36%),
        linear-gradient(180deg, rgba(4, 6, 17, 0.78) 0%, rgba(4, 6, 17, 0.9) 60%, rgba(4, 6, 17, 0.96) 100%);
}

footer {
    position: relative;
    overflow: hidden;
}

.footer-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(0.85) contrast(1.05) saturate(1.08);
}

.footer-video-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 15%, rgba(17, 24, 39, 0.08), transparent 32%),
        radial-gradient(circle at 82% 12%, rgba(14, 165, 233, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(249, 250, 251, 0.82) 0%, rgba(249, 250, 251, 0.75) 42%, rgba(249, 250, 251, 0.88) 100%);
}

body.theme-dark .footer-video-overlay {
    background:
        radial-gradient(circle at 22% 18%, rgba(14, 165, 233, 0.28), transparent 34%),
        radial-gradient(circle at 78% 26%, rgba(14, 165, 233, 0.22), transparent 36%),
        linear-gradient(180deg, rgba(4, 6, 17, 0.78) 0%, rgba(4, 6, 17, 0.9) 60%, rgba(4, 6, 17, 0.96) 100%);
}

.hero-content {
    position: relative;
    z-index: 60;
    padding-top: 60px;
}

.hero h1 {
    font-family: 'SGKara-Light', Arial, sans-serif;
    font-size: clamp(52px, 6vw, 88px);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: 0;
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--primary-accent-2) 50%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 70;
    opacity: 1;
    transform: none;
    text-align: center;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.theme-dark .hero h1 {
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--primary-accent-2) 50%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typographic animation states */
.h1-line {
    display: block;
}

.h1-word {
    display: inline;
}

.h1-char {
    display: inline;
}

.hero p {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

section {
    padding: 100px 0;
    margin-top: 0;
    border-top: none;
}

.section-title h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--primary-accent-2) 50%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.section-title h2:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.section-title p {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 840px;
    margin: 0 auto 60px;
}

/* کارت‌ها (مزایا، پروژه‌ها، امکانات) */
.card {
    background: var(--card-bg);
    padding: 36px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--outline);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    height: 100%;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(18px);
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    cursor: pointer;
}

@media (max-width: 900px) {
    .card {
        min-height: 320px;
    }
}

.card.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Use transition delays to create a staggered entrance */
.card.animate-in-1 {
    transition-delay: 0.06s;
}

.card.animate-in-2 {
    transition-delay: 0.18s;
}

.card.animate-in-3 {
    transition-delay: 0.32s;
}

/* Make sure animation keyframes (if present) are not applied to avoid snapping */

/* Benefits section visual polish */
#benefits .grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 28px;
}

#benefits .card {
    padding: 22px;
    border-radius: 14px;
    min-height: 320px;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease, border-color 0.45s ease;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

#benefits .card img {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 12px;
}

#benefits .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.48);
    border-color: rgba(255, 255, 255, 0.06);
}

#benefits .card:hover img {
    transform: scale(1.04) translateY(-6px);
}

#benefits .card .card-icon {
    position: absolute;
    left: 20px;
    top: 22px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 10px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(2, 6, 23, 0.18);
}

/* Applications carousel styles */
.applications-carousel {
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.carousel-track .card {
    min-width: 380px;
    max-width: 380px;
    width: 380px;
    height: 580px;
    scroll-snap-align: center;
    flex: 0 0 auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.4);
    cursor: pointer;
    z-index: 30;
}

.carousel-btn.prev {
    left: -12px;
}

.carousel-btn.next {
    right: -12px;
}

/* When carousel is in RTL (Persian) flip nav button positions */
.applications-carousel.rtl .carousel-btn.prev {
    right: -12px;
    left: auto;
}

.applications-carousel.rtl .carousel-btn.next {
    left: -12px;
    right: auto;
}

.carousel-dots {
    text-align: center;
    margin-top: 16px;
}

.carousel-dots button {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 6px;
    display: inline-block;
}

.carousel-dots button.active {
    background: var(--primary-accent);
    box-shadow: 0 6px 16px rgba(16, 24, 53, 0.28);
}

.footer-logo-link {
    display: inline-block;
    cursor: pointer;
}

.carousel-track {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.card.animate-in-1.revealed,
.card.animate-in-2.revealed,
.card.animate-in-3.revealed {
    animation: none !important;
}

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.99) rotateX(8deg) rotateY(0deg);
    }

    50% {
        transform: translateY(-2px) scale(1.005) rotateX(-1deg) rotateY(0.6deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg) rotateY(0deg);
    }
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.35s ease;
}

.card:hover::after {
    opacity: 1;
}

.card:hover {
    transform: translateY(-12px) scale(1.02) rotateY(5deg);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(15, 23, 42, 0.18);
}

.card-icon {
    width: 54px;
    height: 54px;
    background: rgba(17, 24, 39, 0.06);
    color: var(--text-color);
    border-radius: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--outline);
}

.material-symbols-rounded {
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
    vertical-align: middle;
}

.card-icon .material-symbols-rounded {
    font-size: 24px;
}

.card:hover .card-icon {
    background: var(--gradient);
    color: white;
    transform: scale(1.15) rotate(360deg);
    border-color: transparent;
}

.card h3 {
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 700;
}

.card p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
}

footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.52));
    border-top: 1px solid var(--outline);
    padding: 80px 0 40px;
    text-align: center;
    backdrop-filter: blur(16px);
}

body.theme-dark footer {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 1));
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-logo {
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 20px;
    display: inline-block;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.footer-links a {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-links a:hover {
    color: var(--primary-accent-2);
    transform: translateY(-3px);
}

.copyright {
    color: var(--text-muted);
    font-size: 14px;
}

/* Tablet & Large Phones: 768px and below */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .navbar {
        width: 70%;
        max-width: 350px;
        padding: 10px 20px;
    }

    .navbar .logo {
        font-size: 16px;
    }

    .navbar .nav-btn {
        display: none;
    }

    .hero h1 {
        font-size: 40px;
        line-height: 1.2;
    }

    .badge {
        padding: 10px 22px;
        font-size: 14px;
        margin-bottom: 20px;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .section-title p {
        font-size: 14px;
    }

    .grid-3 {
        gap: 20px;
    }

    .card {
        padding: 20px;
        min-height: 280px;
    }

    /* Grid 2x2 خانه بخش - به 1 ستون تغییر می‌کند */
    .grid-3[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    .container {
        padding: 0 16px;
    }
}

/* Small Phones: 640px and below */
@media (max-width: 640px) {
    .navbar {
        width: 70%;
        max-width: 280px;
        padding: 8px 16px;
    }

    .navbar .logo {
        font-size: 14px;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 32px;
        line-height: 1.2;
    }

    .hero p {
        font-size: 15px;
        line-height: 1.5;
    }

    .badge {
        padding: 8px 18px;
        font-size: 12px;
        margin-bottom: 16px;
    }

    .section-title {
        margin-bottom: 24px;
    }

    .section-title h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    .section-title p {
        font-size: 13px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
    }

    .btn.btn-primary,
    .btn.btn-secondary {
        margin-bottom: 12px;
    }

    .card {
        padding: 16px;
        min-height: 240px;
        border-radius: 10px;
    }

    .card h3 {
        font-size: 16px;
    }

    .card p {
        font-size: 13px;
    }

    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    /* Grid 2x2 خانه بخش - به 1 ستون تغییر می‌کند */
    .grid-3[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    .container {
        padding: 0 12px;
    }

    section {
        padding: 40px 0 !important;
    }

    .hero {
        padding: 80px 0 60px 0 !important;
    }
}

/* Extra Small Phones: 480px and below */
@media (max-width: 480px) {
    .navbar {
        width: 60%;
        max-width: 240px;
        padding: 6px 12px;
    }

    .navbar .logo {
        font-size: 12px;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 26px;
        line-height: 1.2;
    }

    .hero p {
        font-size: 14px;
        line-height: 1.4;
    }

    .badge {
        padding: 6px 14px;
        font-size: 11px;
        margin-bottom: 14px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
    }

    .section-title h2 {
        font-size: 20px;
        line-height: 1.3;
    }

    .section-title p {
        font-size: 12px;
    }

    .card {
        padding: 14px;
        min-height: 200px;
        border-radius: 8px;
    }

    .card h3 {
        font-size: 14px;
    }

    .card p {
        font-size: 12px;
    }

    .card-icon {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }


    .container {
        padding: 0 10px;
    }

    section {
        padding: 32px 0 !important;
    }

    .hero {
        padding: 60px 0 40px 0 !important;
    }

    .scroll-indicator {
        display: none;
    }
}



/* Scroll reveal animations */
[data-scroll] {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-scroll].revealed {
    opacity: 1;
    transform: translateY(0);
}

/*
    قواعد کاهش حرکت: این مِد باعث غیرفعال کردن انیمیشن‌ها برای کاربرانی می‌شود که مایل به تجربه‌ای بدون انیمیشن هستند.
*/

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
}

.reduce-motion html {
    scroll-behavior: auto;
}

/* Digital background elements */
.hero {
    position: relative;
}

.digital-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
}

.digital-element {
    position: absolute;
    border-radius: 50%;
    transform: translate3d(0, 0, 0);
    filter: blur(10px) saturate(120%);
    opacity: 0.95;
    mix-blend-mode: screen;
    will-change: transform, opacity;
    transition: transform 0.18s linear, opacity 0.18s linear;
}

.digital-element.small {
    width: 12px;
    height: 12px;
}

.digital-element.medium {
    width: 44px;
    height: 44px;
}

.digital-element.large {
    width: 140px;
    height: 140px;
}

.digital-element .digital-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.digital-element .digital-inner.color1 {
    background: radial-gradient(circle at 30% 30%, rgba(96, 165, 250, 0.95), rgba(37, 99, 235, 0.6));
}

.digital-element .digital-inner.color2 {
    background: radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.95), rgba(96, 165, 250, 0.6));
}

@keyframes floatY {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes floatX {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(18px);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes rotateIt {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.digital-element .digital-inner.float1 {
    animation: floatY 7.5s ease-in-out infinite;
}

.digital-element .digital-inner.float2 {
    animation: floatX 9s ease-in-out infinite;
}

.digital-element .digital-inner.rotate {
    animation: rotateIt 12s linear infinite;
    opacity: 0.9;
}

/* subtle mini dots for section titles */
.section-title {
    position: relative;
    overflow: visible;
}

/* .digital-mini: scattered, faded, and covers the whole section */
.digital-minis-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.digital-mini {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-accent);
    opacity: 0.13;
    filter: blur(3.5px) brightness(0.8);
    pointer-events: none;
    transition: opacity 0.5s, filter 0.5s;
    animation: floatX 6s ease-in-out infinite;
    /* Each dot will be placed at a different random location via inline style or JS */
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {

    .digital-element,
    .digital-mini {
        animation: none !important;
        transform: none !important;
    }
}

.reduce-motion .digital-element,
.reduce-motion .digital-mini {
    animation: none !important;
    transform: none !important;
}


.about-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 10050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.about-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.about-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.36s ease, visibility 0.36s ease;
}

/* About Modal responsive */
@media (max-width: 768px) {
    .about-modal {
        padding: 20px;
    }

    .about-modal .panel {
        padding: 20px;
        max-height: calc(100vh - 60px);
    }

    .about-modal .panel .header {
        padding: 16px 0;
    }

    .about-modal .panel .header h3 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .about-modal {
        padding: 10px;
    }

    .about-modal .panel {
        padding: 16px;
        max-height: calc(100vh - 40px);
        border-radius: 14px;
    }

    .about-modal .panel .header {
        padding: 12px 0;
    }

    .about-modal .panel .header h3 {
        font-size: 18px;
    }

    .about-modal .panel .header .close {
        font-size: 24px;
    }
}

.about-modal.active {
    opacity: 1;
    visibility: visible;
}

.about-modal .panel {
    width: min(1200px, 96%);
    max-height: calc(100vh - 120px);
    overflow: hidden;
    background: var(--card-bg);
    border-radius: 18px;
    border: 1px solid var(--outline);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
    padding: 28px;
    position: relative;
}

.about-hint {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 18px;
    z-index: 9;
    color: var(--text-muted);
    opacity: 0.95;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-hint svg {
    color: var(--text-muted);
    filter: drop-shadow(0 8px 18px rgba(2, 6, 23, 0.12));
}

@keyframes hintPulse {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.9;
    }

    50% {
        transform: translateX(-50%) translateY(-4px);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.9;
    }
}

.about-hint {
    animation: hintPulse 1.8s ease-in-out infinite;
}

.about-hint.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.about-modal .panel .header h3 {
    font-size: 22px;
    margin: 0;
}

.about-cards {
    display: flex;
    gap: 18px;
    align-items: start;
    padding: 0 28px;
    overflow: hidden;
    position: relative;
}

/* switched to overflow hidden - nav buttons control movement now */
/* Ensure the scroller has smooth scroll behavior */
.about-cards {
    scroll-behavior: smooth;
}

/* make sure cards have an opacity transition for soft fading */
.about-card-vertical {
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.24s ease;
    opacity: 0.56;
}

/* stronger fade for non-active */
.about-card-vertical.active {
    opacity: 1;
}

.about-cards::-webkit-scrollbar {
    display: none;
    height: 8px;
}

.about-cards {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.about-cards.dragging {
    cursor: grabbing;
    user-select: none;
}

.about-cards {
    cursor: grab;
}

.about-cards.pressing {
    cursor: grabbing;
    user-select: none;
}

.about-cards.pressing .about-card-vertical {
    transform: translateY(-2px) scale(1.005);
    filter: brightness(0.995);
}

.about-card-vertical.active {
    transform: translateY(-12px) scale(1.05);
}

.about-card-vertical {
    scroll-snap-align: center;
    flex: 0 0 340px;
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.about-card-vertical:hover {
    transform: translateY(-4px) scale(1.018);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(37, 99, 235, 0.12);
}

/* zoom image subtly on hover for a tactile feel */
.about-card-vertical img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-card-vertical:hover img {
    transform: scale(1.02);
}

/* keyboard focus variant */
.about-card-vertical:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.12);
    outline-offset: 6px;
    transform: translateY(-3px) scale(1.012);
}

/* ensure clickable cursor */
.about-card-vertical {
    cursor: pointer;
}

/* Our Team: grid + scroll mode (3 cards per row on desktop) */
.about-cards.about-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 4px 8px 14px;
    max-height: min(68vh, 760px);
    overflow-y: auto;
    overflow-x: hidden;
    align-items: start;
    cursor: default;
}

.about-cards.about-cards-grid::-webkit-scrollbar {
    width: 10px;
    display: block;
}

.about-cards.about-cards-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

.about-cards.about-cards-grid .about-card-vertical {
    flex: initial;
    width: 100%;
    opacity: 1;
    transform: none !important;
    scroll-snap-align: none;
}

.about-cards.about-cards-grid .about-card-vertical.about-card-spacer {
    display: none !important;
}

.about-cards.about-cards-grid .about-card-vertical.active {
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
    border-color: rgba(37, 99, 235, 0.14);
    opacity: 1;
}

.about-cards.about-cards-grid .about-card-vertical:hover {
    transform: translateY(-4px) scale(1.01) !important;
}

.about-cards.about-cards-grid~.about-hint,
.about-modal .about-nav-btn {
    display: none !important;
}

.about-cards.about-cards-grid~div #aboutDots {
    display: none !important;
}

@media (max-width: 1200px) {
    .about-cards.about-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .about-cards.about-cards-grid {
        grid-template-columns: 1fr;
        max-height: min(72vh, 760px);
        padding-inline: 2px;
    }
}

@media (max-width: 920px) {
    .about-card-vertical img {
        height: 420px;
    }

    .about-card-vertical {
        flex: 0 0 300px;
    }
}

.about-modal .panel .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.about-modal .panel .close {
    background: linear-gradient(135deg, var(--primary-accent), var(--primary-accent-2));
    color: #fff;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.18);
    transition: transform 0.28s cubic-bezier(.2, .8, .2, 1), box-shadow 0.28s ease, opacity 0.18s ease;
}

.about-modal .panel .close:hover {
    transform: rotate(8deg) scale(1.06);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.26);
}

.about-modal .panel .close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.12);
    outline-offset: 3px;
}

.about-card-vertical {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--outline);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.about-card-vertical img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-card-vertical .meta {
    padding: 18px;
}

.about-card-vertical h4 {
    margin: 0 0 8px;
    font-size: 20px;
}

.about-card-vertical p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.about-card-vertical.active {
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
    border-color: rgba(37, 99, 235, 0.1);
}

/* Team card flip: front profile -> back social links */
.about-card-vertical.team-card {
    perspective: 1200px;
}

.about-card-vertical.team-card .team-card-inner {
    position: relative;
    width: 100%;
    min-height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.about-card-vertical.team-card.is-flipped .team-card-inner {
    transform: rotateY(180deg);
}

.about-card-vertical.team-card .team-card-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.about-card-vertical.team-card .team-card-face--front {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.about-card-vertical.team-card .team-card-face--back {
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(155deg, rgba(37, 99, 235, 0.2) 0%, rgba(2, 6, 23, 0.95) 100%);
    pointer-events: none;
}

.about-card-vertical.team-card.is-flipped .team-card-face--front {
    pointer-events: none;
}

.about-card-vertical.team-card.is-flipped .team-card-face--back {
    pointer-events: auto;
}

.team-card-back-content {
    width: 100%;
    text-align: center;
}

.team-card-back-content h5 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #fff;
}

.team-card-back-content p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.84);
}

.team-card-socials {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.team-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.team-social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.team-social-link.linkedin {
    background: rgba(10, 102, 194, 0.22);
}

.team-social-link.instagram {
    background: linear-gradient(120deg, rgba(225, 48, 108, 0.28), rgba(255, 220, 128, 0.18));
}

.team-social-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
    letter-spacing: 0.03em;
}

@media (prefers-reduced-motion: reduce) {
    .about-card-vertical.team-card .team-card-inner {
        transition: none;
    }
}

@media (max-width: 1100px) {
    .about-card-vertical {
        flex: 0 0 380px;
    }

    .about-card-vertical img {
        height: 480px;
    }
}

@media (max-width: 920px) {
    .about-card-vertical img {
        height: 380px;
    }

    .about-card-vertical {
        flex: 0 0 300px;
    }
}

/* Pagination dots */
.about-dots {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
}

.about-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: transform 0.20s ease, background 0.20s ease, box-shadow 0.2s;
}

.about-dots button.active {
    background: var(--primary-accent);
    transform: scale(1.42);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.18);
}

/* Carousel nav buttons */
.about-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    cursor: pointer;
    z-index: 120;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.14);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.98), rgba(96, 165, 250, 0.98));
    transition: transform 0.28s cubic-bezier(.2, .8, .2, 1), box-shadow 0.28s ease, opacity 0.2s ease;
}

.about-nav-btn.prev {
    left: 12px;
}

.about-nav-btn.next {
    right: 12px;
}

/* When panel is in RTL mode (e.g., Persian), flip nav button positions */
.about-modal .panel.rtl-about .about-nav-btn.prev {
    right: 12px;
    left: auto;
}

.about-modal .panel.rtl-about .about-nav-btn.next {
    left: 12px;
    right: auto;
}

.about-nav-btn:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.26);
}

.about-nav-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.about-nav-btn[disabled] {
    opacity: 0.36;
    cursor: default;
    box-shadow: none;
    transform: translateY(-50%) scale(1);
}

/* adjust hint so it doesn't overlap nav */
.about-hint {
    bottom: 28px;
}

/* Contact Modal (full-screen with tabs) */
.contact-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 10050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.contact-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.36s ease, visibility 0.36s ease;
}

.contact-modal.active {
    opacity: 1;
    visibility: visible;
}

.contact-modal .contact-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.contact-modal .contact-modal-header h3 {
    margin: 0;
    font-size: 24px;
}

.contact-modal-close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(37, 99, 235, 0.28);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.35));
    color: var(--text-color);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
    transition: transform 0.24s cubic-bezier(.2, .8, .2, 1), box-shadow 0.24s ease, border-color 0.24s ease;
}

.contact-modal-close:hover {
    transform: translateY(-2px) scale(1.04);
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.28);
}

.contact-modal-close:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
}

.contact-modal-body {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 20px;
    border: 1px solid var(--outline);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
    padding: 32px;
    max-width: 880px;
    width: 100%;
    max-height: 84vh;
    overflow-y: auto;
}

.contact-tabs {
    display: flex;
    margin-bottom: 20px;
}

.contact-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

.contact-tab.active {
    color: var(--primary-accent);
    border-bottom-color: var(--primary-accent);
}

.contact-tab-content {
    position: relative;
}

.contact-tab-pane {
    display: none;
}

.contact-tab-pane.active {
    display: block;
}

.contact-tab-pane ul {
    list-style: none;
    padding: 0;
}

.contact-tab-pane li {
    margin-bottom: 10px;
}

/* Phone box for contact modal: boxed number + separate copy button */
.phone-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--outline);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent);
}

.phone-text {
    font-weight: 600;
    color: var(--text-color);
    padding: 2px 4px;
    user-select: text;
}

.phone-copy-btn,
.copy-phone {
    -webkit-tap-highlight-color: transparent;
    background: transparent;
    border: none;
    color: var(--primary-accent);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .12s ease, transform .06s ease;
}

.phone-copy-btn:focus,
.copy-phone:focus {
    outline: 2px solid rgba(37, 99, 235, 0.14);
    outline-offset: 2px;
    background: transparent;
    /* remove bright fill on focus */
}

.phone-copy-btn:active,
.copy-phone:active {
    background: transparent;
    /* remove bright fill on active */
    transform: none;
}

.phone-box .phone-text,
.phone-box .phone-copy-btn {
    -webkit-tap-highlight-color: transparent;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--outline);
    border-radius: 8px;
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-accent);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-accent), var(--primary-accent-2));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

/* Social Media Buttons Styles */
.social-media-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--outline);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.social-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

/* Improved form controls inside contact modal */
.contact-modal-body .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.contact-modal-body .form-group input,
.contact-modal-body .form-group select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--outline);
    background: var(--card-bg);
    background-clip: padding-box;
    color: var(--text-color);
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    appearance: none;
    -webkit-appearance: none;
}

.contact-modal-body .form-group input:focus,
.contact-modal-body .form-group select:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.08);
}

/* Custom arrow for selects (lightweight SVG) */
.contact-modal-body .form-group select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='%23666' d='M5 7l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

/* Request demo form refresh */
#demo .demo-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#demo .demo-form-intro {
    position: relative;
    padding: 18px 20px;
    border: 1px solid rgba(37, 99, 235, 0.24);
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(37, 99, 235, 0.14), rgba(15, 23, 42, 0.02));
    overflow: hidden;
}

#demo .demo-form-intro::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    top: -84px;
    right: -56px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.26) 0%, rgba(37, 99, 235, 0) 70%);
    pointer-events: none;
}

#demo .demo-form-intro h4 {
    margin: 0 0 8px;
    font-size: 18px;
    letter-spacing: 0.01em;
}

#demo .demo-form-intro p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.8;
    max-width: 620px;
}

#demo .demo-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

#demo .demo-form-grid .form-group {
    margin-bottom: 0;
}

#demo .demo-form-grid .form-group-wide {
    grid-column: 1 / -1;
}

#demo .demo-form-grid .form-group label {
    margin-bottom: 7px;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

#demo .demo-form-grid .form-group input,
#demo .demo-form-grid .form-group select {
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#demo .demo-form-grid .form-group input:hover,
#demo .demo-form-grid .form-group select:hover {
    border-color: rgba(37, 99, 235, 0.36);
}

#demo .demo-form-grid .form-group input:focus,
#demo .demo-form-grid .form-group select:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

#demo .demo-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 10px;
    border-top: 1px dashed rgba(148, 163, 184, 0.46);
}

#demo .demo-form-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.8;
    max-width: 460px;
}

#demo .demo-form-actions .btn-primary {
    border-radius: 14px;
    padding: 12px 30px;
    min-width: 170px;
    font-weight: 600;
}

body.theme-dark #demo .demo-form-intro {
    border-color: rgba(96, 165, 250, 0.35);
    background: linear-gradient(160deg, rgba(30, 64, 175, 0.22), rgba(15, 23, 42, 0.5));
}

body.theme-dark #demo .demo-form-grid .form-group input,
body.theme-dark #demo .demo-form-grid .form-group select {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-dark #demo .demo-form-grid .form-group input:hover,
body.theme-dark #demo .demo-form-grid .form-group select:hover {
    border-color: rgba(96, 165, 250, 0.5);
}

body.theme-dark #demo .demo-form-actions {
    border-top-color: rgba(148, 163, 184, 0.3);
}

@media (max-width: 640px) {
    .contact-modal-body {
        padding: 18px;
    }

    .contact-modal-body .form-group input,
    .contact-modal-body .form-group select {
        padding: 10px 12px;
    }
}

@media (max-width: 820px) {
    #demo .demo-form-grid {
        grid-template-columns: 1fr;
    }

    #demo .demo-form-grid .form-group-wide {
        grid-column: auto;
    }

    #demo .demo-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    #demo .demo-form-actions .btn-primary {
        width: 100%;
    }
}

.social-btn:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: currentColor;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.social-btn:hover svg {
    transform: scale(1.15);
}

/* LinkedIn Colors */
.social-btn.linkedin {
    color: #0A66C2;
}

.social-btn.linkedin:hover {
    background: rgba(10, 102, 194, 0.1);
    border-color: #0A66C2;
    box-shadow: 0 12px 30px rgba(10, 102, 194, 0.2);
}

/* Instagram Colors */
.social-btn.instagram {
    background: linear-gradient(135deg, rgba(250, 58, 58, 0.08), rgba(214, 31, 144, 0.08));
    color: #E4405F;
}

.social-btn.instagram:hover {
    background: linear-gradient(135deg, rgba(250, 58, 58, 0.15), rgba(214, 31, 144, 0.15));
    border-color: #E4405F;
    box-shadow: 0 12px 30px rgba(228, 64, 95, 0.2);
}

/* Telegram Colors */
.social-btn.telegram {
    color: #0088cc;
}

.social-btn.telegram:hover {
    background: rgba(0, 136, 204, 0.1);
    border-color: #0088cc;
    box-shadow: 0 12px 30px rgba(0, 136, 204, 0.2);
}

/* WhatsApp Colors */
.social-btn.whatsapp {
    color: #25D366;
}

.social-btn.whatsapp:hover {
    background: rgba(37, 211, 102, 0.1);
    border-color: #25D366;
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.2);
}

/* Dark Theme Support */
body.theme-dark .social-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

@media (max-width: 480px) {
    .social-media-buttons {
        gap: 12px;
    }

    .social-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .social-btn span {
        display: none;
    }

    .social-btn svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 768px) {
    .contact-modal {
        padding: 20px;
    }

    .contact-modal-body {
        padding: 20px;
        max-height: 90vh;
    }
}

/* When site is in English, pricing section cards should be LTR */
body[dir="ltr"] #pricing .grid-3 .card {
    direction: ltr;
    text-align: left;
}

body[dir="ltr"] #pricing .grid-3 .card ul {
    text-align: left !important;
}

body[dir="ltr"] #pricing .grid-3 .card h4 {
    text-align: left;
}

body[dir="ltr"] #pricing .grid-3 .card p {
    text-align: left;
}

/* Pricing cards: improved layout, consistent spacing and visual emphasis */
#pricing .grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    align-items: start;
}

#pricing .grid-3 .card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 22px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.36s cubic-bezier(.2, .9, .2, 1), box-shadow 0.36s ease;
}

#pricing .grid-3 .card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

/* Accent for middle (show-off) card */
#pricing .grid-3 .card[data-card-id="showoff"] {
    border: 2px solid rgba(37, 99, 235, 0.14);
    transform: translateY(-6px);
}

#pricing .grid-3 .card>div[style],
#pricing .grid-3 .card h4 {
    text-align: center;
}

#pricing .grid-3 .card h4 {
    font-size: 18px;
    margin: 0;
}

#pricing .grid-3 .card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* Two-line intro paragraph: allow newline characters from translations to create line breaks */
.section-title .two-line {
    white-space: pre-line;
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
    max-width: 820px;
    margin: 0 auto 16px;
}

@media (max-width: 980px) {
    #pricing .grid-3 {
        grid-template-columns: 1fr;
    }

    #pricing .grid-3 .card[data-card-id="showoff"] {
        transform: none;
    }
}

/* ============================================================================ */
/* INLINE CSS FROM HTML - MOVED TO EXTERNAL STYLESHEET */
/* ============================================================================ */

/* Responsive overrides: ensure images and headings scale without cropping */
.card img,
.about-card-vertical img,

.carousel-track .card img,
.modal-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* If any inline styles set fixed heights, override them to keep aspect ratio */
.card img[style],
.about-card-vertical img[style] {
    height: auto !important;
    max-height: none !important;
}

/* Responsive typography */
h1 {
    font-size: clamp(28px, 6vw, 64px);
    line-height: 1.05;
}

h2 {
    font-size: clamp(20px, 4vw, 40px);
}

/* Ensure hero and badge scale nicely on very narrow or tall screens */
.hero h1 {
    word-break: keep-all;
}

.badge {
    padding: clamp(8px, 1.2vw, 18px) clamp(16px, 2vw, 32px);
}

/* Make about cards more flexible on small screens */
@media (max-width: 920px) {
    .about-card-vertical img {
        height: auto !important;
        object-fit: contain !important;
    }

    .about-card-vertical {
        flex: 0 0 92%;
    }
}

@media (max-width: 480px) {

    .card img,
    .about-card-vertical img {
        aspect-ratio: auto;
    }

    .carousel-track .card {
        height: auto !important;
    }
}

/* About Stats Card Styles */
.about-stats-card {
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--outline);
    border-radius: 16px;
    padding: 32px 24px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-stats-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-accent);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.12);
}

.about-stats-card .card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(96, 165, 250, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-accent);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-stats-card:hover .card-icon {
    transform: rotate(8deg) scale(1.1);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(96, 165, 250, 0.14));
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.16);
}

.about-stats-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.about-stats-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .about-content-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .about-stats-card {
        padding: 24px 16px;
    }
}

@media (max-width: 640px) {
    .about-stats-card {
        padding: 20px 12px;
    }

    .about-stats-card h3 {
        font-size: 18px;
    }

    .about-stats-card p {
        font-size: 13px;
    }

    .about-content-grid {
        gap: 24px !important;
    }
}

/* Loss Card Styles */
.loss-card {
    background: var(--card-bg);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.loss-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loss-card:hover {
    border-color: rgba(239, 68, 68, 0.3);
    background: var(--card-bg);
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.08);
    transform: translateY(-4px);
}

.loss-card:hover::before {
    opacity: 1;
}

.loss-number {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    color: #ef4444;
    font-size: 22px;
    border: 1px solid rgba(239, 68, 68, 0.15);
    transition: all 0.3s ease;
}

.loss-card:hover .loss-number {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.15));
    border-color: rgba(239, 68, 68, 0.3);
    transform: scale(1.08);
}

.loss-content h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.loss-content p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
    line-height: 1.6;
}

/* Value Anchor Card Styles */
.value-anchor-card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.value-anchor-card:hover {
    border-color: rgba(37, 99, 235, 0.4) !important;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(59, 130, 246, 0.08)) !important;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.15);
    transform: translateY(-8px);
}

@media (max-width: 1200px) {
    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: 1fr !important;
    }

    .value-anchor-card {
        padding: 24px !important;
    }

    .value-anchor-card h3 {
        font-size: 16px !important;
    }

    .value-anchor-card div[style*="font-size: 48px"] {
        font-size: 40px !important;
    }
}

/* Pricing Grid Styles */
#pricingGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

#pricingPanel {
    order: 0;
    border-radius: 12px;
}

#pricingCardsContainer {
    order: 0;
}

body[dir="ltr"] #pricingGrid {
    grid-auto-flow: dense;
}

body[dir="ltr"] #pricingPanel {
    order: 2;
    grid-column: 2;
}

body[dir="ltr"] #pricingCardsContainer {
    order: 1;
    grid-column: 1;
}

body[dir="rtl"] #pricingPanel {
    order: 0;
    grid-column: 1;
}

body[dir="rtl"] #pricingCardsContainer {
    order: 0;
    grid-column: 2;
}

#pricing .pricing-card {
    border-radius: 12px;
}

#pricing .pricing-card:hover {
    border-color: var(--primary-accent);
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
    transform: translateX(-4px);
}

body[dir="rtl"] #pricing .pricing-card:hover {
    transform: translateX(4px);
}

#pricing .pricing-card.active {
    border-color: var(--primary-accent);
    background: rgba(37, 99, 235, 0.12);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.2);
    border-width: 2px;
}

@media (max-width: 1024px) {
    #pricingGrid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    body[dir="ltr"] #pricingPanel {
        order: auto;
        grid-column: auto;
    }

    body[dir="ltr"] #pricingCardsContainer {
        order: auto;
        grid-column: auto;
    }

    body[dir="rtl"] #pricingPanel {
        order: auto;
        grid-column: auto;
    }

    body[dir="rtl"] #pricingCardsContainer {
        order: auto;
        grid-column: auto;
    }

    #pricingPanel {
        position: relative;
        top: 0 !important;
        min-height: auto;
        padding: 30px !important;
    }
}

@media (max-width: 640px) {
    #pricingPanel {
        padding: 24px !important;
    }

    #pricingGrid {
        gap: 30px;
    }
}

/* Privacy Panel Styles */
.privacy-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9998;
}

.privacy-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(720px, 92%);
    background: var(--card-bg);
    border: 1px solid var(--outline);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.6);
    display: none;
    z-index: 9999;
}

.privacy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.privacy-header h3 {
    margin: 0;
}

.privacy-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* Scroll Percent Indicator Styles */
.scroll-percent {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%) scale(1);
    pointer-events: none;
    opacity: 0;
    z-index: 10000;
    transition: opacity .28s ease, transform .18s cubic-bezier(.2, .9, .2, 1);
}

.percent-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    padding: 8px 10px;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(3, 7, 18, 0.22);
    backdrop-filter: blur(8px);
}

.percent-ring {
    flex: 0 0 52px;
    display: block;
}

.ring-bg {
    opacity: 0.16;
}

.ring-fg {
    transition: stroke-dasharray .12s linear;
}

.percent-text {
    font-weight: 800;
    color: var(--text-primary, #fff);
    font-size: 15px;
    min-width: 36px;
    text-align: center;
}

@media (max-width: 900px) {
    .scroll-percent {
        display: none;
    }
}

/* Benefit Cards Styling - MOVED FROM HTML */
/* Uniform styling for all benefit cards - consistent image size, spacing and alignment */
.grid-3>.card.animate-in-1.revealed {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--card-bg);
    border: 1px solid var(--outline);
    padding: 0 18px 18px;
    border-radius: 12px;
    box-sizing: border-box;
    min-height: 360px;
    overflow: hidden;
}

.grid-3>.card.animate-in-1.revealed img {
    width: calc(100% + 18px);
    margin: 0 0 12px -18px;
    height: 240px !important;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
    flex-shrink: 0;
}

.grid-3>.card.animate-in-1.revealed .card-icon {
    font-size: 20px;
    margin-bottom: 8px;
}

.grid-3>.card.animate-in-1.revealed h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.grid-3>.card.animate-in-1.revealed p {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
    flex: 1;
}

.grid-3>.card.animate-in-2.revealed {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--card-bg);
    border: 1px solid var(--outline);
    padding: 0 18px 18px;
    border-radius: 12px;
    box-sizing: border-box;
    min-height: 360px;
    overflow: hidden;
}

.grid-3>.card.animate-in-2.revealed img {
    width: calc(100% + 18px);
    margin: 0 0 12px -18px;
    height: 240px !important;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
    flex-shrink: 0;
}

.grid-3>.card.animate-in-2.revealed .card-icon {
    font-size: 20px;
    margin-bottom: 8px;
}

.grid-3>.card.animate-in-2.revealed h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.grid-3>.card.animate-in-2.revealed p {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
    flex: 1;
}

.grid-3>.card.animate-in-3.revealed {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--card-bg);
    border: 1px solid var(--outline);
    padding: 0 18px 18px;
    border-radius: 12px;
    box-sizing: border-box;
    min-height: 360px;
    overflow: hidden;
}

.grid-3>.card.animate-in-3.revealed img {
    width: calc(100% + 18px);
    margin: 0 0 12px -18px;
    height: 240px !important;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
    flex-shrink: 0;
}

.grid-3>.card.animate-in-3.revealed .card-icon {
    font-size: 20px;
    margin-bottom: 8px;
}

.grid-3>.card.animate-in-3.revealed h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.grid-3>.card.animate-in-3.revealed p {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
    flex: 1;
}

@media (max-width:920px) {
    .grid-3 {
        grid-template-columns: 1fr !important;
    }

    .grid-3>.card.animate-in-1.revealed,
    .grid-3>.card.animate-in-2.revealed,
    .grid-3>.card.animate-in-3.revealed {
        min-height: auto;
    }

    .grid-3>.card.animate-in-1.revealed img,
    .grid-3>.card.animate-in-2.revealed img,
    .grid-3>.card.animate-in-3.revealed img {
        width: 100%;
        margin: 0 0 12px 0;
        height: auto !important;
        border-radius: 10px;
    }
}

/* LTR (English) offset - images extend from right side instead of left */
body[dir="ltr"] .grid-3>.card.animate-in-1.revealed img,
body[dir="ltr"] .grid-3>.card.animate-in-2.revealed img,
body[dir="ltr"] .grid-3>.card.animate-in-3.revealed img {
    margin: 0 -18px 12px 0;
}
