/*
Theme Name: Dorachi
Theme URI: https://dorachi.local/
Author: Dorachi
Description: قالب مجله سفر و ایران‌گردی دوراچی، تبدیل‌شده از قالب HTML اصلی.
Version: 6.2.9
Text Domain: dorachi
Requires at least: 6.2
Requires PHP: 7.4
*/

.skip-link {
    position: fixed;
    inset-block-start: 8px;
    inset-inline-start: 8px;
    z-index: 10000;
    padding: 12px 16px;
    background: #fff;
    color: #111827;
    border: 3px solid #1f6f5f;
    border-radius: 8px;
    transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

:where(a, button, input, textarea, select, summary):focus-visible {
    outline: 3px solid #1f6f5f;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.archive-hero .inner-hero__shell { min-height: 310px; }
.dorachi-layout-container {
    width: min(calc(100% - 40px), 1240px) !important;
    max-width: 1240px !important;
    margin-inline: auto !important;
}
.taxonomy-archive { width:100%; max-width:100%; overflow:clip; }
body.tag { display:block; width:auto; padding:0; border-radius:0; }
.taxonomy-archive__container { min-width:0; }
.taxonomy-archive .archive-hero,
.taxonomy-archive__results { width:100%; max-width:100%; }
.taxonomy-archive .inner-hero__shell,
.taxonomy-archive .dorachi-post-grid { width:100%; min-width:0; }
.archive-taxonomies { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:32px; }
.archive-taxonomies a { min-height:44px; display:inline-flex; align-items:center; padding:8px 16px; border:1px solid var(--border); border-radius:999px; background:var(--surface); }
.dorachi-post-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.dorachi-post-card { overflow:hidden; border:1px solid var(--border); border-radius:18px; background:var(--surface); box-shadow:var(--shadow-sm); }
.dorachi-post-card__media { display:block; aspect-ratio:16/10; overflow:hidden; }
.dorachi-post-card__media img { width:100%; height:100%; object-fit:cover; transition:transform .3s ease; }
.dorachi-post-card:hover .dorachi-post-card__media img { transform:scale(1.025); }
.dorachi-post-card__body { padding:22px; }
.dorachi-post-card__body h2 { margin:12px 0; font-size:22px; line-height:1.65; }
.dorachi-post-card__body p { line-height:1.9; }
.dorachi-pagination { margin-top:40px; }
.dorachi-pagination .page-numbers { min-width:44px; min-height:44px; display:inline-flex; align-items:center; justify-content:center; margin:3px; border:1px solid var(--border); border-radius:10px; }
.dorachi-pagination .current { background:var(--primary); color:#fff; }
.article-shell { width:min(calc(100% - 40px),900px); max-width:900px; min-width:0; margin-inline:auto; }
.article-content,
.entry-content,
.smart-summary { width:100%; max-width:100%; min-width:0; }
.article-content,
.entry-content { overflow-wrap:anywhere; }
.article-content > h1 { margin:18px 0 28px; font-size:clamp(34px,5vw,58px); }
.entry-content { font-size:18px; line-height:2.15; }
.entry-content img { max-width:100%; height:auto; border-radius:16px; }
@media(max-width:900px){.dorachi-post-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.dorachi-post-grid{grid-template-columns:1fr}.dorachi-post-card__body{padding:18px}}
@media(max-width:680px){.dorachi-layout-container{width:min(calc(100% - 28px),1240px)!important}}

.search-open { overflow:hidden; }
.header__actions .search-trigger { display:inline-grid; }
.search-modal { position:fixed; inset:0; z-index:1000; display:grid; place-items:start center; padding:clamp(80px,15vh,160px) 16px 24px; }
.search-modal[hidden] { display:none; }
.search-modal__backdrop { position:absolute; inset:0; background:rgba(4,12,9,.72); backdrop-filter:blur(6px); }
.search-modal__panel { position:relative; width:min(680px,100%); padding:32px; border:1px solid var(--border); border-radius:20px; background:var(--surface); box-shadow:var(--shadow-xl); }
.search-modal__panel h2 { margin-bottom:20px; }
.search-modal__close { position:absolute; inset-block-start:16px; inset-inline-end:16px; }
.site-search-form label { display:block; margin-bottom:8px; font-weight:700; }
.site-search-form>div { display:grid; grid-template-columns:1fr auto; gap:8px; }
.site-search-form input { min-width:0; min-height:50px; padding:10px 14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text-strong); font-size:16px; }

.single-article { padding-top:54px; }
.article-kicker { margin-bottom:12px; color:var(--primary); font-weight:700; }
.article-content>h1 { max-width:850px; margin:0 0 28px; font-size:clamp(30px,4vw,48px); line-height:1.5; }
.article-meta-box { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; overflow:hidden; margin:0 0 28px; border:1px solid var(--border); border-radius:16px; background:var(--border); box-shadow:var(--shadow-sm); }
.article-meta-box>div { min-height:88px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:16px 18px; background:var(--surface); text-align:center; }
.article-meta-box span { color:var(--muted); font-size:12px; }
.article-meta-box strong { color:var(--text-strong); font-size:14px; }
.smart-summary { overflow:visible; margin:0 0 30px; padding:24px 28px; border:1px solid color-mix(in srgb,var(--primary) 28%,var(--border)); border-inline-start:5px solid var(--primary); border-radius:16px; background:var(--primary-soft); }
.smart-summary > * { max-width:100%; min-width:0; }
.smart-summary h2 { margin:0 0 8px; font-family:inherit; font-size:20px; }
.smart-summary p:last-child { margin-bottom:0; }
.smart-summary,.smart-summary :where(p,li,span,strong) { color:var(--text-strong) !important; }
.archive-hero .smart-summary { background:#f8fbf9; }
.archive-hero .smart-summary,.archive-hero .smart-summary :where(p,li,span,strong) { color:#183d30 !important; }
.single-article .article-cover { position:relative; display:block; width:100%; max-width:100%; height:auto; min-height:0; aspect-ratio:16/9; overflow:hidden; margin:0 0 40px; border-radius:20px; background:var(--surface-2); box-shadow:var(--shadow-md); }
.single-article .article-cover img { position:absolute; inset:0; display:block; visibility:visible; width:100%; height:100%; max-width:none; aspect-ratio:auto; object-fit:cover; object-position:center; }
.entry-content :where(img,figure img) { max-width:100%; height:auto; border-radius:16px; }
.entry-content figure { max-width:100%; }
.entry-content :where(iframe,video,embed,object,pre) { max-width:100%; }
.entry-content :where(.alignwide,.alignfull) { width:100%; max-width:100%; margin-inline:0; }
.entry-content table { width:100%; min-width:620px; border-collapse:separate; border-spacing:0; color:var(--text-strong); font-size:15px; }
.entry-content :where(.wp-block-table,table) { overflow-x:auto; }
.entry-content table:not(.has-fixed-layout) { display:block; max-width:100%; overflow-x:auto; border:1px solid var(--border); border-radius:14px; }
.entry-content table thead { display:table-header-group; }
.entry-content table tbody { display:table-row-group; }
.entry-content table tfoot { display:table-footer-group; }
.entry-content th,.entry-content td { padding:14px 16px; border-inline-end:1px solid var(--border); border-bottom:1px solid var(--border); text-align:right; vertical-align:top; }
.entry-content th { background:var(--primary-soft); color:var(--primary-strong); font-weight:800; }
.entry-content tr:nth-child(even) td { background:color-mix(in srgb,var(--surface-2) 70%,transparent); }
.entry-content tr:last-child td { border-bottom:0; }
.post-tags { margin-top:48px; padding:24px; border:1px solid var(--border); border-radius:16px; background:var(--surface-2); }
.post-tags h2 { margin:0 0 14px; font-family:inherit; font-size:18px; }
.post-tags>div { display:flex; flex-wrap:wrap; gap:8px; }
.post-tags a { min-height:40px; display:inline-flex; align-items:center; padding:7px 13px; border:1px solid var(--border); border-radius:999px; background:var(--surface); color:var(--primary-strong); font-size:13px; }
.author-box { display:grid; grid-template-columns:96px 1fr; gap:22px; align-items:center; margin-top:30px; padding:26px; border:1px solid var(--border); border-radius:18px; background:var(--surface); box-shadow:var(--shadow-sm); }
.author-box img { width:96px; height:96px; border-radius:50%; }
.author-box span { color:var(--muted); font-size:12px; }
.author-box h2 { margin:3px 0 8px; font-family:inherit; font-size:22px; }
.author-box p { margin-bottom:10px; }
.comments-area { margin-top:54px; padding-top:38px; border-top:1px solid var(--border); }
.comment-list { display:grid; gap:14px; padding:0; list-style:none; }
.comment-body { padding:20px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
.comment-author { display:flex; align-items:center; gap:10px; }
.comment-author img { border-radius:50%; }
.comment-metadata { margin:8px 0; font-size:12px; }
.comment-form { display:grid; gap:14px; }
.comment-form label { display:block; margin-bottom:6px; font-weight:700; }
.comment-form :where(input[type=text],input[type=email],input[type=url],textarea) { width:100%; min-height:48px; padding:12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text-strong); font-size:16px; }
.comment-form textarea { min-height:150px; }
.empty-state { padding:40px; border:1px solid var(--border); border-radius:18px; text-align:center; }
@media(max-width:760px){
    .single-article{width:100%; max-width:100%; overflow-x:clip; padding-top:32px}
    .article-shell{width:calc(100% - 28px); max-width:calc(100% - 28px); margin-inline:auto}
    .article-content>h1{font-size:clamp(28px,9vw,40px)}
    .article-meta-box{grid-template-columns:repeat(2,minmax(0,1fr))}
    .article-meta-box>div{min-width:0; padding:14px 8px}
    .smart-summary{padding:18px 16px; border-inline-start-width:4px}
    .smart-summary :where(p,li){text-align:right; word-break:normal; overflow-wrap:anywhere}
    .entry-content{font-size:16px; line-height:2}
    .entry-content>*{max-width:100%}
    .entry-content :where(.wp-block-table,figure.wp-block-table){width:100%; max-width:100%; margin-inline:0; overflow:visible}
    .entry-content table,
    .entry-content table:not(.has-fixed-layout){display:table; width:100%; min-width:0; max-width:100%; table-layout:fixed; overflow:visible; font-size:12px}
    .entry-content table :where(th,td){min-width:0; padding:10px 7px; line-height:1.85; white-space:normal; word-break:normal; overflow-wrap:anywhere}
    .single-article .article-cover{display:block; width:100%; aspect-ratio:16/9; margin-bottom:28px}
    .single-article .article-cover img{display:block; visibility:visible}
    .author-box{grid-template-columns:1fr}
    .site-search-form>div{grid-template-columns:1fr}
    .search-modal__panel{padding:28px 20px}
}

.dorachi-ad-slot { position:relative; margin-block:28px; overflow:hidden; border:1px solid var(--border); border-radius:18px; background:var(--surface); }
.dorachi-ad-slot>.ad-label { position:absolute; z-index:3; inset-block-start:10px; inset-inline-start:10px; padding:3px 8px; background:rgba(255,255,255,.9); color:#253c70; }
.dorachi-ad-track { position:relative; min-height:120px; }
.dorachi-ad-item { display:block; }
.dorachi-ad-item img { display:block; width:100%; max-height:280px; object-fit:cover; }
.dorachi-ad-slider .dorachi-ad-item { display:none; }
.dorachi-ad-slider .dorachi-ad-item.is-active { display:block; }
.dorachi-ad-controls { position:absolute; z-index:3; inset-inline-end:12px; inset-block-end:12px; display:flex; gap:6px; }
.dorachi-ad-controls button { width:44px; height:44px; border:1px solid rgba(255,255,255,.5); border-radius:50%; background:rgba(14,37,29,.78); color:#fff; cursor:pointer; }
.single-article .dorachi-ad-slot { width:100%; margin-inline:0; }
.site-footer .brand img { filter:brightness(0) invert(1); opacity:.96; }
