/**
 * استایل‌های تکمیلی قالب
 *
 * @package GF_Cert_Theme_Pro
 */




/* assets/css/fonts.css */

/* Vazir */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/Vazir.woff2') format('woff2'),
         url('../fonts/vazir/Vazir.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/Vazir-Bold.woff2') format('woff2'),
         url('../fonts/vazir/Vazir-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* IRANSans */
@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/iransans/IRANSansWeb.woff2') format('woff2'),
         url('../fonts/iransans/IRANSansWeb.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/iransans/IRANSansWeb_Bold.woff2') format('woff2'),
         url('../fonts/iransans/IRANSansWeb_Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Yekan (در صورت نیاز) */
@font-face {
    font-family: 'Yekan';
    src: url('../fonts/yekan/Yekan.woff2') format('woff2'),
         url('../fonts/yekan/Yekan.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Yekan';
    src: url('../fonts/yekan/Yekan-Bold.woff2') format('woff2'),
         url('../fonts/yekan/Yekan-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}




/* ==================== Sticky Header Enhancements ==================== */
.header-sticky .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-sticky .site-header.is-scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-sticky .site-header.header-hidden {
    transform: translateY(-100%);
}

.header-sticky .site-content {
    padding-top: 100px;
}

.admin-bar.header-sticky .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar.header-sticky .site-header {
        top: 46px;
    }
}

/* ==================== Back to Top Button ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* ==================== Loading States ==================== */
.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== Tracker Results ==================== */
.tracker-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-color);
}

.tracker-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(102,126,234,0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

.tracker-error {
    background: #fee;
    color: #c33;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    border-right: 4px solid #c33;
}

.tracker-success {
    background: #efe;
    color: #3c3;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    border-right: 4px solid #3c3;
}

/* ==================== Post Cards ==================== */
.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-thumbnail {
    margin: -30px -30px 20px;
    overflow: hidden;
    border-radius: var(--cert-radius) var(--cert-radius) 0 0;
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.post-title a {
    color: var(--heading-color);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 15px;
}

.post-excerpt {
    flex: 1;
    margin-bottom: 20px;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* ==================== Stats Grid ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    text-align: center;
    padding: 30px;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* ==================== Breadcrumbs ==================== */
.breadcrumbs {
    margin-bottom: 30px;
    padding: 15px 20px;
    background: var(--light-bg);
    border-radius: 10px;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--primary-color);
}

.breadcrumbs .sep {
    margin: 0 10px;
    color: #999;
}

/* ==================== Scroll Animations ==================== */
.animations-enabled .card,
.animations-enabled .hero-section,
.animations-enabled .gf-cert-tracker-container {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animations-enabled .card.is-visible,
.animations-enabled .hero-section.is-visible,
.animations-enabled .gf-cert-tracker-container.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for cards */
.animations-enabled .card:nth-child(1) { transition-delay: 0.1s; }
.animations-enabled .card:nth-child(2) { transition-delay: 0.2s; }
.animations-enabled .card:nth-child(3) { transition-delay: 0.3s; }
.animations-enabled .card:nth-child(4) { transition-delay: 0.4s; }
.animations-enabled .card:nth-child(5) { transition-delay: 0.5s; }
.animations-enabled .card:nth-child(6) { transition-delay: 0.6s; }

/* ==================== Print Styles ==================== */
@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    .mobile-menu-toggle,
    .header-elements {
        display: none !important;
    }
    
    .site-content {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
}

/* ==================== Selection Color ==================== */
::selection {
    background: var(--primary-color);
    color: #fff;
}

::-moz-selection {
    background: var(--primary-color);
    color: #fff;
}

/* ==================== Scrollbar Styling ==================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

/* ==================== Focus Visible ==================== */
:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* ==================== High Contrast Mode ==================== */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid currentColor;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/**
 * استایل‌های هدرهای اضافی - نسخه 3.0
 *
 * @package GF_Cert_Theme_Pro
 */

/* ==================== هدر شفاف ==================== */
.header-transparent {
    background: transparent !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-transparent .site-header {
    background: transparent !important;
    box-shadow: none;
}

.header-transparent .nav-menu > li > a {
    background: rgba(255, 255, 255, 0.1);
}

.header-transparent .nav-menu > li > a:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==================== هدر دو بخشی ==================== */
.header-split .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-split .header-left {
    flex: 0 0 auto;
}

.header-split .header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-split .main-navigation {
    flex: 1;
}

/* ==================== هدر مینیمال ==================== */
.header-minimal {
    background: #fff !important;
    color: var(--text-color) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-minimal .site-title a {
    color: var(--heading-color) !important;
}

.header-minimal .nav-menu > li > a {
    background: transparent;
    color: var(--text-color) !important;
    padding: 8px 12px;
}

.header-minimal .nav-menu > li > a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color) !important;
}

.header-minimal .minimal-toggle {
    background: transparent;
    color: var(--text-color);
}

.header-minimal .minimal-toggle span {
    background: var(--text-color);
}

/* ==================== هدر فروشگاهی ==================== */
.header-ecommerce {
    background: #fff !important;
    color: var(--text-color) !important;
}

.header-ecommerce .top-bar {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 0;
    font-size: 0.85rem;
}

.header-ecommerce .top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-ecommerce .top-bar a {
    color: #fff;
}

.header-ecommerce .top-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.header-ecommerce .main-header {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.header-ecommerce .header-search-advanced {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
}

.header-ecommerce .header-search-advanced .search-form {
    display: flex;
    position: relative;
}

.header-ecommerce .header-search-advanced .search-field {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.header-ecommerce .header-search-advanced .search-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

.header-ecommerce .header-search-advanced .search-submit {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-ecommerce .header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-ecommerce .header-cart {
    position: relative;
}

.header-ecommerce .cart-link {
    display: flex;
    align-items: center;
    color: var(--text-color);
    position: relative;
}

.header-ecommerce .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: #fff;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-ecommerce .header-navigation {
    background: var(--primary-color);
    color: #fff;
}

.header-ecommerce .header-navigation .nav-menu > li > a {
    background: transparent;
    border-radius: 0;
    padding: 15px 20px;
}

.header-ecommerce .header-navigation .nav-menu > li > a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ==================== رسپانسیو هدرها ==================== */
@media (max-width: 992px) {
    .header-split .header-right {
        gap: 15px;
    }
    
    .header-ecommerce .header-search-advanced {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-transparent {
        position: relative;
        background: var(--primary-color) !important;
    }
    
    .header-split .header-inner {
        flex-wrap: wrap;
    }
    
    .header-ecommerce .top-bar {
        display: none;
    }
    
    .header-ecommerce .header-navigation {
        display: none;
    }
}

/**
 * استایل‌های فوتر - نسخه 3.0
 *
 * @package GF_Cert_Theme_Pro
 */

/* ناحیه ویجت‌های فوتر */
.footer-widgets-area {
    background: rgba(0, 0, 0, 0.1);
    padding: 60px 0 40px;
}

/* ✅ اصلاح شده: استفاده از CSS Grid برای ستون‌ها */
.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 ستون پیش‌فرض */
    gap: 30px;
    align-items: start; /* تراز بالا برای ستون‌های با ارتفاع متفاوت */
}

/* ✅ اضافه شده: پشتیبانی از تعداد ستون‌های مختلف */
.footer-widgets-grid:has(.footer-widget-column:nth-child(1):last-child) {
    grid-template-columns: 1fr;
}

.footer-widgets-grid:has(.footer-widget-column:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
}

.footer-widgets-grid:has(.footer-widget-column:nth-child(3):last-child) {
    grid-template-columns: repeat(3, 1fr);
}

.footer-widgets-grid:has(.footer-widget-column:nth-child(4):last-child) {
    grid-template-columns: repeat(4, 1fr);
}

/* ✅ پشتیبانی از مرورگرهای قدیمی‌تر با :nth-child */
.footer-widgets-grid > .footer-widget-column:first-child:nth-last-child(1) {
    grid-column: 1 / -1;
}

.footer-widgets-grid > .footer-widget-column:first-child:nth-last-child(2),
.footer-widgets-grid > .footer-widget-column:first-child:nth-last-child(2) ~ .footer-widget-column {
    grid-template-columns: repeat(2, 1fr);
}

.footer-widgets-grid > .footer-widget-column:first-child:nth-last-child(3),
.footer-widgets-grid > .footer-widget-column:first-child:nth-last-child(3) ~ .footer-widget-column {
    grid-template-columns: repeat(3, 1fr);
}

.footer-widget-column {
    padding: 0 15px;
    min-width: 0; /* جلوگیری از overflow */
}

/* استایل ویجت‌های فوتر */
.footer-widget {
    margin-bottom: 30px;
}

.footer-widget .widget-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget .widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: rgba(255, 255, 255, 0.9);
    display: block;
    padding: 5px 0;
    transition: all 0.3s ease;
}

.footer-widget ul li a:hover {
    color: #fff;
    padding-right: 10px;
}

/* ویجت اطلاعات تماس */
.contact-info-widget .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.contact-info-widget svg {
    flex-shrink: 0;
    margin-top: 3px;
}

.contact-info-widget a {
    color: rgba(255, 255, 255, 0.9);
}

.contact-info-widget a:hover {
    color: #fff;
}

/* ویجت شبکه‌های اجتماعی */
.social-links-widget {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* ویجت خبرنامه */
.newsletter-form .form-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form .btn {
    padding: 12px 25px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form .btn:hover {
    background: #e67e22;
}

/* فوتر پایینی */
.footer-bottom-area {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-bottom-widgets {
    display: flex;
    gap: 20px;
}

/* منوی فوتر */
.footer-navigation ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.footer-navigation a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.footer-navigation a:hover {
    color: #fff;
}

/* ✅ اصلاح شده: رسپانسیو بهتر */
@media (max-width: 1200px) {
    .footer-widgets-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .footer-widgets-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .footer-widget-column {
        padding: 0;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-widgets-area {
        padding: 40px 0 30px;
    }
    
    .social-links-widget {
        justify-content: center;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .newsletter-form input[type="email"] {
        min-width: 100%;
    }
}

/**
 * استایل‌های بلوک‌های گوتنبرگ
 *
 * @package GF_Cert_Theme_Pro
 */

/* استایل کارت */
.is-style-cert-card {
    background: var(--light-bg);
    border-radius: var(--cert-radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.is-style-cert-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* استایل شیشه‌ای */
.is-style-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--cert-radius);
}

/* استایل دکمه کپسولی */
.is-style-pill .wp-block-button__link {
    border-radius: 50px !important;
}

/* استایل دکمه سایه‌دار */
.is-style-shadow .wp-block-button__link {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.is-style-shadow .wp-block-button__link:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* پترن رهگیری گواهی */
.gf-cert-tracker-pattern {
    padding: 40px;
    border-radius: var(--cert-radius);
}

/* پترن آمار */
.gf-cert-stats-pattern .stat-box {
    padding: 30px;
    border-radius: var(--cert-radius);
    text-align: center;
    color: #fff;
}

.gf-cert-stats-pattern .stat-box p {
    margin: 0;
}

/* هدر بلوکی */
.wp-block-template-part-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 20px 0;
}

.wp-block-template-part-header a {
    color: #fff;
}

/* فوتر بلوکی */
.wp-block-template-part-footer {
    background: linear-gradient(135deg, var(--footer-bg) 0%, var(--primary-color) 100%);
    color: #fff;
    padding: 50px 0 30px;
    margin-top: 60px;
}

.wp-block-template-part-footer a {
    color: rgba(255, 255, 255, 0.9);
}

/* تنظیمات RTL برای گوتنبرگ */
.editor-styles-wrapper {
    direction: rtl;
    font-family: var(--body-font);
}

/* عرض کامل در المنتور */
.elementor-section-full_width {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* پشتیبانی از align-wide و align-full */
.alignwide {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}
