/*
Theme Name: Cafe Mixo Theme
Theme URI: https://cafemixo.ir/
Author: Your Name
Author URI: https://cafemixo.ir/
Description: قالب اختصاصی وردپرس 
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cafemixo-theme
*/

/* فونت وزیر متن */
@font-face {
    font-family: 'Vazirmatn';
    src: url('assets/fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ریست اولیه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* بدنه */
body {
    font-family: 'IRANSans', sans-serif;
    font-weight: 500;
    background: #121212;
    color: #222;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

/* لینک‌ها */
a {
    text-decoration: none;
    color: inherit;
}

/* دایره‌های رنگی پس‌زمینه */
.glass-bg-circles, .footer-circles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.footer-circles {
    position: absolute;
    z-index: -1;
    height: 100%;
}

.glass-bg-circles .circle,
.footer-circles .circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.glass-bg-circles .circle {
    width: 300px;
    height: 300px;
    filter: blur(120px);
}

.footer-circles .circle {
    width: 200px;
    height: 200px;
    animation-duration: 25s;
}

.glass-bg-circles .purple, .footer-circles .purple { background: #a259ff; top: 10%; left: 5%; }
.glass-bg-circles .orange, .footer-circles .orange { background: #ff6a3d; bottom: 10%; left: 20%; }
.glass-bg-circles .pink, .footer-circles .pink { background: #ff61c7; top: 50%; right: 10%; }
.glass-bg-circles .light-purple, .footer-circles .light-purple { background: #bd93f9; top: 30%; left: 60%; }
.footer-circles .light-purple { top: 60%; } /* فوتر اصلاح */
.glass-bg-circles .yellow, .footer-circles .yellow { background: #f4c430; bottom: 20%; right: 20%; }
.footer-circles .yellow { bottom: 15%; } /* فوتر اصلاح */
.glass-bg-circles .deep-purple, .footer-circles .deep-purple { background: #6e40c9; top: 70%; left: 30%; }
.footer-circles .deep-purple { top: 80%; } /* فوتر اصلاح */
.glass-bg-circles .red, .footer-circles .red { background: #ff3c38; top: 80%; right: 5%; }
.footer-circles .red { top: 90%; } /* فوتر اصلاح */

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(45deg); }
}


.glass-footer {
  background: rgba(255, 255, 255, 0.04);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* ساختار اصلی محتوا */
.content {
    flex: 1;
}

.sidebar {
    width: 300px;
}

/* اسلایدر */
.home-slider {
    margin: 20px 0;
}

.swiper {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
}

.swiper-slide {
    position: relative;
}

.swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    z-index: 1;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.slide-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 5px;
    z-index: 5;
    text-align: center;
}

@media (max-width: 768px) {
    .slide-caption {
        font-size: 14px;
        padding: 8px 10px;
        bottom: 10px;
    }
}

/* باکس محصولات */
.category-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 5px;
    margin-top: 5px;
    margin-bottom: -40px;
}

.category-box {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    text-align: center;
    padding: 10px;
    width: 11%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.31);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.category-box:hover {
    transform: scale(1.15);
}

.category-box .category-icon {
    max-width: 100%;
    height: auto;
    margin-bottom: 5px;
}

.category-box h3 {
    font-size: 16px;
    color: #333;
    margin-top: 10px;
}

/* ریسپانسیو برای باکس محصولات */
@media (max-width: 1024px) {
    .category-box {
        width: 30%;
    }
}

@media (max-width: 767px) {
    .category-box {
        width: 45%;
    }
}

@media (max-width: 479px) {
    .category-box {
        width: 31%;
    }
}

/* گرید کلی پست‌ها */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 0;
}

/* هر پست */
.post-box {
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.5), rgba(30, 30, 30, 0.2));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow:
        4px 4px 10px rgba(0, 0, 0, 0.6),
        -4px -4px 10px rgba(255, 255, 255, 0.05),
        inset 1px 1px 3px rgba(255, 255, 255, 0.1),
        inset -1px -1px 3px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.post-box:hover {
    transform: scale(1.03);
    box-shadow:
        6px 6px 16px rgba(0, 0, 0, 0.6),
        -6px -6px 16px rgba(255, 255, 255, 0.08);
    font-weight: bold;
}

/* تصویر شاخص */
.post-thumbnail {
    position: relative;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    border-radius: 20px 20px 0 0;
}

/* عنوان روی تصویر */
.post-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    font-size: 1.1rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    text-align: center;
    font-weight: bold;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* خلاصه مطلب */
.post-excerpt {
    padding: 1rem;
    font-size: 0.95rem;
    color: #ddd;
    line-height: 1.6;
    flex-grow: 1;
}

/* نوار متا پایین پست */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    padding: 12px 18px;
    margin: 20px;
    border-radius: 16px;
    font-size: 0.9rem;
    color: #eee;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 6px rgba(255,255,255,0.05);
}

.post-meta .meta-item {
    margin: 4px 8px;
    position: relative;
    padding-left: 12px;
}

.post-meta .meta-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #9b59b6;
}

/* دکمه ادامه مطلب */
.read-more {
    background: rgba(108, 92, 231, 0.7);
    color: white;
    padding: 0.5rem 1.1rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.read-more:hover {
    background: #5a4bd4;
    box-shadow: 0 6px 18px rgba(108, 92, 231, 0.6);
}

/* صفحه بندی */
.pagination {
    text-align: center;
    margin-top: 3rem;
    direction: ltr;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 6px;
    border: 1.8px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ccc;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    backdrop-filter: blur(2px);
}

.pagination .page-numbers:hover {
    background-color: #6c5ce7;
    color: #fff;
    border-color: #6c5ce7;
}

.pagination .current {
    background-color: #6c5ce7;
    color: #fff;
    border-color: #6c5ce7;
    font-weight: 700;
    cursor: default;
}

/* کانتینر اصلی */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* هدر اصلی */
.site-header {
    background-color: #283747;
    padding: 10px 15px;
}

/* ساختار بالای هدر */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* آیکن و متن لاگین */
.login-icon {
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.login-icon i {
    font-size: 34px;
}

/* لوگو */
.logo img {
    height: 60px;
    width: auto;
    animation: rotateLogo 3s linear infinite;
    transition: transform 0.3s ease-in-out;
}

/* انیمیشن چرخش لوگو */
@keyframes rotateLogo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* نام سایت */
.site-name h1 {
    font-size: 50px;
    margin: 0;
    background: linear-gradient(90deg, #00f0ff, #ff00d4, #00f0ff);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: waveMove 5s ease infinite;
}

@keyframes waveMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* حذف رنگ سفید از لینک داخل نام سایت */
.site-name a {
    color: inherit;
    text-decoration: none;
}

/* نوار دسته‌بندی زیر هدر */
.categories-nav ul {
    display: flex;
    justify-content: space-around;
    list-style: none;
    margin: 10px 0;
    padding: 10px 0;
    background-color: #158C8C;
    flex-wrap: wrap;
    border-radius: 25px;
}

.categories-nav ul li {
    display: inline;
}

.categories-nav ul li a {
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.categories-nav ul li a i {
    font-size: 18px;
}

.categories-nav ul li a:hover {
    color: #FFC300;
}

/* باکس جستجو */
.search-box {
    flex: 1;
    margin: 0 15px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 8px 35px 8px 10px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
}

.search-box button {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7b1fa2;
    font-size: 18px;
    cursor: pointer;
}

/* فوتر */
.site-footer {
    background-color: rgba(129, 35, 73, 0.4);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.footer-left, .footer-center, .footer-right {
    flex: 1;
    padding: 0 20px;
}

.footer-left h4, .footer-center h4, .footer-right h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #fff;
    font-weight: bold;
}

.footer-left p, .footer-center p {
    font-size: 14px;
    margin-bottom: 10px;
    color: #fff;
}

.footer-right .trust-badge {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.footer-bottom {
    background-color: rgba(40, 38, 43, 0.4);
    padding: 10px 0;
    color: #fff;
}

.footer-bottom p {
    font-size: 14px;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-left, .footer-center, .footer-right {
        margin-bottom: 20px;
    }
}

/* ساختار صفحه تکی */
.single-post-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 20px;
    justify-content: space-between;
}

/* محتوای اصلی پست */
.single-post-container .post-content {
    flex: 0 0 810px;
    max-width: 810px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        6px 6px 20px rgba(0, 0, 0, 0.6),
        -6px -6px 16px rgba(255, 255, 255, 0.08),
        inset 0 0 4px rgba(255, 255, 255, 0.1),
        inset 0 0 5px rgba(0, 0, 0, 0.2);
    padding: 30px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.9;
}

/* سایدبار کنار پست */
.single-post-container .sidebar {
    flex: 0 0 250px;
    max-width: 250px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        6px 6px 20px rgba(0, 0, 0, 0.5),
        -6px -6px 16px rgba(255, 255, 255, 0.07),
        inset 0 0 3px rgba(255, 255, 255, 0.1),
        inset 0 0 4px rgba(0, 0, 0, 0.25);
    padding: 20px;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ریسپانسیو موبایل کوچک، متوسط و بزرگ */
@media (max-width: 600px) {
    .single-post-container {
        flex-direction: column-reverse !important;
    }
    .single-post-container .post-content,
    .single-post-container .sidebar {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }
}

/* جعبه نویسنده */
.author-box {
    margin-top: 40px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(21, 140, 140, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    gap: 24px;
    color: #fff;
    box-shadow:
        8px 8px 28px rgba(0, 0, 0, 0.55),
        -8px -8px 20px rgba(255, 255, 255, 0.08),
        inset 2px 2px 6px rgba(255, 255, 255, 0.12),
        inset -2px -2px 6px rgba(0, 0, 0, 0.25);
}

.author-avatar img {
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.author-avatar:hover img {
    transform: scale(1.05);
}

.author-info h4 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: #fff;
}

.author-info p {
    font-size: 0.95rem;
    color: #eee;
    margin-bottom: 10px;
}

.author-social a {
    display: inline-block;
    margin-left: 10px;
    font-size: 1.2rem;
    color: #ffffff;
    transition: 0.3s;
}

.author-social a:hover {
    color: #4b3fc4;
}

/* حالت دارک مود */
.dark-mode {
    background-color: #000 !important;
    color: #fff !important;
}

.dark-mode .site-header,
.dark-mode .categories-nav ul,
.dark-mode .site-footer,
.dark-mode .footer-bottom,
.dark-mode .author-box {
    background-color: #111 !important;
}

.dark-mode .post-box,
.dark-mode .post-meta {
    background-color: #222 !important;
    color: #fff !important;
}
