/* assets/css/style.css - Ultra High Performance & Modern Persian Glassmorphism UI */
:root {
    --bg-dark: #0a0e17;
    --bg-card: rgba(19, 26, 42, 0.75);
    --bg-card-hover: rgba(28, 38, 62, 0.9);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(99, 102, 241, 0.5);
    
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.25);
    
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.25);
    
    --emerald: #10b981;
    --rose: #f43f5e;
    --amber: #f59e0b;
    
    /* High Contrast Accessible Colors (100% WCAG AAA Compliant) */
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #cbd5e1;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    
    --font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    direction: rtl;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Background Glows */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}
.glow-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -80px;
    right: -80px;
}
.glow-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    bottom: 50px;
    left: -80px;
}

/* Container */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}
.page-container {
    flex: 1;
    padding-top: 36px;
    padding-bottom: 80px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* Reveal on scroll motion animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Glass Card */
.glass-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);
    box-shadow: var(--shadow-glass);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 35px -10px var(--primary-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}
.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    color: #ffffff;
}
.btn-glass {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Navbar */
.navbar-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-avatar-box {
    position: relative;
    width: 44px;
    height: 44px;
}
.brand-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}
.online-dot {
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background-color: var(--emerald);
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
}
.brand-text {
    display: flex;
    flex-direction: column;
}
.brand-name {
    font-weight: 800;
    font-size: 1.15rem;
}
.brand-role {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}
.nav-link.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.15);
}
.nav-icon {
    width: 18px;
    height: 18px;
}
.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-xl);
}
.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-light);
}
.btn-logout {
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-logout:hover {
    color: var(--rose);
}

/* Hero Section */
.hero-section {
    padding: 30px 0 50px;
    text-align: center;
    position: relative;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 16px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}
.badge-ping {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 8px #34d399;
}

.hero-avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 24px;
}
.hero-avatar-glow {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    filter: blur(8px);
    opacity: 0.7;
}
.hero-avatar {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-glass);
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.text-gradient {
    background: linear-gradient(135deg, #ffffff 40%, var(--primary-light) 75%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 28px;
    line-height: 1.8;
}
.hero-cta {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Hub Cards */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin: 36px 0;
}
.hub-card {
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    cursor: pointer;
}
.hub-card:hover {
    transform: translateY(-5px);
}
.hub-icon-box {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.25);
    transition: transform 0.3s ease;
}
.hub-card:hover .hub-icon-box {
    transform: scale(1.08);
}
.hub-icon-box svg {
    width: 30px;
    height: 30px;
}
.hub-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.hub-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===================================================
   ULTRA-SLEEK PHOTO GALLERY (NO UGLY TEXT, PURE VISUALS)
=================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 20px;
}
@media (max-width: 868px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.gallery-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.gallery-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 14px 35px -5px rgba(99, 102, 241, 0.35);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.4s ease;
}
.gallery-card:hover .gallery-img {
    transform: scale(1.08);
}

/* Sleek subtle hover overlay badge - hidden in normal state */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(10, 14, 23, 0.85) 100%);
    display: flex;
    align-items: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-card:hover .gallery-overlay {
    opacity: 1;
}
.gallery-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(5, 8, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.lightbox-modal.active {
    display: flex;
    opacity: 1;
}
.lightbox-content {
    max-width: 90vw;
    max-height: 88vh;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    transition: background-color 0.2s;
}
.lightbox-close:hover {
    background: rgba(244, 63, 94, 0.6);
}

/* Blog Cards */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-title {
    font-size: 1.45rem;
    font-weight: 800;
}
.section-link {
    font-size: 0.9rem;
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 22px;
}
.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.blog-card-thumb-wrapper {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}
.blog-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-thumb {
    transform: scale(1.05);
}
.blog-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.5;
}
.blog-card-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
    flex: 1;
}
.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}
.read-more-btn {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Single Post */
.post-header {
    margin-bottom: 24px;
    text-align: center;
}
.post-meta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.post-main-image {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}
.post-body {
    font-size: 1.05rem;
    line-height: 2;
    color: #f1f5f9;
    margin-bottom: 36px;
}

/* Chat & Messages */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
}
.chat-box {
    display: flex;
    flex-direction: column;
    height: 500px;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.message-bubble {
    max-width: 78%;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    line-height: 1.6;
}
.message-user {
    align-self: flex-start;
    background: rgba(99, 102, 241, 0.22);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}
.message-admin {
    align-self: flex-end;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #ffffff;
    border-bottom-left-radius: 4px;
}
.message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.78rem;
    margin-bottom: 6px;
    color: var(--text-muted);
}
.badge-status {
    padding: 2px 8px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}
.badge-answered {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}
.chat-input-area {
    padding: 14px 18px;
    border-top: 1px solid var(--border-color);
    background: rgba(10, 14, 23, 0.5);
    display: flex;
    gap: 10px;
    align-items: center;
}
.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}
.chat-input:focus {
    border-color: var(--primary-light);
}

/* Forms & Auth */
.auth-wrapper {
    max-width: 440px;
    margin: 40px auto;
    padding: 36px 30px;
}
.auth-header {
    text-align: center;
    margin-bottom: 26px;
}
.auth-title {
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 6px;
}
.form-group {
    margin-bottom: 18px;
}
.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}
.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}
.alert-error {
    background: rgba(244, 63, 94, 0.2);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #fecdd3;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    font-size: 0.9rem;
}

/* Social Links */
.social-list {
    max-width: 580px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.social-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: transform 0.2s, background-color 0.2s;
}
.social-card:hover {
    transform: translateX(-4px);
    background: var(--bg-card-hover);
}
.social-card-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.social-card-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
}
.social-card-title {
    font-weight: 700;
    font-size: 1.05rem;
}
.social-card-url {
    font-size: 0.8rem;
    color: var(--text-muted);
    direction: ltr;
    text-align: right;
}

/* About Page */
.about-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}
.profile-card {
    padding: 28px;
    text-align: center;
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.skill-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.skill-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

/* Footer */
.footer-wrapper {
    background: rgba(10, 14, 23, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 24px;
    margin-top: auto;
}
.footer-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.footer-text {
    font-size: 0.88rem;
    color: var(--text-muted);
}
.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.footer-links a:hover {
    color: var(--primary-light);
}
.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    padding: 8px 12px;
    z-index: 1000;
    justify-content: space-around;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 4px 8px;
}
.mobile-nav-item svg {
    width: 22px;
    height: 22px;
}
.mobile-nav-item.active {
    color: var(--primary-light);
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
    color: #ffffff;
    font-size: 0.9rem;
}

@media (max-width: 868px) {
    .nav-links { display: none; }
    .about-grid { grid-template-columns: 1fr; }
    .mobile-nav { display: flex; }
    .page-container { padding-bottom: 90px; }
    .hero-title { font-size: 2rem; }
}
