/* هدر جدید سایت — همان طراحی panapal-front (کلاس‌های ph-*) */
/* ================= هدر ================= */
.ph { position: fixed; top: .5rem; inset-inline: 0; z-index: 50; transition: top .3s ease; }
@media (min-width: 768px) { .ph { top: 1.25rem; } }
.ph.is-scrolled { top: .5rem; }
.ph *, .ph *::before, .ph *::after { box-sizing: border-box; }
.ph-inner { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .ph-inner { padding: 0 1.5rem; } }

.ph-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    height: 4rem; padding: 0 .75rem 0 .6rem; border-radius: 1.25rem;
    background: rgba(255,255,255,.72); border: 1px solid rgba(219,231,255,.9);
    backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(29,78,216,.18);
    transition: height .3s ease, background .3s ease, box-shadow .3s ease; }
@media (min-width: 1024px) { .ph-bar { height: 4.5rem; padding: 0 1rem 0 .9rem; } }
.ph.is-scrolled .ph-bar { height: 3.75rem; background: rgba(255,255,255,.92);
    box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 14px 32px -14px rgba(15,23,42,.25); }

/* لوگو */
.ph-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex-shrink: 0; }
.ph-logo { width: 2.6rem; height: 2.6rem; display: block; }
@media (min-width: 1024px) { .ph-logo { width: 3rem; height: 3rem; } }
.ph-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.ph-brand-text strong { font-size: 1.1rem; font-weight: 800; color: #0f172a; }
.ph-brand-text small { font-size: .68rem; color: #64748b; font-weight: 500; }
@media (max-width: 380px) { .ph-brand-text small { display: none; } }

/* منو */
.ph-nav { display: none; }
@media (min-width: 1024px) { .ph-nav { display: block; } }
.ph-menu { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.ph-menu > li { position: relative; }
.ph-link { display: inline-flex; align-items: center; gap: .25rem; padding: .55rem .75rem; border-radius: .7rem;
    border: 0; background: none; font: inherit; font-size: .9rem; font-weight: 500; color: #334155;
    text-decoration: none; cursor: pointer; white-space: nowrap; transition: color .2s, background .2s; }
@media (min-width: 1280px) { .ph-link { padding: .55rem .9rem; font-size: .95rem; } }
.ph-link:hover, .ph-has-drop:hover > .ph-link, .ph-has-drop.is-open > .ph-link { color: #1d4ed8; background: rgba(239,246,255,.9); }
.ph-link.is-current { color: #1d4ed8; font-weight: 700; background: #eff6ff; }
.ph-link:focus-visible, .ph-btn:focus-visible, .ph-drop-item:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }
.ph-caret { width: .9rem; height: .9rem; transition: transform .25s; }
.ph-has-drop:hover .ph-caret, .ph-has-drop.is-open .ph-caret { transform: rotate(180deg); }

/* زیرمنو */
.ph-drop { position: absolute; top: calc(100% + .6rem); right: 50%; transform: translate(50%, 6px);
    width: 19rem; padding: .5rem; border-radius: 1rem; background: #fff; border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px -16px rgba(15,23,42,.25);
    opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; }
.ph-drop::before { content: ""; position: absolute; inset-inline: 0; top: -.75rem; height: .75rem; } /* پل هاور */
.ph-has-drop:hover .ph-drop, .ph-has-drop.is-open .ph-drop, .ph-has-drop:focus-within .ph-drop {
    opacity: 1; visibility: visible; transform: translate(50%, 0); }
.ph-drop-item { display: flex; align-items: flex-start; gap: .75rem; padding: .7rem; border-radius: .75rem;
    text-decoration: none; transition: background .2s; }
.ph-drop-item:hover { background: #f8fafc; }
.ph-drop-item strong { display: block; font-size: .9rem; font-weight: 700; color: #0f172a; margin-bottom: .15rem; }
.ph-drop-item small { display: block; font-size: .75rem; color: #64748b; line-height: 1.7; }
.ph-drop-icon { flex-shrink: 0; width: 2.4rem; height: 2.4rem; border-radius: .7rem; background: #eff6ff; color: #1d4ed8;
    display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s; }
.ph-drop-icon svg { width: 1.2rem; height: 1.2rem; }
.ph-drop-item:hover .ph-drop-icon { background: #1d4ed8; color: #fff; }

/* دکمه‌ها */
.ph-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.ph-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 2.6rem;
    padding: 0 1.1rem; border-radius: .8rem; font-size: .88rem; font-weight: 700; text-decoration: none;
    white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s, transform .2s; }
.ph-btn svg { width: 1.1rem; height: 1.1rem; }
.ph-btn--ghost { color: #1e293b; background: rgba(255,255,255,.7); border: 1px solid #dbe5fb; }
.ph-btn--ghost:hover { border-color: #93c5fd; color: #1d4ed8; background: #fff; }
.ph-btn--primary { color: #fff; background: linear-gradient(135deg, #2563eb, #1d4ed8 60%, #1e40af);
    box-shadow: 0 8px 18px -8px rgba(29,78,216,.7); }
.ph-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(29,78,216,.75); }
@media (max-width: 1023px) { .ph-btn--primary { display: none; } }
@media (max-width: 479px) { .ph-btn--ghost span { display: none; } .ph-btn--ghost { width: 2.6rem; padding: 0; } }
/* لپ‌تاپ‌های کوچک: فشرده‌تر */
@media (min-width: 1024px) and (max-width: 1279px) {
    .ph-brand-text small { display: none; }
    .ph-link { padding: .5rem .55rem; font-size: .85rem; }
    .ph-btn--ghost span { display: none; }
    .ph-btn--ghost { width: 2.6rem; padding: 0; }
    .ph-btn--primary { padding: 0 .9rem; font-size: .82rem; }
}
.ph .mnav-btn { box-shadow: none; border: 1px solid #dbe5fb; background: rgba(255,255,255,.8); }
@media (min-width: 1024px) { .ph .mnav-btn { display: none; } }

/* خنثی کردن استایل‌های قدیمی #site-header در panapal-style.css */
#site-header.ph { width: auto; padding: 0; background: none; box-shadow: none; }
.ph-brand img.ph-logo { object-fit: contain; }
.ph-link, .ph-btn, .ph-drop-item strong, .ph-drop-item small { font-family: inherit; }
.ph-menu { flex-direction: row; }
