/*
Theme Name: Abbas Azimi — Industrial Authority
Theme URI: https://abbasazimi.me/
Author: Digital Strategy Team
Description: Mobile-first RTL block theme for Abbas Azimi. Light/Dark, accessible native mobile navigation, industrial knowledge-led design.
Version: 0.3.1
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: abbas-azimi-industrial
*/
:root {
  --space-indigo:#2b2d42; --lavender-grey:#8d99ae; --platinum:#edf2f4; --punch-red:#ef233c; --flag-red:#d90429;
  --aa-bg:#ffffff; --aa-card:#ffffff; --aa-soft:#edf2f4; --aa-text:#2b2d42; --aa-muted:#485366; --aa-line:#dbe1e7; --aa-accent:#b60022;
  --aa-shadow:0 14px 44px rgba(43,45,66,.06); --aa-font:'Vazir',Tahoma,Arial,sans-serif;
}
:root[data-theme="dark"] { color-scheme:dark; --aa-bg:#151925; --aa-card:#202638; --aa-soft:#252b3f; --aa-text:#edf2f4; --aa-muted:#c5cfdf; --aa-line:#3e4861; --aa-accent:#ff6475; --aa-shadow:0 15px 55px rgba(0,0,0,.16); }
*,*::before,*::after { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:90px; }
body { margin:0; color:var(--aa-text); background:var(--aa-bg); font:400 15px/2 var(--aa-font); direction:rtl; text-rendering:optimizeLegibility; }
button,input,textarea,select { font:inherit; }
img,svg { max-width:100%; height:auto; }
a { color:var(--aa-accent); text-decoration:none; }
a:hover { text-decoration:underline; }
a:focus-visible,button:focus-visible { outline:3px solid var(--punch-red); outline-offset:4px; }
.aa-wrap { width:min(calc(100% - 34px),1180px); margin-inline:auto; }
.aa-site-header { position:relative; z-index:100; background:var(--aa-bg); border-bottom:1px solid var(--aa-line); }
.aa-header-inner { position:relative; min-height:73px; display:flex; align-items:center; gap:12px; justify-content:space-between; }
.aa-brand { display:inline-flex; align-items:center; gap:10px; color:var(--aa-text); white-space:nowrap; font-weight:850; font-size:17px; line-height:1.4; }
.aa-brand:hover { text-decoration:none; }
.aa-mark { direction:ltr; display:grid; place-items:center; flex:none; width:37px; height:37px; background:var(--space-indigo); color:white; border-radius:10px; letter-spacing:-1px; font:800 14px/1.1 Arial,sans-serif; }
.aa-header-actions { display:flex; align-items:center; gap:7px; margin-right:auto; }
.aa-icon-button { flex:none; width:43px; height:43px; border:1px solid var(--aa-line); border-radius:11px; display:grid; place-items:center; color:var(--aa-text); background:var(--aa-soft); cursor:pointer; line-height:1; font-size:20px; }
.aa-nav { display:flex; flex-direction:column; align-items:stretch; gap:0; padding:10px; border:1px solid var(--aa-line); border-radius:17px; background:var(--aa-card); box-shadow:var(--aa-shadow); }
.aa-nav a { color:var(--aa-text); padding:11px 13px; font-size:14px; border-radius:8px; }
.aa-nav a:hover,.aa-nav a:focus-visible { background:var(--aa-soft); text-decoration:none; }
.aa-js .aa-nav { display:none; }
.aa-js .aa-nav.is-open { display:flex; }
.aa-site-header .aa-nav { position:absolute; inset-inline:0; top:calc(100% + 4px); }
.aa-theme-toggle .aa-light-icon { display:none; }
:root[data-theme="dark"] .aa-theme-toggle .aa-light-icon { display:inline; }
:root[data-theme="dark"] .aa-theme-toggle .aa-dark-icon { display:none; }
.aa-kicker { font-size:12px; font-weight:900; color:var(--aa-accent); letter-spacing:.04em; }
.aa-hero { padding:48px 0 55px; overflow:hidden; }
.aa-hero-grid { display:grid; gap:25px; align-items:center; }
.aa-hero h1 { font-size:clamp(34px,8.9vw,45px); line-height:1.55; font-weight:900; letter-spacing:-.055em; margin:13px 0 17px; }
.aa-highlight { color:var(--aa-accent); }
.aa-hero-lead { max-width:620px; color:var(--aa-muted); font-size:15px; line-height:2.15; margin:0 0 24px; }
.aa-buttons { display:flex; flex-wrap:wrap; gap:9px; align-items:center; }
.aa-button,.aa-button-secondary { display:inline-flex; min-height:45px; align-items:center; justify-content:center; padding:10px 18px; font-size:13px; font-weight:800; border-radius:11px; transition:transform .16s; }
.aa-button { background:var(--flag-red); color:#fff; }
.aa-button:hover { background:#b90022; color:white; text-decoration:none; transform:translateY(-1px); }
.aa-button-secondary { color:var(--aa-text); border:1px solid var(--aa-line); }
.aa-button-secondary:hover { text-decoration:none; border-color:var(--aa-accent); }
.aa-hero-figure { background:var(--aa-soft); min-height:280px; border:1px solid var(--aa-line); border-radius:22px; position:relative; overflow:hidden; display:grid; place-items:center; isolation:isolate; }
.aa-hero-figure::before { content:""; position:absolute; border:1px solid var(--lavender-grey); border-radius:50%; width:320px; height:320px; right:-95px; top:-85px; opacity:.6; box-shadow:0 0 0 40px var(--aa-soft),0 0 0 41px var(--lavender-grey),0 0 0 80px var(--aa-soft),0 0 0 81px var(--lavender-grey); z-index:-1; }
.aa-hero-figure::after { content:""; position:absolute; width:130px;height:130px; background:var(--flag-red); border-radius:50% 0 50% 50%; left:-45px;bottom:-53px; }
.aa-hero-letter { color:var(--aa-text); direction:ltr; font:850 clamp(110px,35vw,205px)/1 Arial,sans-serif; letter-spacing:-.12em; padding-inline-end:25px; }
.aa-figure-note { position:absolute; left:16px; bottom:16px; background:var(--aa-card); border:1px solid var(--aa-line); border-radius:10px; padding:7px 11px; font:700 10px/1.4 Arial,sans-serif; letter-spacing:.09em; direction:ltr; }
.aa-section { padding:55px 0; }
.aa-section-soft { background:var(--aa-soft); }
.aa-section-head { margin-bottom:25px; }
.aa-section h2,.aa-archive-title { font-size:clamp(26px,7.5vw,39px); line-height:1.5; margin:8px 0 10px; font-weight:900; letter-spacing:-.035em; }
.aa-section-desc { max-width:690px; color:var(--aa-muted); margin:0; font-size:14px; }
.aa-card-grid { display:grid; gap:13px; }
.aa-card { border:1px solid var(--aa-line); border-radius:17px; padding:22px; background:var(--aa-card); box-shadow:var(--aa-shadow); min-height:180px; }
.aa-card small { display:block; color:var(--aa-accent); font:800 13px/1.3 Arial,sans-serif; margin-bottom:22px; }
.aa-card h3 { margin:0 0 9px; font-size:19px; line-height:1.7; }
.aa-card p { color:var(--aa-muted); margin:0; font-size:13px; line-height:2.15; }
.aa-vision { display:grid; gap:22px; }
.aa-vision-highlight { background:var(--space-indigo); color:white; border-radius:17px; padding:31px; display:flex; flex-direction:column; justify-content:center; }
.aa-vision-highlight strong { font-size:26px; line-height:1.8; }
.aa-vision-highlight span { font-size:14px; color:#edf2f4; margin-top:10px; }
.aa-vision-copy { padding-block:10px; }
.aa-vision-copy p { color:var(--aa-muted); }
.aa-eyebrow-line { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.aa-pill { border:1px solid var(--aa-line); border-radius:99px; font-size:12px; padding:5px 12px; color:var(--aa-muted); }
.aa-company-links { display:grid; gap:13px; }
.aa-company { border-radius:17px; border:1px solid var(--aa-line); padding:20px; display:flex; flex-direction:column; gap:12px; justify-content:space-between; background:var(--aa-card); }
.aa-company strong { font-size:19px; }
.aa-company p { margin:0; font-size:13px; color:var(--aa-muted); }
.aa-company a { font:750 13px/1.8 var(--aa-font); }
.aa-post-grid { display:grid; gap:14px; }
.aa-post-tile { padding:21px; border:1px solid var(--aa-line); border-radius:16px; background:var(--aa-card); min-width:0; }
.aa-post-tile h3,.aa-post-tile .wp-block-post-title { font-size:19px; line-height:1.7; margin:6px 0 8px; font-weight:850; }
.aa-post-tile h3 a,.aa-post-tile .wp-block-post-title a { color:var(--aa-text); }
.aa-post-tile .wp-block-post-excerpt,.aa-post-tile p { font-size:13px; color:var(--aa-muted); }
.aa-post-tile .wp-block-post-date,.aa-post-tile .wp-block-post-terms { color:var(--aa-muted); font-size:11px; }
.aa-cta { padding:43px 27px; text-align:center; border-radius:19px; background:var(--space-indigo); color:white; }
.aa-cta h2 { color:white; font-size:clamp(25px,7vw,36px); }
.aa-cta p { color:#d9dce6; max-width:660px; margin:0 auto 20px; }
.aa-footer { border-top:1px solid var(--aa-line); padding:35px 0 42px; color:var(--aa-muted); font-size:12px; }
.aa-footer-inner { display:flex; flex-direction:column; gap:10px; }
.aa-footer a { color:var(--aa-text); }
.aa-page { padding:42px 0 70px; }
.aa-reading { max-width:790px; margin-inline:auto; }
.aa-page h1 { font-size:clamp(28px,7.6vw,47px); line-height:1.55; margin:0 0 18px; }
.aa-page .wp-block-post-content { line-height:2.25; color:var(--aa-text); }
.aa-page .wp-block-post-content h2 { font-size:clamp(22px,6.5vw,30px); margin:2em 0 .6em; line-height:1.6; }
.aa-page .wp-block-post-content h3 { margin:1.5em 0 .5em; }
.aa-page .wp-block-post-content p { margin:0 0 1.3em; }
.aa-page .wp-block-post-content ul { padding-inline-start:25px; }
.aa-post-meta { color:var(--aa-muted); font-size:12px; margin-bottom:25px; }
.aa-page .wp-block-post-featured-image img { border-radius:16px; }
.aa-pagination { margin-top:32px; }
.aa-screenreader { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
@media (min-width:600px) {
  .aa-wrap { width:min(calc(100% - 48px),1180px); }
  .aa-hero-grid { grid-template-columns:1.15fr .85fr; gap:25px; }
  .aa-hero-figure { min-height:380px; }
  .aa-hero h1 { font-size:clamp(37px,5.3vw,64px); }
  .aa-card-grid,.aa-post-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .aa-company-links { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .aa-vision { grid-template-columns:.9fr 1.1fr; gap:36px; }
}
@media (min-width:768px) {
  .aa-site-header .aa-nav, .aa-site-header .aa-nav.is-open,.aa-js .aa-nav,.aa-js .aa-nav.is-open { position:static; display:flex; flex-direction:row; border:0; background:transparent; padding:0; gap:4px; box-shadow:none; }
  .aa-nav a { padding:10px; font-size:12px; }
  .aa-menu-toggle { display:none; }
  .aa-header-actions { margin-right:0; }
  .aa-hero { padding:86px 0; }
  .aa-section { padding:82px 0; }
  .aa-hero-figure { min-height:470px; }
  .aa-card-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .aa-post-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .aa-company { padding:29px; }
  .aa-footer-inner { flex-direction:row; justify-content:space-between; }
}
@media (min-width:1050px) { .aa-nav a { font-size:13px; padding:10px 12px; } .aa-hero-grid { gap:72px; } .aa-hero-figure { min-height:510px; } }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *,*::before,*::after { transition:none!important; animation:none!important; } }

/* Brand identity v0.3: small-size legibility, separated bilingual lockup */
.aa-brand .aa-mark{background:var(--aa-soft);border:1px solid var(--aa-line);border-radius:11px;width:42px;height:42px;padding:4px}
.aa-brand .aa-mark svg{display:block;width:100%;height:100%}
.aa-brand-name{display:flex;flex-direction:column;gap:2px;line-height:1.2}
.aa-brand-name strong{font-size:16px;font-weight:900}
.aa-brand-name small{font-family:Arial,sans-serif;font-weight:700;font-size:9px;letter-spacing:.22em;color:var(--aa-muted);direction:ltr;text-align:right}
/* Actions rendered on actual single posts by the aa_post_actions shortcode. */
.aa-share-tools{margin-block:44px 24px;padding:22px;border:1px solid var(--aa-line);border-radius:20px;background:var(--aa-soft)}
.aa-share-heading{font-size:16px;margin:0 0 4px;font-weight:900;color:var(--aa-text)}
.aa-share-intro{margin:0 0 18px!important;font-size:12px;color:var(--aa-muted)}
.aa-share-actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center}
.aa-share-action{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--aa-line);border-radius:12px;padding:10px 13px;color:var(--aa-text);background:var(--aa-card);font:700 13px/1.6 var(--aa-font);text-decoration:none;cursor:pointer;transition:border-color .16s ease,transform .16s ease}
.aa-share-action:hover{color:var(--aa-text);text-decoration:none;border-color:var(--aa-accent);transform:translateY(-1px)}
.aa-share-action svg{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.aa-share-action--primary{background:var(--space-indigo);color:white;border-color:var(--space-indigo)}
.aa-share-action--primary:hover{background:#3a3e59;color:white}
.aa-share-action[hidden]{display:none!important}
.aa-share-notice{min-height:1.8em;font-size:12px;color:var(--aa-accent);margin:8px 0 0!important}
.aa-share-extra{display:flex;flex-wrap:wrap;gap:9px}
.aa-share-extra .aa-share-action{flex:1 1 128px}
@media (max-width:599px){.aa-share-tools{padding:18px 15px}.aa-share-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.aa-share-actions>.aa-share-action{width:100%}.aa-brand-name small{font-size:8px}}
@media print{
  @page{margin:18mm}
  :root,:root[data-theme="dark"]{--aa-bg:#fff;--aa-text:#161925;--aa-muted:#4e5866;color-scheme:light}
  body{color:#000!important;background:white!important;font-size:12pt;line-height:1.8}
  .aa-site-header,.aa-footer,.aa-share-tools,.aa-pagination,.aa-icon-button,.aa-post-navigation,.wp-block-post-navigation-link{display:none!important}
  .aa-page{padding:0!important}.aa-reading{max-width:none!important}
  a{color:#000!important;text-decoration:none!important}
  a[href]:after{content:none!important}
  img{max-height:180mm;page-break-inside:avoid}
  h1,h2,h3{break-after:avoid}
}

.aa-hero-emblem{display:block;width:clamp(140px,36vw,270px);filter:drop-shadow(0 24px 24px rgba(43,45,66,.12));transform:rotate(-4deg)}
.aa-hero-emblem svg{display:block;width:100%;height:auto}
:root[data-theme="dark"] .aa-hero-emblem svg path:nth-child(2){fill:#edf2f4}


/* v0.3.1 Mobile Single hotfix – explicit widths for Gutenberg's nested layout.
   Avoid site-wide overflow clipping: correct the content box itself. */
.aa-page.wp-block-group {
  display: block;
  inline-size: 100%;
  max-inline-size: 100vw;
  min-inline-size: 0;
}
.aa-page > .aa-reading.wp-block-group {
  box-sizing: border-box;
  inline-size: min(100%, 790px);
  max-inline-size: 100%;
  min-inline-size: 0;
  margin-inline: auto !important;
  padding-inline: clamp(16px, 4vw, 26px);
}
.aa-reading > :where(*),
.aa-reading .wp-block-post-content,
.aa-reading .wp-block-post-content > :where(*) {
  box-sizing: border-box;
  max-inline-size: 100%;
  min-inline-size: 0;
}
.aa-reading .wp-block-post-content {
  inline-size: 100%;
  margin-inline: 0 !important;
  overflow-wrap: anywhere;
  word-break: normal;
}
.aa-reading .wp-block-post-title,
.aa-reading .wp-block-post-content :is(h1,h2,h3,h4,p,li,blockquote,figcaption),
.aa-reading .wp-block-post-navigation-link {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  max-inline-size: 100%;
}
.aa-reading .wp-block-post-content :is(pre,table,.wp-block-table) {
  max-inline-size: 100%;
  overflow-x: auto;
}
.aa-reading .wp-block-post-content img,
.aa-reading .wp-block-post-content video,
.aa-reading .wp-block-post-content iframe {
  max-inline-size: 100%;
}
.aa-reading .wp-block-post-content iframe { aspect-ratio:16/9; }
.aa-reading .wp-block-post-content :is(ul,ol) { padding-inline-start: 0; padding-inline-end: 1.45em; }
.aa-reading .aa-share-tools { max-inline-size:100%; }
.aa-reading .aa-share-actions { min-inline-size:0; }
@media (max-width:599px) {
  .aa-page { padding-block: 28px 54px; }
  .aa-page > .aa-reading.wp-block-group { padding-inline: 17px; }
  .aa-reading > .wp-block-post-title,
  .aa-page .wp-block-post-title {
    font-size: clamp(23px, 6.5vw, 29px);
    line-height: 1.68;
    letter-spacing: -.02em;
    margin-block: 10px 13px;
    text-align: right;
  }
  .aa-page .wp-block-post-content { font-size: 15px; line-height: 2.12; }
  .aa-page .wp-block-post-content h2 {
    font-size: clamp(20px, 5.45vw, 25px);
    line-height: 1.7;
    margin-block: 1.6em .75em;
  }
  .aa-page .wp-block-post-content h3 { font-size:19px;line-height:1.75; }
  .aa-page .wp-block-post-content p { margin-block-end: 1.25em; }
  .aa-post-meta { margin-block-end: 22px; }
  .aa-share-tools { margin-block-start: 30px; }
}
