/*
Theme Name: eram-bio-theme v5.4.3
Theme URI: https://eramonline.netlify.app/
Author: Eram
Description: Personal portfolio theme for Ali Eram.
Version: 5.4.3
Text Domain: eram-bio-theme
*/
/* Local Vazirmatn variable font (replaces Google Fonts import, v5.3.2).
   Same family, same 100..900 weight range, same fallback behavior. */
@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn[wght].woff2') format('woff2 supports variations'),
       url('assets/fonts/Vazirmatn[wght].woff2') format('woff2-variations'),
       url('assets/fonts/Vazirmatn[wght].woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Version 5: moderated comments, Persian and English. */

/* Visually hidden text that screen readers still announce. */
.eram-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.eram-comments { margin-block:3rem; padding:0; border:0; border-radius:0; background:transparent; scroll-margin-top:6rem; }
.eram-comments .eram-comment-invitation { margin:0 0 1.5rem; color:#bdbdbd; font-size:1rem; font-weight:500; line-height:1.9; }
.eram-comments .eram-comment-success { margin:0 0 1rem; color:#c5a46e; font-size:.95rem; line-height:1.9; }
.eram-comments .comment-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; text-align:start; }
.eram-comments .comment-form > * { min-width:0; width:100%; margin:0; }
.eram-comments .comment-form-author { grid-column:1; grid-row:2; }
.eram-comments .comment-form-email { grid-column:2; grid-row:2; }
.eram-comments .comment-form-comment { grid-column:1 / -1; grid-row:1; }
.eram-comments .form-submit { grid-column:1 / -1; grid-row:4; text-align:center; }
.eram-comments label { display:block; margin-bottom:.65rem; color:#eee; font-weight:600; }
.eram-comments input[type="text"],.eram-comments input[type="email"],.eram-comments textarea { box-sizing:border-box; width:100%; border:1px solid #444; border-radius:4px; background:#0a0a0a; color:#f5f5f5; padding:.7rem .85rem; font:inherit; box-shadow:inset 0 1px 3px rgba(0,0,0,.25); }
.eram-comments input::placeholder,.eram-comments textarea::placeholder { color:#999; opacity:1; }
.eram-comments textarea { display:block; resize:vertical; min-height:160px; }
.eram-comments .submit { border:0; border-radius:4px; padding:.75rem 1.5rem; font:inherit; font-weight:600; cursor:pointer; box-shadow:0 2px 5px rgba(0,0,0,.3); }
.eram-comment-list { list-style:none; padding:0; margin:0 0 2rem; }
.eram-comment { padding-block:1.25rem; border-bottom:1px solid #333; }
.eram-comment-meta { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.5rem 1rem; }
.eram-comment-meta b { color:#c5a46e; overflow-wrap:anywhere; }
.eram-comment-meta time { font-size:.8rem; color:#aaa; }
.eram-comment-content { margin-top:.75rem; line-height:1.9; overflow-wrap:anywhere; }
.eram-comment-content p + p { margin-top:.75rem; }
.eram-comment-content a { text-decoration:underline dotted; color:#c5a46e; }
/* Reply button under each comment. class comes from core so comment-reply.js works. */
.eram-comment-actions { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.9rem; }
.eram-comments .comment-reply-link { display:inline-flex; align-items:center; padding:.3rem .95rem; border:1px solid rgba(197,164,110,.45); border-radius:9999px; background:transparent; color:#c5a46e; font-size:.8rem; line-height:1.8; text-decoration:none; transition:background-color .2s ease,border-color .2s ease,color .2s ease; }
.eram-comments .comment-reply-link:hover { border-color:#c5a46e; background:rgba(197,164,110,.14); color:#d4b57d; }
.eram-comments .comment-cancel-reply-link { display:inline-flex; align-items:center; margin-bottom:1rem; padding:.35rem 1.1rem; border:1px solid rgba(255,255,255,.14); border-radius:9999px; background:transparent; color:#c5c5c5; font-size:.8rem; line-height:1.8; text-decoration:none; transition:border-color .2s ease,color .2s ease; }
.eram-comments .comment-cancel-reply-link:hover { border-color:rgba(197,164,110,.6); color:#c5a46e; }
/* Quote of the comment being answered. Hidden until a reply is started. */
.eram-comment-quote { margin:0 0 1.35rem; padding:.85rem 1.1rem; border:1px solid rgba(197,164,110,.25); border-right:2px solid #C5A46E; border-radius:.75rem; background:#0f0f0f; color:#c9c9c9; font-size:.9rem; line-height:1.9; }
.eram-comments .eram-comment-quote[hidden] { display:none; }
.eram-comments .eram-comment-quote p { margin:0; overflow-wrap:anywhere; }
.eram-english .eram-comment-quote { border-right:0; border-left:2px solid #C5A46E; }
/* "Remember me" consent box below the comment fields. */
.eram-comments .comment-form-cookies-consent { display:flex; grid-column:1 / -1; grid-row:3; align-items:flex-start; gap:.6rem; color:#8f8f8f; font-size:.8rem; line-height:1.8; text-align:start; }
.eram-comments .comment-form-cookies-consent input[type="checkbox"] { flex:none; width:1rem; height:1rem; margin:.35rem 0 0; accent-color:#c5a46e; }
.eram-comments .comment-form-cookies-consent label { margin:0; color:inherit; font-size:inherit; font-weight:400; }
.eram-comment-pagination { display:flex; flex-wrap:wrap; gap:.75rem; margin-block:1rem; }
.eram-comment-pagination .page-numbers { padding:.5rem .85rem; border:1px solid #555; border-radius:8px; }
.eram-comment-pagination .current { color:#c5a46e; border-color:#c5a46e; }
@media(max-width:600px) {
  .eram-comments .submit { max-width:100%; }
}

/* Only body owns vertical scrolling. The document root never creates a second scrollbar. */
html { width:100%; height:100%; max-width:100%; min-width:0; direction:ltr; scroll-behavior:smooth; overflow:hidden; }
body { --eram-navbar-height:5rem; --eram-admin-bar-height:0px; box-sizing:border-box; width:100%; height:100%; max-width:100%; min-width:0; margin:0; padding-top:calc(var(--eram-navbar-height) + 1px); direction:ltr; overflow-x:hidden; overflow-y:scroll; scrollbar-gutter:stable; scroll-behavior:auto; font-family:'Vazirmatn',system-ui,sans-serif; background:#0A0A0A; color:#F5F5F5; }
body.admin-bar { --eram-admin-bar-height:32px; height:calc(100% - var(--eram-admin-bar-height)); }
@media (max-width:782px) { body.admin-bar { --eram-admin-bar-height:46px; } }
body:not(.eram-english) > :not(#wpadminbar) { direction:rtl; }
main, #main-content, #top { width:100%; max-width:100%; min-width:0; overflow-x:hidden; }
/* The fixed-height header is 5rem; keep the first screen within the remaining viewport height. */
#top { min-height:calc(100dvh - var(--eram-navbar-height) - var(--eram-admin-bar-height) - 1px); }
#top > div { width:100%; min-width:0; margin-inline:auto; }
img,svg,iframe { max-width:100%; }
.mobile-menu-link { border-bottom:1px solid rgba(255,255,255,.08); }
.eram-desktop-nav { display:none; }.eram-mobile-toggle { display:flex; align-items:center; justify-content:center; }.eram-mobile-panel { display:block; }.eram-mobile-panel.hidden { display:none; }
/* One fixed header and one shared spacing rule for both languages. */
.eram-navbar { position:fixed; top:var(--eram-admin-bar-height); inset-inline:0; z-index:50; margin:0; padding:0; background:#0A0A0A; }
.eram-site-nav { box-sizing:border-box; width:100%; max-width:72rem; height:var(--eram-navbar-height); margin:0 auto; padding:0 1.5rem; }
.mobile-menu-link:last-child { border-bottom:none; }
.btn-gold { background:#C5A46E; color:#0A0A0A; transition:all .2s ease; }
.btn-gold:hover { background:#d4b57d; }
.gallery-caption { display:none; }
#about,#resume,#gallery,#blog,#contact { scroll-margin-top:6.5rem; }
.skip-link { position:absolute; top:-100px; right:1rem; z-index:200; background:#C5A46E; color:#0A0A0A; padding:.75rem 1.5rem; border-radius:9999px; }
.skip-link:focus { top:1rem; }
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible { outline:3px solid #C5A46E; outline-offset:3px; }
nav a { transition:color .2s ease; } nav a:hover { color:#C5A46E; }
h2 { letter-spacing:-1.5px; }

/* Self-hosted Estedad font used for Persian text and the hero title. */
@font-face {
  font-family: 'Estedad';
  src: url('assets/fonts/Estedad-Bold.otf') format('opentype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Estedad Hero';
  src: url('assets/fonts/Estedad-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
#top .hero-title--fa {
  font-family:'Estedad Hero','Vazirmatn',sans-serif;
  font-weight:700;
}
.resume-item { transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease, background-color .3s ease; }
.resume-item:hover { transform: translateY(-4px) scale(1.015); border-color:#C5A46E; box-shadow:0 18px 35px rgba(0,0,0,.35),0 0 0 1px rgba(197,164,110,.2); background-color:#151515; }
.gallery-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:155px; gap:16px; }
.gallery-trigger { display:block; width:100%; background:transparent; border:0; padding:0; cursor:pointer; font:inherit; }
.gallery-trigger--featured { grid-column:span 2; grid-row:span 2; }
.gallery-trigger--tall { grid-row:span 2; }
.gallery-frame { position:relative; height:100%; border:1px solid #C5A46E; border-radius:18px; background:#111; overflow:hidden; transition:transform .45s ease,box-shadow .45s ease; }
.gallery-trigger:hover .gallery-frame { transform:translateY(-10px) scale(1.02); box-shadow:0 25px 50px -12px rgb(0 0 0 / .45); }
.image-wrapper { position:relative; height:100%; overflow:hidden; border-radius:17px; line-height:0; }
.gallery-frame img { display:block; width:100%; height:100%; object-fit:contain; background:#111; transition:transform .6s ease; }
.gallery-trigger:hover img,.gallery-trigger:focus-visible img { transform:scale(1.1); }
.gallery-overlay { position:absolute; inset:auto 0 0; z-index:1; padding:32px 18px 16px; color:#fff; opacity:0; transform:translateY(8px); background:linear-gradient(to top,rgb(0 0 0 / .8),transparent); transition:opacity .35s,transform .35s; }
.gallery-trigger:hover .gallery-overlay,.gallery-trigger:focus-visible .gallery-overlay { opacity:1; transform:none; }
.gallery-trigger.is-portrait { width:56%; justify-self:center; }
.gallery-trigger--featured.is-portrait { width:100%; }
.reveal,.reveal-img { opacity:0; transform:translateY(28px); transition:opacity .7s ease,transform .7s ease; }
.reveal-img { transform:scale(.94); } .reveal.is-visible,.reveal-img.is-visible { opacity:1; transform:none; }
.back-to-top { position:fixed; right:1.75rem; bottom:1.75rem; z-index:60; width:3rem; height:3rem; border:0; border-radius:9999px; background:#C5A46E; color:#0A0A0A; opacity:0; visibility:hidden; transform:translateY(12px); transition:.3s; }
.back-to-top.is-visible { opacity:1; visibility:visible; transform:none; }
.site-footer{position:relative;margin-top:1rem;background:linear-gradient(to bottom,transparent 0%,rgba(197,164,110,.05) 100%)}.footer-ridge{position:relative;height:88px;overflow:hidden}.footer-ridge.reveal{opacity:1;transform:none}.footer-ridge-inner{position:absolute;bottom:0;left:50%;width:max(100%,900px);height:100%;transform:translateX(-50%)}.footer-ridge-draw{position:absolute;inset:0;clip-path:inset(0 50%);transition:clip-path 1.6s cubic-bezier(.16,1,.3,1)}.footer-ridge.is-visible .footer-ridge-draw{clip-path:inset(0)}.footer-ridge-draw svg{display:block;width:100%;height:100%}.footer-ridge-peak{position:absolute;left:47.92%;top:21.67%;width:9px;height:9px;background:#C5A46E;transform:translate(-50%,-50%) rotate(45deg);box-shadow:0 0 12px 2px rgba(197,164,110,.55);opacity:0;transition:opacity .6s ease 1s}.footer-ridge.is-visible .footer-ridge-peak{opacity:1}.footer-inner{max-width:64rem;margin-inline:auto;padding:1.5rem 1.5rem 0;display:flex;flex-direction:column;align-items:center;gap:1.75rem;text-align:center}.footer-logo{height:2.5rem;width:auto}.footer-quote{max-width:32rem}.footer-quote-latin{color:#C5A46E;font-style:italic;font-size:.9375rem;letter-spacing:.02em}.footer-quote-translation{margin-top:.4rem;color:#A1A1A1;font-size:.875rem;line-height:1.9}.footer-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:.25rem 1.75rem;font-size:.875rem}.footer-nav a{position:relative;padding:.5rem 0;color:#C5C5C5}.footer-nav a::after{content:'';position:absolute;inset-inline:0;bottom:.25rem;height:1px;background:#C5A46E;transform:scaleX(0);transition:transform .3s ease}.footer-nav a:hover::after,.footer-nav a:focus-visible::after{transform:scaleX(1)}.footer-top-btn{display:inline-flex;align-items:center;gap:.625rem;padding:.625rem 1.25rem;border:1px solid rgba(197,164,110,.45);border-radius:9999px;background:transparent;color:#C5A46E;font-size:.875rem;cursor:pointer;transition:background-color .25s ease,color .25s ease,border-color .25s ease}.footer-top-btn svg{width:1rem;height:1rem;transition:transform .3s ease}.footer-top-btn:hover{background:#C5A46E;border-color:#C5A46E;color:#0A0A0A}.footer-top-btn:hover svg{transform:translateY(-3px)}.footer-bottom{max-width:64rem;margin:2.5rem auto 0;padding:1.5rem 1.5rem 2rem;border-top:1px solid rgba(255,255,255,.08);display:flex;flex-direction:column-reverse;align-items:center;gap:1.25rem;color:#A1A1A1;font-size:.875rem}.footer-social{display:flex;gap:.625rem;margin:0;padding:0;list-style:none}.footer-social a{display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;border:1px solid rgba(255,255,255,.15);border-radius:9999px;color:#C5C5C5;transition:background-color .25s ease,border-color .25s ease,color .25s ease,transform .25s ease}.footer-social a:hover{background:#C5A46E;border-color:#C5A46E;color:#0A0A0A;transform:translateY(-2px)}.footer-social svg{width:1.25rem;height:1.25rem}@media (min-width:640px){.footer-bottom{flex-direction:row;justify-content:space-between}}@media (min-width:768px){.footer-ridge{height:110px}}
.lightbox-nav { position:absolute; top:50%; z-index:20; width:3rem; height:3rem; margin-top:-1.5rem; border:1px solid rgba(197,164,110,.65); border-radius:9999px; background:rgba(0,0,0,.7); color:#C5A46E; font-size:2rem; line-height:1; cursor:pointer; }
.lightbox-nav:hover { background:rgba(197,164,110,.2); }
.lightbox-nav-prev { right:1rem; }
.lightbox-nav-next { left:1rem; }
@media (min-width:640px){ .gallery-grid{grid-auto-rows:180px;gap:20px;} }
@media (min-width:768px){ .gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:165px;gap:24px;} }
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}.reveal,.reveal-img{opacity:1;transform:none;}}

/* Preserve orientation while keeping the bento spacing consistent. */
.gallery-grid { grid-auto-rows: auto; align-items: start; grid-auto-flow: dense; }
.gallery-trigger { aspect-ratio: 4 / 3; width: 100%; height: auto; }
.gallery-trigger.is-portrait { width: 100%; aspect-ratio: 3 / 4; height: auto; justify-self: stretch; }
.gallery-trigger--featured { grid-column: span 2; grid-row: span 1; aspect-ratio: 4 / 3; }
.gallery-trigger--featured.is-portrait { width: 100%; aspect-ratio: 3 / 4; }
.gallery-trigger--tall { grid-row: span 1; }
.gallery-frame { height:100%; }
#gallery-lightbox { position:fixed!important; inset:0!important; width:100vw; height:100vh; align-items:center; justify-content:center; }
#gallery-lightbox:not(.hidden) { display:flex!important; flex-direction:column; }
#gallery-lightbox-img { max-width:calc(100vw - 8rem); max-height:calc(100vh - 8rem); width:auto; height:auto; object-fit:contain; }
#gallery-lightbox-caption { margin: .75rem 0 0; line-height:1.6; }
.feature-link { display:inline-flex; align-items:center; gap:1rem; padding:1rem 1.5rem 1rem 1.25rem; border:1px solid rgba(197,164,110,.4); border-radius:1rem; background:linear-gradient(to left,rgba(197,164,110,.12),transparent); transition:all .3s ease; }
.feature-link:hover { border-color:#C5A46E; background:rgba(197,164,110,.2); }
.feature-link-icon { display:flex; align-items:center; justify-content:center; width:2.75rem; height:2.75rem; border-radius:.75rem; background:#C5A46E; color:#0A0A0A; font-size:1.25rem; }
.feature-link-text { display:flex; flex-direction:column; align-items:flex-start; text-align:right; }
.feature-link-text small { margin-top:.15rem; color:#A1A1A1; font-size:.75rem; }
.feature-link-arrow { margin-right:auto; color:#A1A1A1; font-size:1.25rem; }
.eram-gallery-note { padding:1.25rem; border:1px dashed rgba(197,164,110,.55); border-radius:1rem; color:#C5C5C5; text-align:center; }
.eram-gallery-post-grid { display:grid !important; grid-template-columns:1fr !important; gap:0 2rem; align-items:start; }
.eram-gallery-post-column { min-width:0; }
.eram-gallery-post-card { display:block; width:100%; min-width:0; margin:0 0 2.75rem; overflow:visible; background:transparent; }
.eram-gallery-art-frame { position:relative; padding:10px; border:1px solid rgba(197,164,110,.72); background:linear-gradient(135deg,#25221c 0%,#111 45%,#1c1914 100%); box-shadow:0 14px 30px rgba(0,0,0,.42),inset 0 0 0 4px #0a0a0a,inset 0 0 0 5px rgba(197,164,110,.28); transition:transform .35s ease,box-shadow .35s ease,border-color .35s ease; }
.eram-gallery-art-frame::before,.eram-gallery-art-frame::after { content:''; position:absolute; z-index:2; width:18px; height:18px; pointer-events:none; }
.eram-gallery-art-frame::before { top:-1px; right:-1px; border-top:3px solid #C5A46E; border-right:3px solid #C5A46E; }
.eram-gallery-art-frame::after { bottom:-1px; left:-1px; border-bottom:3px solid #C5A46E; border-left:3px solid #C5A46E; }
.eram-gallery-post-card:hover .eram-gallery-art-frame { transform:translateY(-6px); border-color:#e0c58e; box-shadow:0 24px 42px rgba(0,0,0,.52),0 0 18px rgba(197,164,110,.14),inset 0 0 0 4px #0a0a0a,inset 0 0 0 5px rgba(197,164,110,.5); }
.eram-gallery-post-image { display:block; overflow:hidden; border:1px solid rgba(197,164,110,.38); background:#111; line-height:0; }
.eram-gallery-post-image img { display:block; width:100%; height:auto; max-height:none; object-fit:contain; transition:transform .5s ease; }
.eram-gallery-post-card:hover .eram-gallery-post-image img { transform:scale(1.025); }
.eram-gallery-post-body { padding:.85rem .25rem .25rem; }
.eram-gallery-post-body h3 { margin:0; font-size:.78rem; font-weight:600; line-height:1.45; letter-spacing:.02em; text-transform:uppercase; }
.eram-gallery-post-body h3 a { color:#C5A46E; text-decoration:none; }
.eram-gallery-post-body h3 a:hover { color:#F5F5F5; }
.eram-gallery-post-body p { margin:.1rem 0 0; color:#A8A8A8; font-size:.68rem; line-height:1.45; }
/* Mobile and tablet show one column; the desktop gallery is always three columns. */
@media (min-width:1024px) { .eram-gallery-post-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; } }
@media (min-width:701px) { .eram-gallery-post-card { margin-bottom:3.25rem; } }
.eram-gallery-single {
    max-width: 58rem;
    margin: 0 auto;
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.eram-gallery-single-image {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border: 1px solid #C5A46E !important;
    border-radius: 1.25rem !important;
    overflow: hidden !important;
    line-height: 0 !important;
    background: transparent !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.eram-gallery-single-image img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 80vh !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    border-radius: inherit !important;
}


.eram-gallery-single-content { max-width:44rem; margin:2rem auto 0; text-align:right; }
.eram-english .eram-gallery-single-content { direction:ltr; text-align:left; }
.eram-gallery-single-pagination { display:grid; grid-template-columns:1fr; gap:1rem; align-items:center; margin-top:4rem; padding-top:2rem; border-top:1px solid rgba(255,255,255,.12); text-align:center; }
.eram-gallery-single-pagination-item { min-height:2.75rem; }
.eram-gallery-single-pagination-item span { display:block; margin-bottom:.25rem; color:#A1A1A1; font-size:.75rem; }
.eram-gallery-single-pagination-item a,.eram-gallery-single-back { color:#C5A46E; text-decoration:none; }
.eram-gallery-single-pagination-item a:hover,.eram-gallery-single-back:hover { color:#F5F5F5; }
.eram-gallery-single-pagination-prev { text-align:right; }
.eram-gallery-single-pagination-next { text-align:left; }
.eram-gallery-single-back { justify-self:center; padding:.65rem 1rem; border:1px solid rgba(197,164,110,.45); border-radius:9999px; font-size:.875rem; }
.eram-gallery-single-pagination-item a { display:inline-flex; flex-direction:column; align-items:center; gap:.45rem; max-width:12rem; }
.eram-gallery-pagination-thumb { display:block; width:5rem; height:5rem; object-fit:cover; border:1px solid rgba(197,164,110,.6); }
.eram-gallery-pagination-title { display:block; }
@media (min-width:768px) { .eram-gallery-single-pagination { grid-template-columns:1fr auto 1fr; } }
#resume-pdf-trigger { display:inline-flex; align-items:center; gap:1rem; padding:1rem 1.5rem 1rem 1.25rem; border:1px solid rgba(197,164,110,.4); border-radius:1rem; background:linear-gradient(to left,rgba(197,164,110,.12),transparent); color:#fff; }
#resume-pdf-trigger:hover { border-color:#C5A46E; background:rgba(197,164,110,.2); }

/* WordPress posts on the home page, category archives, and single posts. */
#main-content.eram-blog-archive { max-width:64rem; }
.eram-blog-grid { display:grid; gap:1.5rem; }
.eram-blog-card { position:relative; display:flex; flex-direction:column; overflow:hidden; border:1px solid rgba(197,164,110,.4); border-radius:1rem; background:#111; transition:transform .3s ease,box-shadow .3s ease; }
.eram-blog-card:hover { transform:translateY(-3px); box-shadow:0 20px 40px -20px rgba(0,0,0,.5); }
.eram-blog-card-image { display:block; overflow:hidden; aspect-ratio:16 / 10; }
.eram-blog-card-image img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.eram-blog-card:hover .eram-blog-card-image img { transform:scale(1.04); }
/* One link per card: the title anchor stretches over the whole card, so clicking
   the image, the title, the excerpt or the empty space opens the post. */
.eram-blog-card-link::after { content:''; position:absolute; inset:0; z-index:1; }
.eram-blog-card-link:focus-visible { outline:3px solid #C5A46E; outline-offset:3px; }
@supports selector(:has(*)) {
  .eram-blog-card-link:focus-visible { outline:none; }
  .eram-blog-card:has(.eram-blog-card-link:focus-visible),
  .eram-blog-card:has(.eram-blog-category:focus-visible),
  .eram-blog-card:has(.eram-blog-readmore:focus-visible) { outline:3px solid #C5A46E; outline-offset:3px; }
}
.eram-blog-card-body { display:flex; flex:1; flex-direction:column; gap:.75rem; padding:1.5rem; }
.eram-blog-meta { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem; color:#A1A1A1; font-size:.8125rem; }
/* Stays above the stretched card link so the category filter keeps working. */
.eram-blog-category { position:relative; z-index:2; padding:.2rem .75rem; border:1px solid rgba(197,164,110,.4); border-radius:9999px; color:#C5A46E; text-decoration:none; }
.eram-blog-category:hover { background:#C5A46E; color:#0A0A0A; }
.eram-blog-card h2,.eram-blog-card h3 { margin:0; font-size:1.25rem; font-weight:600; line-height:1.5; }
.eram-blog-card h2 a,.eram-blog-card h3 a { color:#F5F5F5; text-decoration:none; }
.eram-blog-card h2 a:hover,.eram-blog-card h3 a:hover { color:#C5A46E; }
.eram-blog-card p { margin:0; color:#B0B0B0; font-size:.9375rem; line-height:1.8; }
.eram-blog-readmore { position:relative; z-index:2; display:block; align-self:flex-start; margin-top:auto; padding-top:.35rem; color:#C5A46E; font-size:.9375rem; font-weight:500; text-decoration:underline dotted; text-decoration-thickness:1px; text-underline-offset:.3em; transition:color .2s ease; }
.eram-blog-readmore:hover { color:#E0C58E; }
.eram-blog-readmore-arrow { display:inline-block; margin-inline-start:.4rem; transition:transform .2s ease; }
.eram-blog-readmore:hover .eram-blog-readmore-arrow,.eram-blog-readmore:focus-visible .eram-blog-readmore-arrow { transform:translateX(-.25rem); }
/* Links inside post text are gold with a dotted underline, so a link is never
   mistaken for the ordinary text around it. */
.eram-single-content :is(p,li,dd,blockquote,figcaption,td,th,h1,h2,h3,h4,h5,h6) a,
.eram-blog-card p a { color:#C5A46E; text-decoration:underline dotted; text-decoration-thickness:1px; text-underline-offset:.28em; transition:color .2s ease; }
.eram-single-content :is(p,li,dd,blockquote,figcaption,td,th,h1,h2,h3,h4,h5,h6) a:hover,
.eram-blog-card p a:hover { color:#E0C58E; }
.eram-blog-categories { display:flex; flex-wrap:wrap; gap:.625rem; margin-top:1.25rem; }
.eram-blog-categories a { display:inline-flex; align-items:center; padding:.5rem 1.125rem; border:1px solid rgba(255,255,255,.15); border-radius:9999px; color:#C5C5C5; font-size:.8125rem; text-decoration:none; transition:border-color .2s ease,color .2s ease,background-color .2s ease; }
.eram-blog-categories a:hover { border-color:rgba(197,164,110,.6); color:#F5F5F5; }
.eram-blog-categories a.is-active { border-color:#C5A46E; background:#C5A46E; color:#0A0A0A; font-weight:500; }
.eram-blog-pagination { display:flex; flex-wrap:wrap; justify-content:center; gap:.5rem; margin-top:2.5rem; }
.eram-blog-pagination .page-numbers { display:inline-flex; align-items:center; justify-content:center; min-width:2.5rem; height:2.5rem; padding:0 .75rem; border:1px solid rgba(255,255,255,.15); border-radius:9999px; color:#C5C5C5; text-decoration:none; }
.eram-blog-pagination .page-numbers:hover { border-color:rgba(197,164,110,.6); color:#F5F5F5; }
.eram-blog-pagination .page-numbers.current { border-color:#C5A46E; background:#C5A46E; color:#0A0A0A; }
.eram-blog-empty { padding:3rem 1rem; color:#A1A1A1; text-align:center; }
.eram-blog-archive-header { margin-bottom:2.5rem; }
.eram-post-list { display:flex; flex-direction:column; gap:1.5rem; }
.eram-post-list .eram-blog-card { flex-direction:column; }
.eram-single { max-width:48rem; margin:0 auto; }
.eram-single-title { margin:.75rem 0 2rem; font-size:clamp(1.75rem,4vw,2.5rem); line-height:1.4; }
.eram-single-image { overflow:hidden; margin-bottom:2.5rem; border:1px solid rgba(197,164,110,.4); border-radius:1.25rem; }
.eram-single-image img { display:block; width:100%; height:auto; }
.eram-single-content { color:#C5C5C5; font-size:1.0625rem; line-height:2; }
.eram-single-content p { margin:0 0 1.5rem; }
.eram-instagram-origin { margin:1.5rem 0 0; padding:1rem 1.1rem; border-right:2px solid #C5A46E; background:rgba(197,164,110,.08); color:#aaa; font-size:.9rem; line-height:1.9; }
/* Images placed inside a post body reuse the featured image's gold frame, and a
   caption sits under its own image inside that frame. */
.eram-single-content :is(figure, .wp-caption),
.eram-single-content p > img,
.eram-single-content p > a > img { max-width:100%; padding:.4rem; border:1px solid rgba(197,164,110,.4); border-radius:1.25rem; }
.eram-single-content :is(figure, .wp-caption) > img,
.eram-single-content :is(figure, .wp-caption) > a > img { display:block; max-width:100%; height:auto; margin-inline:auto; border-radius:.8rem; }
/* The frame hugs its own image, so a centred caption is centred on that image. */
.eram-single-content > :is(figure, .wp-caption) { width:fit-content; margin:1.5rem 0; }
/* Every caption inside post text is centred on its image, gallery tiles included. */
.eram-single-content :is(figure, .wp-caption) :is(figcaption, .wp-caption-text) { display:block; margin:.5rem 0 0; color:#A8A8A8; font-size:.875rem; line-height:1.8; text-align:center; }
/* Gallery blocks keep their own grid, spacing and frames. These rules come last
   and score higher, so they win over the frame above. */
.eram-single-content :is(.wp-block-gallery, .blocks-gallery-grid, .blocks-gallery-group),
.eram-single-content :is(.wp-block-gallery, .blocks-gallery-grid, .blocks-gallery-group) :is(figure, .wp-caption) { width:auto; padding:0; border:0; border-radius:0; }
.eram-single-content :is(.wp-block-gallery, .blocks-gallery-grid, .blocks-gallery-group) :is(figure, .wp-caption) { margin:0; }
.eram-single-content :is(.wp-block-gallery, .blocks-gallery-grid, .blocks-gallery-group) :is(figure, .wp-caption) > img { border-radius:.6rem; }
/* Opt out of the frame for one image only: in the block editor select the image,
   then Advanced -> "Additional CSS class(es)" and enter: unborder
   On the front end WordPress 6.x moves that className off the figure and onto a
   wrapper <div class="wp-block-image">, while the editor keeps it on the figure.
   So the class is cleared on the element that carries it AND on any framed
   element inside it, which covers both shapes plus a plain <img class="unborder">. */
.eram-single-content .unborder,
.eram-single-content .unborder :is(figure, .wp-caption),
.eram-single-content .unborder p > img,
.eram-single-content .unborder p > a > img { padding:0; border:0; border-radius:0; }
@media (min-width:640px) { .eram-blog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (min-width:1024px) { .eram-blog-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (min-width:768px) { .eram-post-list .eram-blog-card { flex-direction:row; } .eram-post-list .eram-blog-card-image { width:40%; flex:none; aspect-ratio:auto; } }

.eram-english { direction:ltr; text-align:left; }
.eram-english .feature-link-text { align-items:flex-start; text-align:left; }
.eram-english .feature-link-arrow { margin-right:0; margin-left:auto; }
.eram-english .english-quote { border-left:2px solid rgba(197,164,110,.5); padding-left:1.25rem; }

/* The three-column desktop header lets its logo column collapse on narrow screens. */
@media (max-width:1199px) {
  .eram-site-nav {
    display:flex;
    justify-content:space-between;
    gap:.5rem;
    padding-inline:1rem;
  }
  .eram-site-nav .eram-header-logo {
    display:flex;
    flex:1 1 auto;
    min-width:0;
    align-items:center;
  }
  .eram-site-nav .eram-header-logo-image {
    display:block;
    width:auto;
    height:2rem;
    max-width:100%;
    object-fit:contain;
  }
  .eram-site-nav .eram-nav-actions {
    flex:0 0 auto;
    column-gap:.5rem;
  }
  .eram-site-nav .eram-nav-actions > a {
    padding-inline:.75rem;
  }
  .eram-site-nav #mobile-menu-toggle {
    flex:0 0 2.75rem;
  }
  .eram-hero-logo {
    width:min(72vw,16rem);
    max-height:9rem;
    object-fit:contain;
  }
}
@media (min-width:1200px) { .eram-desktop-nav { display:flex; }.eram-mobile-toggle,.eram-mobile-panel { display:none!important; } }

/* Keep the hero centered and prevent long text or animated children from widening mobile pages. */
@media (max-width:1199px) {
  #top > div { max-width:calc(100vw - 3rem); }
  #top h1,
  #top p,
  #top a { max-width:100%; overflow-wrap:anywhere; }

  /* Keep hero-title words intact and disable automatic mobile hyphenation. */
  h1,
  .hero-title {
    hyphens: manual;
    word-break: normal;
    text-rendering: optimizeLegibility;
  }
  #top .hero-title {
    font-size:2.25rem;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
  }
}

@media (min-width:768px) and (max-width:1199px) {
  #top .hero-title { font-size:3rem; }
}

/* Photo page and the shared comment area follow the reference mockup. */
.eram-gallery-page { max-width:100%; padding:2.5rem 1.25rem 4rem; }
.eram-gallery-page .eram-gallery-single { max-width:820px; margin-inline:auto; text-align:initial; }
.eram-gallery-page .screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.eram-gallery-page .eram-gallery-single-image { display:block; margin:0; padding:.5rem; border:1px solid rgba(197,164,110,.55); border-radius:1.25rem; background:#111; box-shadow:0 30px 60px -25px rgb(0 0 0 / .6); line-height:0; }
.eram-gallery-page .eram-gallery-single-image img { width:100%; height:auto; max-height:72vh; object-fit:contain; border-radius:.9rem; }
.eram-gallery-page .eram-gallery-single-content { max-width:60ch; margin:1.1rem auto 0; color:#9a9a9a; font-size:.9rem; line-height:1.9; text-align:center; }
.eram-gallery-page .eram-gallery-single-content p:last-child { margin-bottom:0; }
.eram-gallery-page .eram-gallery-single-content p { color:#ffffff; }
.eram-english .eram-gallery-page .eram-gallery-single-content { direction:ltr; text-align:center; }
.eram-gallery-page .eram-gallery-single-pagination { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:.65rem; margin:1.5rem 0 0; padding:0; border:0; color:#9a9a9a; font-size:.8rem; text-align:initial; }
.eram-gallery-page .eram-gallery-single-pagination-item { min-height:0; }
.eram-gallery-page .eram-gallery-single-pagination-item a { display:inline-flex; flex-direction:row; align-items:center; gap:.6rem; max-width:100%; color:#9a9a9a; }
.eram-gallery-page .eram-gallery-single-pagination-item a:hover { color:#c5a46e; }
.eram-gallery-page .eram-gallery-single-pagination-item span { display:inline; margin:0; color:inherit; font-size:inherit; }
.eram-gallery-page .eram-gallery-single-pagination-prev { text-align:start; }
.eram-gallery-page .eram-gallery-single-pagination-next { text-align:end; }
.eram-gallery-page .eram-gallery-pagination-thumb { width:92px; height:92px; object-fit:cover; border:1px solid rgba(255,255,255,.1); border-radius:.6rem; }
.eram-gallery-page .eram-gallery-single-back { justify-self:center; padding:.5rem 1.1rem; border:1px solid rgba(197,164,110,.4); border-radius:9999px; color:#c5a46e; white-space:nowrap; }
.eram-gallery-page .eram-gallery-single-back:hover { background:rgba(197,164,110,.12); color:#c5a46e; }
/* Single-post pager: same look and markup order as the gallery pager, with the
   featured image as the thumbnail. Scoped by its own class names only. */
.eram-post-single-pagination { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:.65rem; margin:2.75rem 0 0; color:#9a9a9a; font-size:.8rem; }
.eram-post-single-pagination-item a { display:inline-flex; flex-direction:row; align-items:center; gap:.7rem; max-width:100%; color:#9a9a9a; text-decoration:none; }
/* Label sits above the post title. The title is capped at two lines so one long
   title cannot make the row taller than its neighbour. max-height is used rather
   than -webkit-line-clamp because a flex item loses the -webkit-box display. */
.eram-post-single-text { display:flex; flex-direction:column; gap:.2rem; min-width:0; }
.eram-post-single-label { color:#8f8f8f; font-size:.75rem; line-height:1.6; }
.eram-post-single-title { max-height:3.4em; overflow:hidden; color:#dcdcdc; font-size:.85rem; line-height:1.7; overflow-wrap:anywhere; }
.eram-post-single-pagination-item a:hover .eram-post-single-label,
.eram-post-single-pagination-item a:hover .eram-post-single-title { color:#c5a46e; }
/* The cells are flex containers rather than plain blocks with text-align: an
   inline-flex anchor inside a text-align block leaves line-box descent space,
   which knocked the two thumbnails 4px out of line with each other. In RTL,
   flex-start is the right edge and flex-end the left edge. */
.eram-post-single-pagination-item { display:flex; align-items:center; }
.eram-post-single-pagination-next { justify-content:flex-start; }
.eram-post-single-pagination-prev { justify-content:flex-end; }
.eram-post-single-thumb { flex:none; width:92px; height:92px; object-fit:cover; border:1px solid rgba(255,255,255,.1); border-radius:.6rem; }
.eram-post-single-back { justify-self:center; padding:.5rem 1.1rem; border:1px solid rgba(197,164,110,.4); border-radius:9999px; color:#c5a46e; white-space:nowrap; }
.eram-post-single-back:hover { background:rgba(197,164,110,.12); color:#c5a46e; }
.eram-comments-divider { margin:3rem auto 0; border-top:1px solid rgba(255,255,255,.1); }
.eram-single > .eram-comments-divider { margin-top:3rem; }
.eram-comments { max-width:820px; margin:0 auto; padding:2.5rem 0 0; background:transparent; border:0; border-radius:0; }
.eram-comments-head { display:flex; align-items:baseline; gap:.6rem; margin-bottom:1.5rem; }
.eram-comments-head h2 { margin:0; font-size:1.3rem; font-weight:600; letter-spacing:0; }
.eram-comments-count { padding:.15rem .65rem; border:1px solid rgba(197,164,110,.4); border-radius:9999px; color:#c5a46e; font-size:.85rem; }
.eram-comments .eram-comment-list { display:flex; flex-direction:column; gap:.9rem; margin:0 0 2.5rem; padding:0; list-style:none; }
.eram-comments .eram-comment { margin:0; padding:0; border:0; }
.eram-comment-card { display:flex; gap:.85rem; padding:1.1rem 1.2rem; border:1px solid rgba(255,255,255,.1); border-radius:1rem; background:#111; transition:border-color .2s; }
.eram-comment-card:hover { border-color:rgba(197,164,110,.35); }
.eram-comment-avatar { flex:none; display:flex; align-items:center; justify-content:center; width:2.6rem; height:2.6rem; border-radius:50%; background:linear-gradient(160deg,#c5a46e,#8f7748); color:#0a0a0a; font-weight:700; font-size:.95rem; }
.eram-comment-avatar-image { flex:none; display:block; width:2.6rem; height:2.6rem; border-radius:50%; object-fit:cover; }
.eram-comment-body { flex:1; min-width:0; }
.eram-comments .eram-comment-meta { justify-content:flex-start; gap:.6rem; margin-bottom:.35rem; }
.eram-comments .eram-comment-meta b { color:#fff; font-size:.92rem; font-weight:600; }
.eram-comments .eram-comment-meta time { color:#9a9a9a; font-size:.75rem; }
.eram-comments .eram-comment-content { margin:0; color:#c9c9c9; font-size:.9rem; line-height:1.85; }
.eram-comments .eram-comment-card { flex-wrap:wrap; }
.eram-comments .eram-comment-card > .children { flex-basis:100%; display:flex; flex-direction:column; gap:.9rem; margin:.95rem 0 0; padding:1rem 1.15rem 0 0; border-top:1px solid rgba(255,255,255,.1); border-right:2px solid rgba(197,164,110,.4); list-style:none; }
.eram-english .eram-comments .eram-comment-card > .children { padding:1rem 0 0 1.15rem; border-right:0; border-left:2px solid rgba(197,164,110,.4); }
.eram-comments .children > .eram-comment { margin:0; padding:0; }
.eram-comments .children .eram-comment-card { padding:.15rem 0 0; border:0; border-radius:0; background:transparent; }
.eram-comments .children .eram-comment-admin .eram-comment-meta b { color:#c5a46e; }
.eram-comment-form-shell { padding:1.75rem; border:1px solid rgba(197,164,110,.25); border-radius:1.25rem; background:#151515; }
.eram-comments .eram-comment-invitation { margin:0 0 .35rem; color:#f5f5f5; font-size:1.05rem; font-weight:600; line-height:1.6; }
.eram-comment-subtitle { margin:0 0 1.35rem; color:#9a9a9a; font-size:.85rem; }
.eram-comments .comment-form { gap:1rem; }
.eram-comments label { margin-bottom:.5rem; color:#c5c5c5; font-size:.8rem; font-weight:400; }
.eram-comments input[type="text"], .eram-comments input[type="email"], .eram-comments textarea { padding:.8rem 1rem; border:1px solid rgba(255,255,255,.12); border-radius:.75rem; background:#0d0d0d; color:#fff; font-size:.88rem; box-shadow:none; }
.eram-comments input:focus, .eram-comments textarea:focus { border-color:#c5a46e; box-shadow:0 0 0 3px rgba(197,164,110,.15); }
.eram-comments textarea { min-height:110px; }
.eram-comments .form-submit { margin:0; }
.eram-comments .submit { width:100%; padding:.85rem; border:0; border-radius:9999px; background:#c5a46e; color:#0a0a0a; font-size:.9rem; font-weight:600; box-shadow:none; }
.eram-comments .submit:hover { background:#d4b57d; }
.eram-comments .eram-comment-pagination { margin:0 0 2rem; }
@media(max-width:600px) {
  .eram-gallery-page { padding-inline:1rem; }
  .eram-gallery-page .eram-gallery-single-pagination { font-size:.72rem; }
  .eram-gallery-page .eram-gallery-single-pagination { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:1rem; }
  .eram-gallery-page .eram-gallery-single-back { grid-column:1 / -1; grid-row:1; }
  .eram-gallery-page .eram-gallery-single-pagination-prev { grid-column:1; grid-row:2; }
  .eram-gallery-page .eram-gallery-single-pagination-next { grid-column:2; grid-row:2; }
  .eram-gallery-page .eram-gallery-pagination-thumb { width:76px; height:76px; }
  .eram-gallery-page .eram-gallery-single-back { padding:.4rem .7rem; }
  .eram-post-single-pagination { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:1rem; }
  .eram-post-single-back { grid-column:1 / -1; grid-row:1; padding:.4rem .7rem; }
  .eram-post-single-pagination-next { grid-column:1; grid-row:2; }
  .eram-post-single-pagination-prev { grid-column:2; grid-row:2; }
  .eram-post-single-thumb { width:76px; height:76px; }
  .eram-comment-form-shell { padding:1.25rem; }
  .eram-comments .comment-form { grid-template-columns:minmax(0,1fr); }
  .eram-comments .comment-form-author { grid-column:1; grid-row:2; }
  .eram-comments .comment-form-email { grid-column:1; grid-row:3; }
  .eram-comments .comment-form-cookies-consent { grid-column:1; grid-row:4; }
  .eram-comments .form-submit { grid-column:1; grid-row:5; }
}
/* --- برچسب‌های نوشته (تگ‌ها) --- */
.eram-post-tags {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-top: 1.25rem;
    border-top: 1px dashed rgba(197, 164, 110, 0.25);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}
.eram-post-tags-title {
    color: #A8A8A8;
    font-size: 0.85rem;
    font-weight: 500;
}
.eram-post-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.eram-post-tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(197, 164, 110, 0.35);
    color: #e5e5e5;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.25s ease;
}
.eram-post-tag-item:hover {
    background: rgba(197, 164, 110, 0.15);
    border-color: #C5A46E;
    color: #C5A46E;
    transform: translateY(-1px);
}
.eram-tag-hash {
    color: #C5A46E;
    margin-left: 0.25rem;
    font-weight: bold;
}


/* v5.1.0: gallery title and CSS Columns masonry utilities. */
.eram-gallery-single-title-wrap { max-width:72rem; margin:0 auto 1.75rem; padding:0 1.5rem; text-align:center; }
.eram-gallery-single-title { display:inline-block; margin:0; padding:0 0 .65rem; color:#F5F5F5; font-size:clamp(1.5rem,3vw,2.25rem); font-weight:600; line-height:1.5; letter-spacing:0; border-bottom:1px solid rgba(197,164,110,.65); text-wrap:balance; }
.eram-gallery-masonry { columns:1; column-gap:1.5rem; }
.eram-gallery-masonry > .eram-gallery-post-card { display:inline-block; width:100%; margin:0 0 1.5rem; break-inside:avoid; page-break-inside:avoid; vertical-align:top; }
.eram-gallery-masonry-image { display:block; width:100%; height:auto; object-fit:contain; }
.eram-gallery-post-card > a { display:block; line-height:0; }
.eram-gallery-post-card > h2 { line-height:1.7; }
@media (min-width:640px) { .eram-gallery-masonry { columns:2; } }
@media (min-width:1024px) { .eram-gallery-masonry { columns:3; } }


/* v5.1.0: CSS-columns masonry and blog-style cards for gallery-tag archives. */
.eram-masonry-grid {
    display: block !important;
    width: 100% !important;
    column-count: 3 !important;
    column-gap: 1.5rem !important;
    grid-template-columns: none !important;
}
.eram-masonry-item {
    display: inline-block !important;
    width: 100% !important;
    margin: 0 0 1.5rem !important;
    break-inside: avoid !important;
    -webkit-column-break-inside: avoid !important;
    page-break-inside: avoid !important;
    vertical-align: top;
}
.eram-gallery-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, .25);
    border-radius: 1rem;
    background: #111111;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.eram-gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
    border-color: rgba(212, 175, 55, .5);
}
.eram-gallery-card-image-link {
    display: block;
    overflow: hidden;
    line-height: 0;
}
.eram-gallery-card-image {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .5s ease;
}
.eram-gallery-card:hover .eram-gallery-card-image { transform: scale(1.04); }
.eram-gallery-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .5rem;
    padding: 1.25rem 1.5rem 1.5rem;
    color: #f9fafb;
}
.eram-gallery-card-title {
    margin: 0;
    font-family: 'Estedad', 'Estedad Hero', 'Vazirmatn', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
}
.eram-gallery-card-title a {
    font-family: 'Estedad', 'Estedad Hero', 'Vazirmatn', sans-serif;
    color: #f9fafb;
    text-decoration: none;
    transition: color .2s ease;
}
.eram-gallery-card-title a:hover,
.eram-gallery-card:hover .eram-gallery-card-title a { color: #d4af37; }
.eram-gallery-card-desc {
    margin: 0;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
    color: #9ca3af;
    font-size: .9rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.eram-gallery-card.eram-gallery-lang-en {
    direction: ltr;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.eram-gallery-card.eram-gallery-lang-fa {
    direction: rtl;
    font-family: 'Estedad', 'Estedad Hero', 'Vazirmatn', sans-serif;
}
.eram-gallery-lang-fa .eram-gallery-card-title,
.eram-gallery-lang-fa .eram-gallery-card-title a,
.eram-gallery-lang-fa .eram-gallery-card-desc,
.eram-gallery-lang-fa .eram-masonry-title,
.eram-gallery-lang-fa .eram-masonry-desc {
    font-family: 'Estedad', 'Estedad Hero', 'Vazirmatn', sans-serif !important;
}
.eram-gallery-card.eram-gallery-lang-fa[lang="fa"],
.eram-gallery-card[lang="fa"] .eram-gallery-card-title,
.eram-gallery-card[lang="fa"] .eram-gallery-card-title a,
.eram-gallery-card[lang="fa"] .eram-gallery-card-desc,
[lang="fa"] .eram-masonry-title,
[lang="fa"] .eram-masonry-desc {
    font-family: 'Estedad', 'Estedad Hero', 'Vazirmatn', sans-serif !important;
}
.eram-gallery-card.eram-gallery-lang-en .eram-gallery-card-desc { text-align: left; }
.eram-gallery-card.eram-gallery-lang-fa .eram-gallery-card-desc { text-align: right; }
@media (max-width: 1024px) {
    .eram-masonry-grid { column-count: 2 !important; }
}
@media (max-width: 640px) {
    .eram-masonry-grid { column-count: 1 !important; }
    .eram-gallery-card-body { padding: 1.1rem 1.15rem 1.25rem; }
}

/* Copyright notice under the single gallery image, outside the image frame. */
.eram-gallery-copyright {
    display: block;
    text-align: center;
    margin: 1.25rem auto 2.25rem;
    padding: 0 1rem;
    color: #9a9a9a;
    font-style: italic;
    font-size: 0.875rem;
    line-height: 1.6;
    background: transparent;
    border: none;
    position: static;
}


/* v5.1.9: harden gallery-tag archive masonry against global utility overrides. */
.eram-masonry-grid {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    column-count: 3 !important;
    column-gap: 1.25rem !important;
    grid-template-columns: none !important;
}
.eram-masonry-item,
.eram-masonry-grid .gallery-image-item,
.eram-masonry-grid > * {
    display: inline-block !important;
    box-sizing: border-box !important;
    break-inside: avoid !important;
    -webkit-column-break-inside: avoid !important;
    page-break-inside: avoid !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 1.25rem !important;
    overflow: hidden !important;
    vertical-align: top !important;
}
.eram-masonry-item img,
.eram-masonry-grid img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}
.eram-gallery-tag-page { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.eram-gallery-tag-spacer-top { height: 2.5rem; }
.eram-gallery-tag-header { margin: 0 auto 0; text-align: center; }
.eram-gallery-tag-heading {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    max-width: 100%;
    margin: 0;
    color: #F5F5F5;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.eram-gallery-tag-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: min(70vw, 36rem);
    padding: .1rem .9rem;
    border: 1px solid rgba(197,164,110,.75);
    border-radius: 9999px;
    color: #C5A46E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eram-gallery-tag-spacer-bottom { height: 1.75rem; }
.eram-gallery-tag-page .eram-masonry-grid { max-width: 1200px !important; }
@media (max-width: 991px) {
    .eram-masonry-grid { column-count: 2 !important; }
}
@media (max-width: 640px) {
    .eram-masonry-grid { column-count: 1 !important; }
    .eram-gallery-tag-page { padding-right: 1rem; padding-left: 1rem; }
    .eram-gallery-tag-heading { gap: .4rem; font-size: clamp(1.2rem, 5vw, 1.5rem); }
    .eram-gallery-tag-chip { max-width: 58vw; }
}


/* v5.2.0: normalize gallery-tag archive heading and card text. */
.eram-gallery-tag-heading { font-size: 1.25rem !important; }
.eram-gallery-tag-page .eram-gallery-card-title,
.eram-gallery-tag-page .eram-gallery-card-title a,
.eram-gallery-tag-page .eram-gallery-card-desc {
    font-family: inherit !important;
    letter-spacing: normal !important;
    font-stretch: normal !important;
    font-weight: normal !important;
    text-transform: none !important;
    transform: none !important;
}


/* v5.2.5: Instagram origin link and hover icon. */
.eram-instagram-link {
    position: relative;
    display: inline-flex;
    color: #C5A46E;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1px;
    text-underline-offset: .28em;
    transition: color .2s ease;
}
.eram-instagram-link:hover { color: #E0C58E; }
.eram-instagram-hover-icon {
    position: absolute;
    left: 50%;
    bottom: calc(100% + .35em);
    width: 16px;
    height: 16px;
    color: #C5A46E;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.eram-instagram-link:hover .eram-instagram-hover-icon,
.eram-instagram-link:focus-visible .eram-instagram-hover-icon {
    opacity: 1;
    transform: translate(-50%, 0);
}


/* ============================================================
   v5.3.5 / v5.3.6 — Block editor layout polish for single post content.
   Scoped strictly to .eram-single-content descendants so no
   other theme area is affected.
   ============================================================ */

/* ---------- (a) Media & Text block: RTL + gold frame ---------- */
.eram-single-content .wp-block-media-text {
    text-align: right;
    margin-block: 2rem;
    /* v5.3.6: frame/border around the block (and its text) removed.
       direction:rtl removed from the grid container so the media side
       chosen in Gutenberg ("media on left/right") is preserved on the
       front end instead of being visually reversed. */
}
.eram-single-content .wp-block-media-text .wp-block-media-text__content {
    direction: rtl;
    text-align: right;
    padding: .75rem 1.1rem;
    border-radius: 1rem;
}
.eram-single-content .wp-block-media-text .wp-block-media-text__content > *,
.eram-single-content .wp-block-media-text .wp-block-media-text__content p,
.eram-single-content .wp-block-media-text .wp-block-media-text__content ul,
.eram-single-content .wp-block-media-text .wp-block-media-text__content ol,
.eram-single-content .wp-block-media-text .wp-block-media-text__content h1,
.eram-single-content .wp-block-media-text .wp-block-media-text__content h2,
.eram-single-content .wp-block-media-text .wp-block-media-text__content h3,
.eram-single-content .wp-block-media-text .wp-block-media-text__content h4,
.eram-single-content .wp-block-media-text .wp-block-media-text__content h5,
.eram-single-content .wp-block-media-text .wp-block-media-text__content h6 {
    direction: rtl;
    text-align: right;
}
/* media column: soft gold frame, rounded corners matching the theme */
.eram-single-content .wp-block-media-text .wp-block-media-text__media {
    direction: rtl;
    border: 1px solid rgba(197,164,110,.4);
    border-radius: 1.1rem;
    overflow: hidden;
    padding: .4rem;
    background: rgba(197,164,110,.05);
    transition: border-color .25s ease, box-shadow .25s ease;
}
.eram-single-content .wp-block-media-text .wp-block-media-text__media img,
.eram-single-content .wp-block-media-text .wp-block-media-text__media figure,
.eram-single-content .wp-block-media-text .wp-block-media-text__media .wp-block-image {
    border-radius: .8rem;
    overflow: hidden;
    margin: 0;
}
.eram-single-content .wp-block-media-text .wp-block-media-text__media img {
    display: block;
    width: 100%;
    height: auto;
}
.eram-single-content .wp-block-media-text:hover .wp-block-media-text__media {
    border-color: rgba(197,164,110,.65);
    box-shadow: 0 8px 28px rgba(0,0,0,.55);
}
/* v5.3.6: the forced RTL grid reversal (and direction:rtl above) made the
   front-end layout the mirror image of the Gutenberg editor. The block's
   own markup now decides column order, so what the author picks in the
   editor is exactly what visitors see. RTL text alignment is kept via
   the __content rules below. */
@media (max-width: 782px) {
    .eram-single-content .wp-block-media-text {
        grid-template-columns: 1fr;
        text-align: right;
        padding: .75rem;
    }
    .eram-single-content .wp-block-media-text .wp-block-media-text__content {
        padding: .5rem .35rem 0;
    }
}

/* ---------- (b) Spacer block: refined gold divider ---------- */
.eram-single-content .wp-block-spacer {
    position: relative;
    display: block;
    height: var(--wp--preset--spacing--50, 1.5rem);
    overflow: visible;
    pointer-events: none;
}
/* keep the WordPress height intact; only decorate via pseudo-element */
.eram-single-content .wp-block-spacer::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 1px;
    background: linear-gradient(to left,
        transparent 0%,
        rgba(197,164,110,.12) 12%,
        rgba(197,164,110,.55) 50%,
        rgba(197,164,110,.12) 88%,
        transparent 100%);
}
/* small ornamental diamond in the middle of the divider */
.eram-single-content .wp-block-spacer::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    transform: translate(-50%, -50%) rotate(45deg);
    border: 1px solid rgba(197,164,110,.8);
    background: #0a0a0a;
}
@media (max-width: 782px) {
    .eram-single-content .wp-block-spacer { margin-block: 1.25rem; }
}

/* ---------- (c) Quote block: automatic text direction ---------- */
.eram-single-content .wp-block-quote,
.eram-single-content blockquote {
    unicode-bidi: plaintext;
    text-align: start;
    margin: 2rem 0;
    padding: 1.4rem 3rem 1.3rem 1.6rem; /* v5.3.7: extra right padding so text clears the decorative quote mark */
    border: none;
    border-right: 3px solid #C5A46E;
    border-radius: 0 1rem 1rem 0;
    background:
        linear-gradient(to left, rgba(197,164,110,.10), rgba(197,164,110,.03) 60%, transparent),
        #111;
    color: #d8d8d8;
    font-size: 1.0625rem;
    line-height: 2.1;
    position: relative;
}
/* decorative opening quote mark — v5.3.6: left-pointing (Persian/RTL) */
.eram-single-content .wp-block-quote::before,
.eram-single-content blockquote::before {
    content: "\00AB";
    direction: ltr;
    unicode-bidi: isolate;
    transform: scaleX(1);
    position: absolute;
    top: .35rem;
    right: .4rem;
    font-size: 3.2rem;
    line-height: 1;
    color: rgba(197,164,110,.28);
    font-family: Georgia, "Times New Roman", serif;
    pointer-events: none;
}
.eram-single-content .wp-block-quote p,
.eram-single-content blockquote p {
    unicode-bidi: plaintext;
    text-align: start;
    margin: 0 0 1rem;
}
.eram-single-content .wp-block-quote p:last-child,
.eram-single-content blockquote p:last-child { margin-bottom: 0; }
.eram-single-content .wp-block-quote :is(ul,ol),
.eram-single-content blockquote :is(ul,ol) { padding-right: 1.25rem; }
/* nested quote keeps a lighter accent */
.eram-single-content .wp-block-quote blockquote,
.eram-single-content blockquote blockquote {
    border-right-width: 2px;
    border-right-color: rgba(197,164,110,.5);
    background: rgba(197,164,110,.05);
    margin-block: 1rem;
    font-size: 1rem;
}
/* cite / attribution */
.eram-single-content .wp-block-quote cite,
.eram-single-content blockquote cite,
.eram-single-content .wp-block-quote cite strong,
.eram-single-content blockquote cite strong {
    display: block;
    margin-top: .9rem;
    font-style: normal;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #C5A46E;
}
.eram-single-content .wp-block-quote cite::before,
.eram-single-content blockquote cite::before {
    content: "\2014"; /* em dash before the source */
    margin-inline-end: .4em;
    color: rgba(197,164,110,.7);
}
/* classic editor alignment helper */
.eram-single-content .wp-block-quote.alignleft,
.eram-single-content .wp-block-quote.alignright,
.eram-single-content .wp-block-quote.aligncenter,
.eram-single-content blockquote.alignleft,
.eram-single-content blockquote.alignright,
.eram-single-content blockquote.aligncenter {
    text-align: start;
}

/* ---------- v5.4.1: natural video embeds — rectangular, content-fitted ----------
   Videos, iframes and embeds fill the content column at their own intrinsic
   aspect ratio (height scales with width, so the frame stays a natural
   rectangle, never stretched or clipped), with a clean moderate radius.
   Images keep their existing rounded gold frame above, untouched. */
.eram-single-content video,
.eram-single-content iframe,
.eram-single-content embed,
.eram-single-content object {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: var(--eram-embed-ratio, 16 / 9);
    object-fit: contain;
    margin-inline: auto;
    border: 0;
    border-radius: .6rem;
    overflow: hidden;
    box-sizing: border-box;
}
/* Known video providers get their exact aspect ratio (no letterboxing gaps). */
.eram-single-content :is(.wp-block-embed, .wp-block-video, figure.wp-block-embed) {
    max-width: 100%;
    margin: 1.5rem 0;
    padding: 0;
    border: 0;
    border-radius: .6rem;
    overflow: hidden;
    width: 100%;
    height: auto;
}
.eram-single-content .wp-block-embed.is-aspect-16-9 > .wp-block-embed__wrapper { aspect-ratio: 16 / 9; }
.eram-single-content .wp-block-embed.is-aspect-4-3 > .wp-block-embed__wrapper { aspect-ratio: 4 / 3; }
.eram-single-content .wp-block-embed.is-aspect-1-1 > .wp-block-embed__wrapper { aspect-ratio: 1 / 1; }
.eram-single-content .wp-block-embed__wrapper { position: relative; width: 100%; aspect-ratio: var(--eram-embed-ratio, 16 / 9); }
.eram-single-content .wp-block-embed__wrapper :is(iframe, embed, object, video) {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}
/* The responsive wrapper of a plain (non-block) video. */
.eram-single-content .wp-block-video video { width: 100%; height: auto; border-radius: .6rem; }
.eram-single-content :is(.wp-block-embed, .wp-block-video) figcaption { margin-top:.5rem; }
.eram-single-content video { display: block; margin-inline: auto; }
