/* Shared visual refinement, loaded after component styles. */
body.fa-layout, body.en-layout { background: #f4f7fb; color: #19324b; font-family: Vazirmatn, sans-serif; }
body .header-top-bar { min-height: 120px; padding: 14px 8px 20px; background: none; }
body .header-top-bar::after { display: none; }
body .top-navbar { padding-bottom: 20px; }
body .nav-shell {
    background: #fff;
    border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 14px;
    min-height: 68px; box-shadow: 0 8px 24px #182c4210;
}
body .nav-shell::before { display: none; }
body .nav-shell .main-menu .menu-list { gap: 5px; }
body .nav-shell .main-menu { margin-inline: 0 !important; }
body .nav-shell .main-menu .menu-list > li > a.active i { color: #fff; }
body .nav-shell .main-menu .menu-list > li > a span { color: inherit; }
body .nav-shell .main-menu .menu-list > li > a.active:hover { background: #1957b3; color: #fff !important; }
body .nav-shell .main-menu .menu-list > li > a {
    color: #26364d !important; border-radius: 8px; font-size: 14px;
    font-weight: 500; padding: 0 15px; min-height: 48px; box-shadow: none;
    transition: background .2s, color .2s;
}
body .nav-shell .main-menu .menu-list > li > a i { color: #64748b; }
body .nav-shell .main-menu .menu-list > li:first-child > a,
body .nav-shell .main-menu .menu-list > li > a.active {
    background: #2469cf; color: #fff !important; box-shadow: none;
}
body .nav-shell .main-menu .menu-list > li > a:hover,
body .nav-shell .main-menu .menu-list > li > a:focus-visible { background: #f1f5f9; color: #174d99 !important; }
body .nav-shell .nav-tools { border-inline-start: 1px solid #e5e7eb; padding-inline-start: 14px; margin-inline-start: 10px; }
body .nav-shell .tool-btn { background: #f6f7f9; border: 1px solid #e8ebef; color: #315477; border-radius: 8px; width: 40px; height: 40px; }
body .nav-shell .tool-btn:hover { background: #e9edf2; transform: none; }
body .nav-shell .main-menu li ul {
    padding: 9px; border-radius: 8px; border: 1px solid #dce6ef;
    box-shadow: 0 18px 40px #092c4b25; background: #fff;
}
body .nav-shell .main-menu li:focus-within > ul { display: block; }
body .nav-shell .main-menu li > ul::before { content: ''; position: absolute; inset-inline: 0; top: -10px; height: 10px; }
body .nav-shell .main-menu li ul li a { color: #244561; padding: 12px 14px; border-radius: 5px; }
body .nav-shell .main-menu li ul li a:hover { background: #eaf5fa; color: #08768b; }
body .hero-section { padding: 0; background: transparent; }
body .news-columns-section { background: #fff; overflow: visible; padding: 20px 0; }
body .news-columns-section > .container > .row { align-items: flex-start; }
body .news-columns-section .make-it-sticky,
body .news-sidebar.make-it-sticky { position: sticky; top: 20px; align-self: flex-start; height: fit-content; max-height: calc(100dvh - 40px); overflow-y: auto; scrollbar-width: thin; }
body .hero-section .hero-slider, body .hero-section .hero-item { border-radius: 0 !important; box-shadow: none; }
body .hero-overlay { background: linear-gradient(270deg, #06253cbe, #06253c20 70%), linear-gradient(0deg, #06253c85, transparent 60%); }
body .hero-content { border-inline-start: 3px solid #66d2da; padding-inline-start: 24px; }
body .hero-badge { border: 0; border-radius: 3px; background: #ffffff18; letter-spacing: 0; }
body .hero-section .floating-card { display: none; }
body .hero-section .hero-slider .owl-nav button { background: rgba(8, 35, 61, .48) !important; }
body .hero-section .hero-slider .owl-dots .owl-dot span { font-family: Arial, sans-serif; }
body .news-card { border: 1px solid #e1e9f1; box-shadow: 0 10px 35px #153d6010; border-radius: 12px; }
body .news-card .news-header-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: #fff; border: 0; border-bottom: 1px solid #e9e9e9;
    padding: 16px 18px; margin-bottom: 28px; border-radius: 6px;
}
body .news-card .news-header-meta > .d-flex { gap: 12px 20px !important; align-items: center; flex: 1; }
body .news-card .meta-item {
    display: inline-flex; align-items: center; gap: 8px; padding: 4px 0;
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
    color: #536b80; font-size: 13px; line-height: 1.9;
}
body .news-card .meta-item i { color: #197d93; font-size: 16px; }
body .news-card .category-text { color: #465467; background: #f5f5f5; border-radius: 4px; padding: 5px 10px; font-weight: 700; }
body .news-card .print-style { color: #305c78; background: #fff; border: 1px solid #dae5ed !important; border-radius: 6px; box-shadow: none; flex-shrink: 0; }
body .news-card .news-head .news-title { font-size: clamp(24px, 2.4vw, 34px); color: #123652; line-height: 1.75; }
body .news-card .modern-meta-container {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 22px; margin-top: 32px; box-shadow: none;
}
body .news-card .meta-box-item.id-section { gap: 14px; padding: 0; display: flex; align-items: center; }
body .news-card .meta-icon-wrapper {
    width: 48px; height: 48px; border-radius: 8px; background: #123f60;
    color: #fff; display: flex; align-items: center; justify-content: center;
}
body .news-card .meta-label { color: #627b8d; font-size: 12px; font-weight: 500; }
body .news-card .meta-number { color: #123f60; font-size: 24px; font-weight: 800; line-height: 1.5; }
body .news-card .metro-border-left { border: 0; border-inline-end: 1px solid #d5e2eb; }
body .news-card .link-section { padding-inline-start: 24px; width: 100%; min-width: 0; }
body .news-card .link-label-text { font-size: 12px; white-space: nowrap; color: #627b8d; }
body .news-card .modern-input-group { display: flex; flex: 1; min-width: 0; background: #fff; border: 1px solid #d5e2eb; border-radius: 6px; overflow: hidden; }
body .news-card .modern-input { width: 100%; min-width: 0; padding: 12px; border: 0; direction: ltr; text-align: left; background: transparent; color: #3c5d75; }
body .news-card .modern-input:focus-visible { outline: 2px solid #25889c !important; outline-offset: -3px; }
body .news-card .copy-btn-modern { border: 0; border-radius: 0; background: #123f60; color: #fff; padding: 0 20px; min-height: 44px; white-space: nowrap; }
body .news-card .copy-btn-modern:hover { background: #087b90; }
body .pagination { gap: 6px; border-radius: 8px; padding: 8px; box-shadow: 0 6px 24px #173d6010; }
body .pagination .page-item .page-link { width: 42px; min-width: 42px; height: 42px; padding: 0; border-radius: 5px !important; background: #f1f5f9; color: #31516c; box-shadow: none; transform: none; }
body .pagination .page-item.active .page-link { background: #123f60; color: #fff; box-shadow: none; transform: none; }
body .pagination .page-item.disabled .page-link { color: #9baebb; background: #f6f8fa; }
body .pagination .pager-prev, body .pagination .pager-next { font: 22px Arial, sans-serif; direction: ltr; unicode-bidi: isolate; rotate: none; transform: none; }
body.fa-layout .pagination { direction: rtl; flex-direction: row; }
body.en-layout .pagination { direction: ltr; flex-direction: row; }
body :is(a, button, input):focus-visible { outline: 3px solid #37a9ba; outline-offset: 3px; }
body.en-layout .header-top-bar { direction: ltr; }
body.en-layout .hero-content { right: auto; left: clamp(24px, 7vw, 112px); text-align: left; }

/* Search page */
body .hero-search-section,
body .hero-search-section label,
body .hero-search-section input,
body .hero-search-section select,
body .hero-search-section button { font-family: Vazirmatn, sans-serif; }
body .hero-search-section .fa,
body .mag-card .fa,
body .result-count-badge .fa { font-family: FontAwesome !important; }
body .hero-search-section { border-top: 1px solid #e8edf3; }
body .search-pill-container { direction: rtl; }
body .search-pill-container input::placeholder { color: #94a3b8; opacity: 1; }
body .search-pill-container select { appearance: auto; }
body .search-pill-container select { font-family: Vazirmatn, sans-serif; color: #64748b; }
body .search-pill-container .search-field-group:focus-within label { color: #4f46e5; }
body .search-pill-container .search-field-group:focus-within input,
body .search-pill-container .search-field-group:focus-within select { color: #1f2937; }
body .mag-card { font-family: Vazirmatn, sans-serif; }
body .mag-card { border: 1px solid #e8edf3; border-radius: 16px; box-shadow: 0 5px 18px rgba(31, 51, 75, .07); }
body .mag-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(31, 51, 75, .12); border-color: #dfe5ee; }
body .mag-card-title { font-size: 1.12rem; line-height: 1.9; }
body .mag-card-desc { line-height: 1.9; }
body .result-count-badge { font-family: Vazirmatn, sans-serif; }

/* Jalali datepicker */
body #ui-datepicker-div {
    z-index: 100000 !important;
    direction: rtl;
    font-family: Vazirmatn, sans-serif;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(25, 45, 70, .18);
}
body #ui-datepicker-div .ui-datepicker-header {
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: #244561;
    padding: 6px 4px;
}
body #ui-datepicker-div .ui-datepicker-title select {
    height: 34px;
    margin: 0 3px;
    padding: 3px 8px;
    color: #244561;
    font-family: Vazirmatn, sans-serif;
    font-size: 12px;
    border: 1px solid #dce5ee;
    border-radius: 6px;
    background: #fff;
}
body #ui-datepicker-div .ui-datepicker-prev,
body #ui-datepicker-div .ui-datepicker-next {
    top: 8px;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
}
body #ui-datepicker-div .ui-datepicker-prev:hover,
body #ui-datepicker-div .ui-datepicker-next:hover { background: #eef3f8; border: 0; }
body #ui-datepicker-div .ui-datepicker-prev span,
body #ui-datepicker-div .ui-datepicker-next span { filter: none; }
body #ui-datepicker-div th { color: #7c8a99; font-weight: 600; font-size: 11px; padding: 7px 3px; }
body #ui-datepicker-div td { padding: 2px; }
body #ui-datepicker-div td a,
body #ui-datepicker-div td span {
    width: 31px; height: 31px; display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 6px; background: transparent; color: #3c5166; font-family: Vazirmatn, sans-serif; font-size: 12px;
}
body #ui-datepicker-div td a:hover { background: #eef2ff; color: #4f46e5; }
body #ui-datepicker-div td.ui-datepicker-current-day a { background: #4f46e5; color: #fff; }
body #ui-datepicker-div td.ui-datepicker-today a { box-shadow: inset 0 0 0 1px #f4b740; }

/* Visit statistics */
body .sarab-footer .sarab-footer__stats-grid { grid-template-columns: minmax(0, 1fr); }
body .sarab-footer .sarab-footer__visit-output { width: 100%; }
body .sarab-footer .stats-card { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; }
body .sarab-footer .stats-row { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.05); min-width: 0; }
body .sarab-footer .stats-label { color: #b9cde0; font-size: 12px; white-space: nowrap; }
body .sarab-footer .stats-value { color: #fff; font-family: Vazirmatn, sans-serif; font-size: 20px; font-weight: 800; line-height: 1.5; font-variant-numeric: tabular-nums; }
@media (max-width: 991.98px) {
    body .header-top-bar { min-height: 90px; padding: 10px 0; }
    body .nav-shell { min-height: 58px; padding: 8px 12px; }
    body .top-navbar { padding-bottom: 12px; }
    body .nav-shell .mobile-navbar-toggler { background: #f1f5f9 !important; }
    body .nav-shell .mobile-navbar-toggler i { color: #315477; }
    body .nav-shell .navbar-collapse { display: flex !important; flex: 1; justify-content: flex-end; flex-direction: row !important; height: auto !important; min-height: 0 !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; border-radius: 0 !important; background: transparent !important; }
    body .nav-shell .navbar-collapse > .main-menu { display: none !important; }
    body .nav-shell .nav-tools { margin: 0; border: 0; padding: 0; }
    body .mobile-menu-header { background: #edf5fa; }
    body .mobile-menu-content .main-menu .menu-list > li > a { border-radius: 5px; border-inline-start: 3px solid #268a9b; }
}
@media (max-width: 767.98px) {
    body .search-pill-container { border-radius: 18px; display: grid; grid-template-columns: 1fr 1fr; padding: 8px; gap: 0; }
    body .search-pill-container .search-field-group { border-left: 0; border-bottom: 1px solid #e4e7ee; padding: 10px 12px; }
    body .search-pill-container .search-field-group:nth-last-of-type(-n+2) { border-bottom: 0; }
    body .search-pill-container .btn-magnificent-search { grid-column: 1 / -1; justify-self: center; margin: 8px 0 0; }
    body .sarab-footer .stats-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body .news-columns-section .make-it-sticky,
    body .news-sidebar.make-it-sticky { position: static; max-height: none; overflow: visible; }
    body .news-card .news-header-meta { padding: 12px; gap: 8px; align-items: flex-start; }
    body .news-card .news-header-meta > .d-flex { gap: 8px 14px !important; }
    body .news-card .modern-meta-container { padding: 16px; }
    body .news-card .metro-border-left { border: 0; border-bottom: 1px solid #d5e2eb; padding-bottom: 14px; }
    body .news-card .link-section { padding: 0; flex-wrap: wrap; }
    body .news-card .link-label-text { width: 100%; }
    body .hero-content { padding-inline-start: 16px; }
    body .pagination { gap: 3px; }
    body .pagination .page-item .page-link { width: 34px; min-width: 34px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
    body .hero-item img, body .nav-shell a { transition: none; transform: none; }
}
