/*
Theme Name: Linkduni3
Theme URI: https://example.com/
Author: Linkduni
Author URI: https://example.com/
Description: قالب وردپرس تبدیل‌شده از نسخه HTML پروژه Linkduni3 (RTL، Bootstrap، بک‌گراند کهکشانی، تم روشن/تیره).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: linkduni3
Tags: rtl-language-support, custom-menu, blog
*/

/* === فایل CSS اصلی پروژه === */

:root {
    --primary: #0077FF;
    --gold: #FFD700;
    --dark-bg: #0f0f1a;
    --dark-card: #1a1a2e;
    --light-bg: #f8f9fa;
    --light-card: #ffffff;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--dark-bg);
    color: #e6e6e6;
    transition: all .4s
}

body.light-mode {
    background: var(--light-bg);
    color: #1a1a1a
}

.card-group {
    background: var(--dark-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 215, 0, .1);
    transition: .3s
}

body.light-mode .card-group {
    background: var(--light-card);
    border: 1px solid #eee
}

.card-group:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 123, 255, .25) !important
}

.btn-join {
    background: linear-gradient(45deg, #0077FF, #00C5FF);
    border: none;
    border-radius: 50px;
    padding: 11px 28px;
    font-weight: bold;
    color: white
}

.member-count {
    color: #FFD700 !important;
    background: rgba(255, 215, 0, .15);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 215, 0, .3)
}

body.light-mode .member-count {
    color: #0077FF !important;
    background: rgba(0, 119, 255, .1);
    border: 1px solid rgba(0, 119, 255, .3)
}

.group-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px
}

.navbar-brand {
    color: #FFD700 !important;
    font-size: 2rem;
    font-weight: 900
}

#theme-toggle {
    cursor: pointer;
    font-size: 2rem;
    order: 2;
}

/* ورودی جست‌وجو در هدر */
#search-groups {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
}

#search-groups::placeholder {
    color: #ddd;
}

body.light-mode #search-groups {
    background: #f7f7f7;
    color: #222;
    border: 1px solid #ccc;
}
body.light-mode #search-groups::placeholder { color: #666; }

h1, h2, h3, h4, h5, h6 {
    color: #fafafa;
}
body.light-mode h1, body.light-mode h2, body.light-mode h3,
body.light-mode h4, body.light-mode h5, body.light-mode h6 {
    color: #0d0d0d;
}

p { color: #dcdcdc; }
body.light-mode p { color: #2f2f2f; }

a { color: #8ab4f8; text-decoration: none; }
a:hover { text-decoration: underline; }
body.light-mode a { color: #0d6efd; }

.text-muted { color: #b0b7c3 !important; }
body.light-mode .text-muted { color: #6a6f77 !important; }

.card-group p { color: #dcdcdc; }
body.light-mode .card-group p { color: #444; }
body.light-mode .card-group { background: #ffffff; border-color: #ddd; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
body.light-mode .group-card p { color: #3a3a3a; }

.btn-outline-light { color: #f0f0f0; border-color: #f0f0f0; }
.btn-outline-light:hover { background: #f0f0f0; color: #000; }
body.light-mode .btn-outline-light { color: #111; border-color: #111; }
body.light-mode .btn-outline-light:hover { background: #111; color: #fff; }
body.light-mode .btn-join { box-shadow: 0 6px 14px rgba(0,123,255,.2); }

body.light-mode .member-count { color: #0056b3 !important; background: rgba(13,110,253,.08); border-color: rgba(13,110,253,.25); }

.light-mode .navbar { background: #ffffff !important; }
.light-mode .navbar-nav .nav-link { color: #222 !important; }
.light-mode .navbar-nav .nav-link:hover { color: #16213e; }
.light-mode .navbar-brand { color: #16213e !important; }
body.light-mode footer { background: #f7f7f7; color: #555; }

body, p { line-height: 1.8; }

/* تصاویر و محتوای طولانی */
img, .post-content img { max-width: 100%; height: auto; }
p, li { text-wrap:nowrap; overflow-wrap: anywhere; }

/* تایپوگرافی ریسپانسیو */
@media (max-width: 576px) {
    .display-4 { font-size: 2rem; }
    .lead { font-size: 1rem; }
    .card-group { padding: 16px; }
    .btn-join { padding: 10px 20px; }
}

@media (min-width: 577px) and (max-width: 991.98px) {
    .display-4 { font-size: 2.4rem; }
    .lead { font-size: 1.05rem; }
}

/* ناوبری */
.navbar-nav .nav-link { color: #fff; }
.navbar-nav .nav-link:hover { color: var(--gold); }

/* پس‌زمینه کهکشانی */
#galaxy-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #0f0f1a 80%);
    overflow: hidden;
}

.stars,
.stars2,
.stars3 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    background-size: 400px 400px;
    animation: animStars linear infinite;
}

.stars {
    background-image:
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 90px 80px, #fff, transparent),
        radial-gradient(1.5px 1.5px at 150px 20px, #fff, transparent),
        radial-gradient(2.5px 2.5px at 200px 150px, #FFD700, transparent),
        radial-gradient(2px 2px at 40px 130px, #00C5FF, transparent);
    animation-duration: 60s;
}

.stars2 {
    background-image:
        radial-gradient(1px 1px at 80px 50px, #fff, transparent),
        radial-gradient(1.5px 1.5px at 220px 100px, #fff, transparent),
        radial-gradient(2px 2px at 300px 180px, #FFD700, transparent);
    animation-duration: 90s;
    opacity: 0.6;
}

.stars3 {
    background-image: radial-gradient(1px 1px at 160px 120px, #fff, transparent);
    animation-duration: 120s;
    opacity: 0.4;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: linear-gradient(45deg, #00C5FF, #FFD700);
    border-radius: 50%;
    opacity: 0;
    animation: floatGlow 20s infinite linear;
}

@keyframes floatGlow {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

@keyframes animStars {
    from {
        transform: translateY(0) translateX(0);
    }
    to {
        transform: translateY(-1000px) translateX(-100px);
    }
}

#galaxy-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 197, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 12s infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.7;
    }
}

body.light-mode #galaxy-bg {
    background: #f0f4f8;
}

body.light-mode .stars,
body.light-mode .stars2,
body.light-mode .stars3,
body.light-mode .particle,
body.light-mode #galaxy-bg::before {
    display: none;
}
/* ریسپانسیو هدر و جست‌وجو */
@media (max-width: 991.98px) {
    .navbar .nav-link { padding: .5rem 0; }
    #search-groups { margin-top: .5rem; }
}

@media (min-width: 992px) {
    .navbar .nav-link { padding: .5rem 1rem; }
}
