/* =========================================================
   Negah Shahrvand Quarterly — Custom OJS Child Theme
   Parent: Official OJS Default Theme
   Target: OJS 3.5.0.x
   ========================================================= */

/* ---------- Design tokens ---------- */

/* ---------- Base ---------- */
html,
body {
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

body {
    background:
        radial-gradient(circle at 10% 0%, rgba(20, 138, 156, 0.07), transparent 32rem),
        #f4f7f8;
    color: #20313d;
    line-height: 1.95;
}

a {
    color: #1e6292;
    text-decoration: none;
    transition: color .2s ease, opacity .2s ease, transform .2s ease;
}

a:hover,
a:focus {
    color: #148a9c;
}

/* ---------- Header ---------- */
.pkp_structure_head {
    position: relative;
    overflow: visible;
    background:
        linear-gradient(135deg, rgba(11, 45, 62, 0.98), rgba(20, 138, 156, 0.92)) !important;
    border: 0;
    box-shadow: 0 8px 28px rgba(11, 45, 62, 0.18);
}

.pkp_structure_head::before,
.pkp_structure_head::after {
    position: absolute;
    content: "";
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.11);
    transform: rotate(35deg);
}

.pkp_structure_head::before {
    width: 360px;
    height: 360px;
    top: -260px;
    left: 7%;
}

.pkp_structure_head::after {
    width: 230px;
    height: 230px;
    top: -165px;
    left: 22%;
}

.pkp_head_wrapper {
    max-width: 1280px;
    padding-top: 0;
    padding-bottom: 0;
}

.pkp_site_name_wrapper {
    min-height: 0;
    height: auto;
    padding: 0;
}

.pkp_site_name {
    min-height: 0;
    height: auto;
    padding: 18px 0 15px;
    margin: 0;
    text-align: right;
}

.pkp_site_name .is_img img {
    display: block;
    width: auto;
    height: auto;
    max-width: 260px;
    max-height: 90px;
    object-fit: contain;
    margin: 0;
}

/* ---------- Navigation ---------- */
.pkp_navigation_primary_wrapper {
    min-height: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.pkp_navigation_primary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    direction: rtl;
    margin: 0;
    padding: 0;
}

.pkp_navigation_primary > li > a {
    position: relative;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    padding: 14px 10px;
}

.pkp_navigation_primary > li > a::after {
    position: absolute;
    right: 10px;
    bottom: 7px;
    width: 0;
    height: 2px;
    content: "";
    background: #d5a33b;
    transition: width .25s ease;
}

.pkp_navigation_primary > li > a:hover::after,
.pkp_navigation_primary > li > a:focus::after {
    width: calc(100% - 20px);
}

.pkp_navigation_search_wrapper a,
.pkp_navigation_user > li > a {
    color: #fff !important;
}

/* ---------- Layout ---------- */
.pkp_structure_content {
    display: block;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 24px 54px;
}

.pkp_page_index .pkp_structure_main {
    float: none;
    width: 100%;
    max-width: none;
    margin: 0;
}

.pkp_page_index .pkp_structure_sidebar {
    display: none;
}

.pkp_structure_main {
    background: #ffffff;
    border: 0;
    border-radius: 18px;
    padding: 32px 36px;
    box-shadow: 0 12px 34px rgba(11, 45, 62, 0.10);
}

/* ---------- Homepage hero ---------- */
.pkp_page_index .homepage_about,
.pkp_page_index .journal-description {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 0 34px;
    padding: 44px 44px 42px;
    color: #fff;
    background:
        linear-gradient(125deg, rgba(11, 45, 62, 0.98), rgba(20, 138, 156, 0.92));
    border: 0;
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(11, 45, 62, 0.18);
}

.pkp_page_index .homepage_about::before {
    position: absolute;
    z-index: -1;
    content: "";
    width: 410px;
    height: 410px;
    left: -120px;
    top: -255px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 48%;
    transform: rotate(24deg);
}

.pkp_page_index .homepage_about::after {
    position: absolute;
    z-index: -1;
    content: "";
    width: 240px;
    height: 240px;
    left: 13%;
    bottom: -185px;
    border: 36px solid rgba(213, 163, 59, 0.15);
    border-radius: 50%;
}

.pkp_page_index .homepage_about h2,
.pkp_page_index .homepage_about h3 {
    color: #fff;
    font-size: clamp(25px, 3vw, 42px);
    font-weight: 900;
    margin-top: 0;
    margin-bottom: 14px;
}

.pkp_page_index .homepage_about p {
    max-width: 820px;
    margin-top: 0;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.90);
    font-size: 16px;
    line-height: 2.05;
}

.ns-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.ns-hero-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 20px;
    border-radius: 9px;
    font-weight: 800;
}

.ns-hero-actions .ns-primary {
    background: #d5a33b;
    color: #0b2d3e !important;
}

.ns-hero-actions .ns-secondary {
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.07);
}

.ns-hero-actions a:hover {
    transform: translateY(-2px);
}

/* ---------- Quick facts ---------- */
.ns-quick-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: -8px 0 36px;
}

.ns-fact {
    position: relative;
    overflow: hidden;
    padding: 19px 18px;
    background: #fff;
    border: 1px solid #dfe7eb;
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(11, 45, 62, 0.06);
}

.ns-fact::before {
    position: absolute;
    right: 0;
    top: 0;
    width: 4px;
    height: 100%;
    content: "";
    background: linear-gradient(#148a9c, #d5a33b);
}

.ns-fact strong,
.ns-fact span {
    display: block;
}

.ns-fact strong {
    color: #0b2d3e;
    font-size: 15px;
    margin-bottom: 4px;
}

.ns-fact span {
    color: #667985;
    font-size: 13px;
}

/* ---------- Section headings ---------- */
.pkp_structure_main > h2,
.pkp_structure_main .cmp_announcements > h2,
.pkp_structure_main .current_issue > h2 {
    position: relative;
    color: #0b2d3e;
    font-weight: 900;
    padding-right: 18px;
    margin-bottom: 22px;
}

.pkp_structure_main > h2::before,
.pkp_structure_main .cmp_announcements > h2::before,
.pkp_structure_main .current_issue > h2::before {
    position: absolute;
    right: 0;
    top: .38em;
    width: 6px;
    height: 1.15em;
    content: "";
    border-radius: 8px;
    background: linear-gradient(#148a9c, #d5a33b);
}

/* ---------- Announcements ---------- */
.cmp_announcements,
.obj_announcement_summary {
    width: 100%;
    max-width: none;
}

.obj_announcement_summary {
    position: relative;
    background: #fff;
    border: 1px solid #dfe7eb;
    border-right: 5px solid #148a9c;
    border-radius: 14px;
    padding: 23px 25px;
    margin: 0 0 18px;
    box-shadow: 0 8px 24px rgba(11, 45, 62, 0.06);
    transition: transform .25s ease, box-shadow .25s ease;
}

.obj_announcement_summary:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(11, 45, 62, 0.10);
}

.obj_announcement_summary .title,
.obj_announcement_summary .title a {
    color: #0b2d3e;
    font-weight: 900;
}

.obj_announcement_summary .date {
    color: #667985;
    font-size: 13px;
}

.obj_announcement_summary .summary,
.obj_announcement_summary .description,
.obj_announcement_summary .read_more {
    width: 100%;
    max-width: none;
    float: none;
    margin-right: 0;
    margin-left: 0;
}

/* ---------- Issues and articles ---------- */
.obj_issue_summary,
.obj_article_summary,
.obj_issue_toc {
    background: #fff;
    border: 1px solid #dfe7eb;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 18px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.obj_issue_summary:hover,
.obj_article_summary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(11, 45, 62, 0.09);
}

.obj_article_summary .title a,
.obj_issue_summary .title a {
    color: #0b2d3e;
    font-weight: 900;
}

/* ---------- Buttons ---------- */
.cmp_button,
.pkp_button,
button,
input[type="submit"],
.block_make_submission a {
    background: #148a9c;
    border: 1px solid #148a9c;
    border-radius: 9px;
    color: #fff !important;
    font-weight: 800;
    padding: 10px 19px;
    box-shadow: none;
}

.cmp_button:hover,
.pkp_button:hover,
button:hover,
input[type="submit"]:hover,
.block_make_submission a:hover {
    background: #0b2d3e;
    border-color: #0b2d3e;
    color: #fff !important;
    transform: translateY(-1px);
}

/* ---------- Forms ---------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
    border: 1px solid #cad7de;
    border-radius: 9px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #148a9c;
    box-shadow: 0 0 0 3px rgba(20, 138, 156, 0.12);
    outline: none;
}

/* ---------- Footer ---------- */
.pkp_structure_footer_wrapper {
    background:
        linear-gradient(135deg, #0b2d3e, #173f5f) !important;
    color: #fff;
    border: 0;
    margin-top: 42px;
}

.pkp_structure_footer {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    gap: 34px;
    max-width: 1280px;
    min-height: 0;
    padding: 28px 24px;
}

.pkp_footer_content {
    flex: 1;
    padding: 0;
    margin: 0;
}

.pkp_footer_content,
.pkp_footer_content p,
.pkp_footer_content a {
    color: rgba(255, 255, 255, 0.92) !important;
}

.pkp_footer_content p {
    margin: 5px 0;
}

.pkp_brand_footer {
    float: none;
    width: auto;
    padding: 0;
    margin: 0;
}

.pkp_brand_footer img {
    width: auto;
    height: auto;
    max-width: 125px;
    max-height: 64px;
    opacity: .76;
    filter: brightness(0) invert(1);
}

/* ---------- Reveal animation ---------- */
.ns-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .55s ease, transform .55s ease;
}

.ns-reveal.ns-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Safety ---------- */
img,
iframe,
table,
pre {
    max-width: 100%;
}

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
    .ns-quick-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .pkp_structure_content {
        padding: 20px 0 36px;
    }

    .pkp_structure_main {
        border-radius: 0;
        padding: 22px;
    }

    .pkp_navigation_primary {
        display: block;
    }

    .pkp_navigation_primary > li > a,
    .pkp_navigation_search_wrapper a,
    .pkp_navigation_user > li > a {
        color: #0b2d3e !important;
    }

    .pkp_structure_footer {
        display: block;
    }

    .pkp_brand_footer {
        margin-top: 18px;
    }
}

@media (max-width: 640px) {
    .pkp_site_name {
        padding: 12px 0;
    }

    .pkp_site_name .is_img img {
        max-height: 68px;
    }

    .pkp_structure_main {
        padding: 15px;
    }

    .pkp_page_index .homepage_about,
    .pkp_page_index .journal-description {
        min-height: 0;
        padding: 28px 22px;
        border-radius: 14px;
    }

    .ns-quick-facts {
        grid-template-columns: 1fr;
    }

    .obj_announcement_summary,
    .obj_issue_summary,
    .obj_article_summary {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }

    .ns-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Negah Shahrvand Header Fix v1.1 ===== */

.pkp_structure_head {
    overflow: hidden !important;
}

.pkp_structure_head::before,
.pkp_structure_head::after {
    display: none !important;
}

.pkp_head_wrapper {
    max-width: 1280px !important;
    padding-right: 24px !important;
    padding-left: 24px !important;
}

.pkp_site_name {
    padding-top: 12px !important;
    padding-bottom: 10px !important;
}

.pkp_site_name .is_img img {
    max-width: 190px !important;
    max-height: 75px !important;
}

.pkp_navigation_primary_wrapper {
    display: flex !important;
    direction: rtl !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 0 18px !important;
    margin: 0 !important;
    background: rgba(25, 93, 142, 0.78) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.pkp_navigation_primary {
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
}

.pkp_navigation_primary > li > a {
    padding: 15px 11px !important;
}

.pkp_navigation_search_wrapper {
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pkp_structure_content {
    padding-top: 26px !important;
}

@media (max-width: 991px) {
    .pkp_head_wrapper {
        padding-right: 14px !important;
        padding-left: 14px !important;
    }

    .pkp_navigation_primary_wrapper {
        display: block !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .pkp_site_name .is_img img {
        max-height: 62px !important;
    }
}

