/*!/wp-content/themes/studiare-child/style.css*//*
Theme Name:   Studiare Child (EconClinic)
Description:  Signature Edition - State of the Art (WCAG AA + Touch Safe + GPU Smart + CSS Containment)
Template:     studiare
Version:      12.0.0 (Production Ready)
*/

/* =========================================
   0. متغیرهای سراسری (Design Tokens)
   ========================================= */
:root {
    /* --- Brand Colors --- */
    --color-brand-primary: #07294d;
    --color-brand-dark: #0A0830;
    --color-brand-accent: #ffc600;

    /* --- Text & Background --- */
    --color-text-body: #333333;
    --color-text-light: #6b6c6d;
    /* WCAG AA Compliant */
    --color-bg-white: #ffffff;
    --color-bg-light: #f9f9f9;

    /* --- UI Elements --- */
    --color-border: #eaeaea;
    --color-border-light: #f5f5f5;
    --color-bg-warning-light: rgba(255, 198, 0, 0.15);
    --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.08);

    /* --- Status Colors --- */
    --color-success: #00ab35;
    --color-danger: #cc1818;

    /* --- Typography --- */
    --font-primary: 'IRANYekanX FaNum', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-icon: "Font Awesome 5 Brands", "Font Awesome 5 Free", FontAwesome;
}

/* =========================================
   1. تنظیمات هسته (Core & Reset)
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-brand-primary) var(--color-bg-light);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    background-color: var(--color-bg-white);
    color: var(--color-text-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

@media (hover: hover) {
    ::-webkit-scrollbar {
        width: 8px;
    }

    ::-webkit-scrollbar-track {
        background: var(--color-bg-light);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--color-brand-primary);
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--color-brand-dark);
    }
}

::selection {
    background-color: var(--color-brand-primary);
    color: var(--color-bg-white);
}

/* =========================================
   2. تایپوگرافی (Optimized: 2 Weights Only)
   ========================================= */
/* Regular (400) */
@font-face{font-family:'IRANYekanX FaNum';src:local('IRANYekanX FaNum'), local('IRANYekanX-FaNum'),
url('/wp-content/themes/studiare-child/assets/fonts/webfonts/IRANYekanXFaNum-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap;}

/* Bold (700) */
@font-face{font-family:'IRANYekanX FaNum';src:local('IRANYekanX FaNum Bold'), local('IRANYekanX-FaNum-Bold'),
url('/wp-content/themes/studiare-child/assets/fonts/webfonts/IRANYekanXFaNum-Bold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap;}

/* Alias for plugin compatibility */
@font-face{font-family:'sciranyekan';src:local('IRANYekanX FaNum'), local('IRANYekanX-FaNum'),
url('/wp-content/themes/studiare-child/assets/fonts/webfonts/IRANYekanXFaNum-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap;}

@font-face{font-family:'sciranyekan';src:local('IRANYekanX FaNum Bold'), local('IRANYekanX-FaNum-Bold'),
url('/wp-content/themes/studiare-child/assets/fonts/webfonts/IRANYekanXFaNum-Bold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap;}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.3;
    color: var(--color-brand-primary);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

/* =========================================
   3. کامپوننت‌ها (High Performance Architecture)
   ========================================= */
.course-item {
    border: 1px solid var(--color-border-light);
    background-color: var(--color-bg-white);
    border-radius: 12px;
    overflow: hidden;
    contain: layout;
    transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (hover: hover) {
    .course-item:hover {
        box-shadow: var(--shadow-soft);
        transform: translateY(-4px) translateZ(0);
        border-color: transparent;
    }
}

.product-info-box .price del::after {
    background: var(--color-danger);
}

.product-info-box .price del .amount,
.course-item del,
.course-item del .amount {
    color: var(--color-danger);
    opacity: 0.8;
}

.product-info-box .price .amount,
.course-price ins,
.course-price ins .amount {
    color: var(--color-success);
    font-weight: 700;
}

.course-price ins {
    padding: 0 5px;
    text-decoration: none;
    display: inline-block;
}

/* =========================================
   4. محتوا و بلاگ (Responsive Detail)
   ========================================= */
.blog-main-loop .entry-content {
    font-size: 1.05rem;
    color: var(--color-text-body);
}

.wp-block-rank-math-toc-block,
.post-author-box {
    background: var(--color-bg-white);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

blockquote {
    color: var(--color-brand-primary);
    background: var(--color-bg-warning-light);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    border-right: 4px solid var(--color-brand-primary);
    margin: 2rem 0;
    font-weight: 700;
}

.elementor-widget-shortcode iframe,
.entry-content iframe {
    border-radius: 16px;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow-soft);
}

@media (max-width: 768px) {

    .elementor-widget-shortcode iframe,
    .entry-content iframe {
        border-radius: 10px;
    }
}

/* =========================================
   5. انیمیشن‌ها و وضعیت‌ها
   ========================================= */
body.error404 .page-title {
    display: none;
}

body.error404 .cls-1 {
    fill: var(--color-brand-accent);
}

body.error404 .cls-2 {
    fill: var(--color-brand-primary);
}

body.error404 .wheel {
    animation: wheel-rotate 8s linear infinite;
    transform-origin: center;
    transform-box: fill-box;
}

@keyframes wheel-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {

    body.error404 .wheel,
    .course-item,
    .sidebar_shop ul li a {
        animation: none;
        transition: none;
        transform: none;
    }
}

/* =========================================
   6. پچ‌های پایداری (Stability Fixes)
   ========================================= */
.owl-carousel:not(.owl-loaded) {
    display: flex;
    width: 100%;
    min-height: clamp(150px, 30vh, 450px);
    overflow: hidden;
    gap: 20px;
}

.owl-carousel:not(.owl-loaded)>div {
    flex: 1;
    background: var(--color-bg-light);
    border-radius: 10px;
}

.elementor-swiper,
.elementor-image-carousel,
.swiper-container {
    visibility: visible;
}

/* =========================================
   7. آیکون‌ها و سایدبار (RTL & FA Fixed)
   ========================================= */
ul.btn-group-share li a i,
.share_box_content i,
.social-share i,
.elementor-social-icon i {
    font-family: var(--font-icon) !important;
    font-style: normal !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 1em;
}

.fas,
.fa-solid {
    font-weight: 900 !important;
}

.far,
.fa-regular {
    font-weight: 400 !important;
}

.fab,
.fa-brands {
    font-weight: 400 !important;
}

/* Sidebar List Optimization */
.sidebar_shop ul,
.widget ul,
.widget_categories ul,
body .widget_nav_menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar_shop ul li,
.widget ul li,
.widget_categories ul li {
    padding: 0;
    margin: 0;
    border-bottom: 1px solid var(--color-border-light);
}

.sidebar_shop ul li:last-child,
.widget ul li:last-child {
    border-bottom: none;
}

.sidebar_shop ul li a,
.widget ul li a {
    display: block;
    padding: 12px 5px;
    text-decoration: none;
    color: var(--color-text-body);
    transition: transform 0.2s cubic-bezier(0.215, 0.610, 0.355, 1.000), color 0.2s ease;
    backface-visibility: hidden;
}

@media (hover: hover) {

    .sidebar_shop ul li a:hover,
    .widget ul li a:hover {
        color: var(--color-brand-primary);
        transform: translateX(6px);
    }

    .rtl .sidebar_shop ul li a:hover,
    .rtl .widget ul li a:hover {
        transform: translateX(-6px);
    }
}

/* =========================================
   8. استایل پرینت (Print Styles)
   ========================================= */
@media print {
    body {
        background: white;
        color: black;
    }

    .header,
    .footer,
    .sidebar,
    .btn-group-share {
        display: none !important;
    }

    a[href]::after {
        content: " ("attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    .course-item {
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}