/* ==========================================================================
   Dr H. Clean - Mother Site Portal (UI/UX Pro Max CSS)
   Local Assets Only | RTL Persian Design System
   ========================================================================== */

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

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir.woff2') format('woff2'),
         url('../fonts/Vazir-Medium.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

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

:root {
    /* Color Palette - Dark Mode Default */
    --bg-dark: #090d16;
    --bg-card: rgba(18, 26, 44, 0.75);
    --bg-card-hover: rgba(28, 40, 68, 0.85);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(99, 102, 241, 0.4);
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.25);
    
    --accent-teal: #14b8a6;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-purple: #a855f7;
    
    --badge-active-bg: rgba(16, 185, 129, 0.15);
    --badge-active-text: #34d399;
    --badge-active-border: rgba(52, 211, 153, 0.3);
    
    --badge-dev-bg: rgba(245, 158, 11, 0.15);
    --badge-dev-text: #fbbf24;
    --badge-dev-border: rgba(251, 191, 36, 0.3);
    
    --shadow-card: 0 12px 32px 0 rgba(0, 0, 0, 0.37);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --border-color: rgba(226, 232, 240, 0.8);
    --border-glow: rgba(99, 102, 241, 0.3);
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;
    
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    direction: rtl;
    font-family: 'Vazir', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 65%, rgba(20, 184, 166, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
}

/* Background Animated Grid Lines */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: 60px 60px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Header & Glass Navigation */
.navbar {
    position: sticky;
    top: 16px;
    z-index: 100;
    margin-top: 16px;
    margin-bottom: 40px;
}

.nav-glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

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

.time-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.time-widget svg {
    color: var(--primary);
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 0 60px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 50px;
    font-size: 0.88rem;
    color: var(--primary);
    margin-bottom: 24px;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 36px;
    line-height: 1.8;
}

/* Search Bar & Filter Bar */
.search-container {
    max-width: 540px;
    margin: 0 auto 48px;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    right: 18px;
    color: var(--text-dim);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 16px 54px 16px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Projects Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-3px);
    border-color: var(--border-glow);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.total { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.stat-icon.active { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.stat-icon.dev { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

.stat-number {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Projects Grid */
.projects-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.projects-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 28px;
    margin-bottom: 80px;
}

/* Project Card Style */
.project-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
}

.project-card.active:hover::before {
    background: linear-gradient(90deg, var(--primary), var(--accent-teal));
}

.project-card.dev-card:hover::before {
    background: linear-gradient(90deg, var(--accent-amber), #f97316);
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.project-avatar {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.avatar-pt { background: linear-gradient(135deg, #0284c7, #2563eb); }
.avatar-flash { background: linear-gradient(135deg, #7c3aed, #c084fc); }
.avatar-edi { background: linear-gradient(135deg, #0d9488, #10b981); }
.avatar-oab { background: linear-gradient(135deg, #ea580c, #f59e0b); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-badge.active {
    background: var(--badge-active-bg);
    color: var(--badge-active-text);
    border: 1px solid var(--badge-active-border);
}

.status-badge.dev {
    background: var(--badge-dev-bg);
    color: var(--badge-dev-text);
    border: 1px solid var(--badge-dev-border);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.status-badge.active .pulse-dot {
    background-color: var(--badge-active-text);
    box-shadow: 0 0 8px var(--badge-active-text);
    animation: pulse-green 2s infinite;
}

.status-badge.dev .pulse-dot {
    background-color: var(--badge-dev-text);
    box-shadow: 0 0 8px var(--badge-dev-text);
    animation: pulse-amber 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes pulse-amber {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.project-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.project-desc {
    font-size: 0.94rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Feature Tags */
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Action Buttons */
.btn-launch {
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.btn-dev {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
    border: 1px dashed rgba(245, 158, 11, 0.4);
}

.btn-dev:hover {
    background: rgba(245, 158, 11, 0.2);
}

/* Modal Popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-card);
    transform: scale(0.9);
    transition: var(--transition);
    position: relative;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.btn-close-modal {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Footer */
.footer {
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
    padding: 28px 0;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-content strong {
    color: var(--text-main);
    font-weight: 700;
}

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--badge-active-bg);
    border: 1px solid var(--badge-active-border);
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--badge-active-text);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .nav-glass { padding: 12px 18px; }
    .time-widget { display: none; }
    .projects-grid { grid-template-columns: 1fr; }
    .stats-bar { gap: 16px; }
    .stat-item { width: 100%; justify-content: flex-start; }
}
