@font-face {
  font-family: Vazirmatn;
  src: url('../fonts/webfonts/Vazirmatn-UI-FD-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('../fonts/webfonts/Vazirmatn-UI-FD-ExtraLight.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('../fonts/webfonts/Vazirmatn-UI-FD-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('../fonts/webfonts/Vazirmatn-UI-FD-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('../fonts/webfonts/Vazirmatn-UI-FD-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('../fonts/webfonts/Vazirmatn-UI-FD-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('../fonts/webfonts/Vazirmatn-UI-FD-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('../fonts/webfonts/Vazirmatn-UI-FD-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('../fonts/webfonts/Vazirmatn-UI-FD-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================
   THEME TOKENS — same values as header.php / index.php so the
   whole site (not just the homepage) shares one design system.
   Toggling data-theme on <body> (see header.php) retints
   every page automatically.
   ========================================================== */
:root {
    --bg:#0A0E17; --bg-alt:#0D1220; --surface:#111826; --surface-c:#151D2E; --surface-ch:#1A2338; --surface-chh:#212B44;
    --outline:#2A3450; --text:#EAF0FB; --text-muted:#93A0BE;

    --primary-color:#1FC6B2; --on-primary:#00201B; --primary-container:#003731;
    --accent-color:#E8B34D; --on-accent:#241A00;
    --secondary-color:#93A0BE;
    --dark-color:#0A0E17;
    --light-bg:#0A0E17;

    --ease-em: cubic-bezier(.2,0,0,1);
    --ease-std: cubic-bezier(.3,0,.1,1);
    --el1: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
    --el2: 0 4px 14px rgba(0,0,0,.4);
    --el3: 0 12px 32px rgba(0,0,0,.45);

    --rtl-font: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
}

body[data-theme="light"] {
    --bg:#F5F7FB; --bg-alt:#FFFFFF; --surface:#FFFFFF; --surface-c:#F0F3F9; --surface-ch:#E9EDF6; --surface-chh:#E1E6F2;
    --outline:#DDE2EE; --text:#10141F; --text-muted:#5B6478;

    --on-primary:#FFFFFF; --primary-container:#B7F0E6;
    --dark-color:#10141F;
    --light-bg:#F5F7FB;

    --el1: 0 1px 3px rgba(20,30,60,.08), 0 1px 2px rgba(20,30,60,.06);
    --el2: 0 6px 18px rgba(20,30,60,.08);
    --el3: 0 16px 36px rgba(20,30,60,.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--rtl-font);
    direction: rtl;
    text-align: right;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background-color .35s var(--ease-std), color .35s var(--ease-std);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* ==================== Navbar ====================
   Colors are set explicitly (not inherited from Bootstrap's
   default navbar variables) so brand/links never fall back to
   Bootstrap's default near-black text regardless of theme. */
.navbar {
    background: color-mix(in srgb, var(--surface) 92%, transparent) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--outline);
    box-shadow: none;
    padding: 0.75rem 0;
    transition: background-color .35s var(--ease-std), box-shadow .3s ease;
}

.navbar.scrolled {
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.navbar-brand {
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--text) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.navbar-toggler {
    border-color: var(--outline);
}

.navbar-toggler-icon {
    filter: none;
}
body:not([data-theme="light"]) .navbar-toggler-icon {
    filter: invert(1);
}

.nav-link {
    color: var(--text) !important;
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: 10px;
    margin: 0 0.15rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
}

.dropdown-menu {
    text-align: right;
    background: var(--surface-c);
    border: 1px solid var(--outline);
    box-shadow: var(--el3);
    border-radius: 1rem;
    padding: 0.5rem;
}

.dropdown-item {
    padding: 0.6rem 1rem;
    font-weight: 500;
    color: var(--text);
    border-radius: 0.6rem;
}

.dropdown-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.dropdown-item:hover {
    background-color: var(--surface-ch);
    color: var(--primary-color);
}

.dropdown-divider {
    border-color: var(--outline);
}

/* ==================== Hero (inner pages) ====================
   The homepage builds its own hero inline; this class is for
   simpler banner-style heroes on inner pages (services, pricing…). */
.hero-section {
    background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 60%, var(--bg-alt) 100%);
    color: var(--text);
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231FC6B2' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero-text {
    font-size: 1.15rem;
    opacity: 0.85;
    margin-bottom: 2rem;
}

.btn-hero {
    padding: 0.85rem 2rem;
    font-weight: 700;
    border-radius: 100px;
    font-size: 1.05rem;
    background: var(--primary-color);
    color: var(--on-primary);
    border: none;
    transition: transform 0.3s var(--ease-em), box-shadow 0.3s var(--ease-em);
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(31,198,178,.35);
    color: var(--on-primary);
}

.btn-outline-hero {
    border: 2px solid var(--outline);
    color: var(--text);
    padding: 0.8rem 2rem;
    border-radius: 100px;
    font-weight: 700;
}

.btn-outline-hero:hover {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==================== Section headers ==================== */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-weight: 800;
    color: var(--text);
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 48px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 100px;
}

.section-title p {
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* ==================== Service cards ==================== */
.service-card {
    background: var(--surface-c);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--el1);
    transition: transform 0.3s var(--ease-em), box-shadow 0.3s var(--ease-em), background 0.3s;
    height: 100%;
    border: 1px solid var(--outline);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--el3);
    background: var(--surface-ch);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-container);
    color: var(--primary-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s var(--ease-em);
}

.service-card:hover .service-icon {
    background: var(--primary-color);
    color: var(--on-primary);
    transform: rotateY(180deg);
}

.service-card h4 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==================== Portfolio ==================== */
.portfolio-item {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--el1);
    transition: transform 0.3s var(--ease-em), box-shadow 0.3s var(--ease-em);
    background: var(--surface-c);
}

.portfolio-item:hover {
    transform: scale(1.02);
    box-shadow: var(--el3);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: var(--text);
    padding: 1.5rem;
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ==================== Pricing ==================== */
.pricing-card {
    background: var(--surface-c);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--el1);
    transition: transform 0.3s var(--ease-em);
    height: 100%;
    position: relative;
    border: 2px solid var(--outline);
}

.pricing-card.popular {
    border-color: var(--primary-color);
    transform: scale(1.03);
    box-shadow: var(--el2);
}

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

.pricing-card.popular:hover {
    transform: scale(1.03) translateY(-5px);
}

.badge-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: var(--on-accent);
    padding: 0.35rem 1.2rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.85rem;
}

.price-amount {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text);
    margin: 1rem 0;
}

.price-amount span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pricing-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: right;
}

.pricing-list li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    border-bottom: 1px solid var(--outline);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-list li i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ==================== Buttons ==================== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--on-primary);
    font-weight: 600;
    padding: 0.65rem 1.6rem;
    border-radius: 100px;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: color-mix(in srgb, var(--primary-color) 85%, black);
    border-color: color-mix(in srgb, var(--primary-color) 85%, black);
    color: var(--on-primary);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 100px;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--on-primary);
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--on-accent);
    font-weight: 600;
    border-radius: 100px;
}

.btn-accent:hover {
    background-color: color-mix(in srgb, var(--accent-color) 85%, black);
    border-color: color-mix(in srgb, var(--accent-color) 85%, black);
    color: var(--on-accent);
}

.nav-cta-btn {
    background: var(--primary-color) !important;
    color: var(--on-primary) !important;
    font-weight: 700;
    border-radius: 100px !important;
    padding: 0.6rem 1.4rem !important;
    margin-inline-start: 0.5rem;
    transition: transform 0.2s var(--ease-em), box-shadow 0.2s var(--ease-em);
}

.nav-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31,198,178,.35);
    color: var(--on-primary) !important;
}

.theme-toggle-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--outline);
    background: var(--surface-c);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-inline-start: 0.6rem;
    font-size: 1.05rem;
    transition: transform 0.25s var(--ease-em), border-radius 0.25s var(--ease-em);
}

.theme-toggle-btn:hover {
    transform: scale(1.08) rotate(-8deg);
    border-radius: 50%;
}

.theme-toggle-btn .icon-sun { display: none; }
body[data-theme="light"] .theme-toggle-btn .icon-moon { display: none; }
body[data-theme="light"] .theme-toggle-btn .icon-sun { display: block; }

/* ==================== Forms ==================== */
.form-control, .form-select {
    border-radius: 0.85rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--outline);
    background-color: var(--surface-c);
    color: var(--text);
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    background-color: var(--surface-c);
    color: var(--text);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-floating > label {
    right: 0;
    left: auto;
    border-radius: 0;
    color: var(--text-muted);
}

/* ==================== Auth pages ==================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--surface-c);
    border: 1px solid var(--outline);
    border-radius: 1.5rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--el3);
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo h3 {
    font-weight: 900;
    color: var(--text);
}

/* ==================== Footer ==================== */
.site-footer {
    background: var(--bg-alt);
    color: var(--text-muted);
    padding: 60px 0 30px;
    margin-top: auto;
    border-top: 1px solid var(--outline);
}

.site-footer h5 {
    color: var(--text);
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.site-footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 100px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.2s, padding-right 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-right: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--outline);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==================== Cards & utilities ==================== */
.card {
    border: 1px solid var(--outline);
    background-color: var(--surface-c);
    color: var(--text);
    border-radius: 1rem;
    box-shadow: var(--el1);
}

.card-header {
    background: var(--surface-ch);
    border-bottom: 1px solid var(--outline);
    color: var(--text);
    font-weight: 700;
    padding: 1rem 1.25rem;
    border-radius: 1rem 1rem 0 0 !important;
}

.stat-card {
    background: var(--surface-c);
    border: 1px solid var(--outline);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--el1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue   { background: color-mix(in srgb, var(--primary-color) 16%, transparent); color: var(--primary-color); }
.stat-icon.green  { background: color-mix(in srgb, #3fb950 16%, transparent); color: #3fb950; }
.stat-icon.orange { background: color-mix(in srgb, var(--accent-color) 18%, transparent); color: var(--accent-color); }
.stat-icon.red    { background: color-mix(in srgb, #ef5350 16%, transparent); color: #ef5350; }

/* ==================== Alerts ==================== */
.alert {
    border-radius: 0.85rem;
    border: 1px solid var(--outline);
    padding: 1rem 1.25rem;
}

/* ==================== Table ==================== */
.table {
    color: var(--text);
}

.table thead th {
    background: var(--surface-c);
    color: var(--text);
    font-weight: 700;
    border-bottom: 2px solid var(--outline);
    white-space: nowrap;
}

.table td, .table th {
    border-color: var(--outline);
}

.table-hover tbody tr:hover {
    background-color: var(--surface-ch);
    color: var(--text);
}

/* ==================== Pagination ==================== */
.pagination .page-link {
    border-radius: 0.6rem;
    margin: 0 0.15rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface-c);
    border: 1px solid var(--outline);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--on-primary);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .hero-title { font-size: 1.9rem; }
    .section-title h2 { font-size: 1.5rem; }
    .pricing-card.popular { transform: none; }
    .navbar-collapse {
        background: var(--surface-c);
        border: 1px solid var(--outline);
        padding: 1rem;
        border-radius: 1rem;
        margin-top: 0.5rem;
    }
}

/* ==================== Animations ==================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeInUp 0.6s var(--ease-em) forwards;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-alt);
}
::-webkit-scrollbar-thumb {
    background: var(--outline);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}