/* Samsung Agency - Main CSS */

/* Base styles */
html {
    scroll-behavior: smooth;
    font-family: 'IRANYekanX', sans-serif;
}

body {
    font-family: 'IRANYekanX', sans-serif;
    direction: rtl;
}

/* ─── Content / Classic Editor / Gutenberg ─── */
.entry-content, .gutenberg-content, .page-content, article,
h1, h2, h3, h4, h5, h6 {
    font-family: 'IRANYekanX', sans-serif;
}

h1 { font-size: 2.25rem; line-height: 1.2; font-weight: 900; margin: 0 0 0.75rem; color: var(--brand-dark-color, #0F172A); }
h2 { font-size: 1.875rem; line-height: 1.25; font-weight: 900; margin: 2rem 0 0.75rem; color: var(--brand-dark-color, #0F172A); }
h3 { font-size: 1.5rem; line-height: 1.3; font-weight: 700; margin: 1.5rem 0 0.5rem; color: var(--brand-dark-color, #0F172A); }
h4 { font-size: 1.25rem; line-height: 1.35; font-weight: 700; margin: 1.25rem 0 0.5rem; color: var(--brand-dark-color, #0F172A); }
h5 { font-size: 1.125rem; line-height: 1.4; font-weight: 600; margin: 1rem 0 0.5rem; color: var(--brand-dark-color, #0F172A); }
h6 { font-size: 1rem; line-height: 1.4; font-weight: 600; margin: 0.75rem 0 0.5rem; color: var(--brand-dark-color, #0F172A); }

p { margin: 0 0 1rem; line-height: 1.75; color: #374151; }

/* Links */
a { color: var(--brand-color, #1428A0); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--brand-dark-color, #0F172A); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a, .gutenberg-content a, .page-content a, .article-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Lists */
ul, ol { margin: 0 0 1rem; padding-right: 1.5rem; padding-left: 0; }
ul { list-style-type: disc; }
ol { list-style-type: decimal; }
li { margin-bottom: 0.375rem; line-height: 1.65; color: #374151; }

/* Blockquotes */
blockquote {
    margin: 1.5rem 0; padding: 1rem 1.5rem; border-right: 4px solid var(--brand-color, #1428A0);
    background-color: rgba(165, 0, 52, 0.03); border-radius: 0 0.5rem 0.5rem 0; font-style: italic; color: #475569;
}
blockquote p { margin-bottom: 0; }

/* Code */
code { font-family: monospace; font-size: 0.875em; background: #f1f5f9; padding: 0.125rem 0.375rem; border-radius: 0.25rem; color: #e11d48; }
pre { margin: 1.5rem 0; padding: 1rem 1.25rem; background: #1e293b; color: #e2e8f0; border-radius: 0.5rem; overflow-x: auto; }
pre code { background: none; padding: 0; color: inherit; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
th, td { padding: 0.75rem 1rem; border: 1px solid #e5e7eb; text-align: right; }
th { background: #f8fafc; font-weight: 700; color: var(--brand-dark-color, #0F172A); }
td { color: #374151; }
tr:nth-child(even) { background: #f9fafb; }

/* Images */
img { max-width: 100%; height: auto; border-radius: 0.5rem; }

/* HR */
hr { border: none; border-top: 1px solid #e5e7eb; margin: 2rem 0; }

/* Strong / Em */
strong { font-weight: 700; color: var(--brand-dark-color, #0F172A); }
em { font-style: italic; }

/* ─── WordPress Blocks ─── */
.wp-block-group {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem;
}
.wp-block-group.has-background { border-radius: 1rem; }

.wp-block-columns { display: flex; flex-wrap: wrap; gap: 1.5rem; max-width: 80rem; margin-left: auto; margin-right: auto; }
.wp-block-column { flex-basis: 0; flex-grow: 1; min-width: 0; }
.wp-block-column.is-layout-flow > * { margin-bottom: 1rem; }

.wp-block-separator { border-top: 1px solid #e5e7eb; margin: 2rem 0; }

.wp-block-list { padding-right: 1.5rem; list-style-type: disc; }
.wp-block-list ol { list-style-type: decimal; }
.wp-block-list li { margin-bottom: 0.375rem; line-height: 1.65; color: #374151; }

.wp-block-quote { margin: 1.5rem 0; padding: 1rem 1.5rem; border-right: 4px solid var(--brand-color, #1428A0); background: rgba(165, 0, 52, 0.03); border-radius: 0 0.5rem 0.5rem 0; }
.wp-block-quote p { margin-bottom: 0; font-style: italic; color: #475569; }
.wp-block-quote cite { display: block; margin-top: 0.5rem; font-size: 0.875rem; color: #64748b; }

.wp-block-image { margin: 1.5rem 0; }
.wp-block-image img { border-radius: 0.5rem; }
.wp-block-image figcaption { text-align: center; font-size: 0.875rem; color: #64748b; margin-top: 0.5rem; }

.wp-block-button .wp-block-button__link { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.75rem; border-radius: 0.75rem; font-weight: 600; font-size: 0.875rem; text-decoration: none; transition: all 0.2s ease; }
.wp-block-button__link.has-primary-background-color { background: var(--brand-color, #1428A0); color: #fff; }
.wp-block-button__link.has-primary-background-color:hover { background: var(--brand-dark-color, #0F172A); }

/* ─── FAQ accordion ─── */
.sa-faq-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.sa-faq-content.open { max-height: 500px; }

/* ─── Navigation menu ─── */
/* Remove list bullets */
header nav ul,
header nav li,
#mobile-drawer nav ul,
#mobile-drawer nav li {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0;
    margin: 0;
}

/* Desktop menu - flex start (RTL: starts from right) */
header nav ul.flex {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Nav links - no underline */
header nav ul li a,
#mobile-drawer nav ul li a {
    text-decoration: none !important;
}

header nav ul li a:hover,
#mobile-drawer nav ul li a:hover {
    text-decoration: none !important;
}

/* ─── Breadcrumb ─── */
nav[aria-label="مسیر صفحه"] ol {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Submenu dropdown on hover */
.has-submenu {
    position: relative;
}

.has-submenu > ul,
.submenu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    padding: 8px 0;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all 0.15s ease;
    display: block;
}

.has-submenu:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile submenu */
.mobile-submenu { transition: max-height 0.3s ease; }

/* ─── Mobile sticky bar padding ─── */
@media (max-width: 1023px) {
    body { padding-bottom: 72px; }
}

/* ─── Star rating ─── */
.sa-star-filled { color: #fbbf24; fill: #fbbf24; }
.sa-star-empty { color: #e5e7eb; fill: #e5e7eb; }
