/* ============================================================
   Spark — sparkHome theme stylesheet
   Loaded only while the "Spark Publisher Home" theme is active.
   All rules are scoped to the publisher site via
   body:has(.pkp_site_name img[src*="public/site/"]) so they never
   affect individual journals. Global/shared styles live in the
   site stylesheet (public/site/styleSheet.css).
   ============================================================ */

/* ---------- Publisher: layout ---------- */
body:has(.pkp_site_name img[src*="public/site/"]) {
  background: #fff3e0;
}

body:has(.pkp_site_name img[src*="public/site/"]) .pkp_structure_content {
  width: 100% !important;
  max-width: 1200px;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

body:has(.pkp_site_name img[src*="public/site/"]) .pkp_structure_main {
  float: none !important;
  width: 100% !important;
  padding: 0 !important;
}

body:has(.pkp_site_name img[src*="public/site/"]) .pkp_structure_main::before,
body:has(.pkp_site_name img[src*="public/site/"]) .pkp_structure_main::after {
  display: none !important;
}

body:has(.pkp_site_name img[src*="public/site/"]) .pkp_structure_sidebar {
  display: none !important;
}

/* ---------- Publisher: header / logo ---------- */
body:has(.pkp_site_name img[src*="public/site/"]) .pkp_structure_head {
  background: #fff;
  border-bottom: 1px solid #ffe0b2;
}

body:has(.pkp_site_name img[src*="public/site/"]) .pkp_site_name .is_img img {
  max-height: 70px;
  width: auto;
}

@media (max-width: 767px) {
  body:has(.pkp_site_name img[src*="public/site/"]) .pkp_site_name .is_img img {
    max-height: 42px;
  }

  body:has(.pkp_site_name img[src*="public/site/"]) .pkp_site_name::before {
    background-size: 28% auto !important;
  }
}

@media (max-width: 480px) {
  body:has(.pkp_site_name img[src*="public/site/"]) .pkp_site_name .is_img img {
    max-height: 34px;
  }

  body:has(.pkp_site_name img[src*="public/site/"]) .pkp_site_name::before {
    background-size: 22% auto !important;
  }
}

/* ---------- Publisher: journals section + heading ---------- */
body:has(.pkp_site_name img[src*="public/site/"]) .journals {
  margin-top: 0;
  padding: 0 0 40px;
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals h2 {
  position: relative;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #14110f;
  text-align: left;
  margin: 0 0 26px;
  padding: 0 0 14px;
  border: none;
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #ffb300, #e65100);
}

/* ---------- Publisher: journal cards grid ---------- */
body:has(.pkp_site_name img[src*="public/site/"]) .journals > ul {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals > ul > li {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border-top: none !important;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #efe6da;
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(20, 17, 15, 0.07);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals > ul > li::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, #ffb300, #e65100);
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals > ul > li:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 52px rgba(20, 17, 15, 0.14);
}

/* thumbnail (optional — some journals may have none) */
body:has(.pkp_site_name img[src*="public/site/"]) .journals .thumb {
  float: none !important;
  width: 100% !important;
  padding: 0 !important;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #fff3e0, #ffe0b2);
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals .thumb a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals .thumb img {
  max-width: 100%;
  max-height: 150px;
  width: auto;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(191, 54, 12, 0.16);
}

/* card body — works with or without a thumbnail */
body:has(.pkp_site_name img[src*="public/site/"]) .journals > ul > li .body {
  float: none !important;
  width: 100% !important;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 20px 22px;
}

/* Fallback thumbnail for a journal whose thumbnail is NOT set in OJS
   (e.g. JSS). Uses the image that already exists in public/journals/1/.
   Remove this once the thumbnail is set in OJS. */
body:has(.pkp_site_name img[src*="public/site/"])
  .journals
  li:not(.has_thumb):has(a[href*="/jss"])
  .body::before {
  content: "";
  display: block;
  height: 170px;
  margin: -20px -20px 20px;
  border-bottom: 1px solid #ffe0b2;
  background-image:
    url("https://sparkjournals.com/public/journals/1/homepageImage_en_US.png"),
    linear-gradient(180deg, #fff3e0, #ffe0b2);
  background-position: center, center;
  background-size: contain, cover;
  background-repeat: no-repeat, no-repeat;
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals h3 {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: #14110f;
  text-align: left;
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals h3 a {
  text-decoration: none;
  color: #14110f;
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals h3 a:hover {
  color: #e65100;
}

/* journal metadata block, appended under the title via --jmeta.
   Cards are targeted by journal path (not by thumbnail image), so the
   block shows even when a journal has no uploaded thumbnail. */
body:has(.pkp_site_name img[src*="public/site/"]) .journals li h3::after {
  content: var(--jmeta, none);
  display: block;
  margin-top: 12px;
  padding: 10px 12px;
  background: #fff8f0;
  border: 1px solid #ffecb3;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.8;
  color: #8d6e63;
  font-weight: 400;
  text-align: left;
  white-space: pre-line;
}

body:has(.pkp_site_name img[src*="public/site/"])
  .journals
  li:has(a[href*="/jss"])
  h3::after {
  --jmeta: "Abbreviation : Int Res J Soc Sci\A ISSN : XXXX-XXXX\A Frequency : Quarterly\A Chief Editor : Dr Mohammad Afsar Alam\A Language : English\A Country of Origin : Philippines\A Published by : Spark Publication";
}

body:has(.pkp_site_name img[src*="public/site/"])
  .journals
  li:has(a[href*="/jms"])
  h3::after {
  --jmeta: "Abbreviation : Int Res J Med Sci\A ISSN : XXXX-XXXX\A Frequency : Quarterly\A Chief Editor : Dr Gayatri Hariharan\A Language : English\A Country of Origin : Philippines\A Published by : Spark Publication";
}

/* card links */
body:has(.pkp_site_name img[src*="public/site/"]) .journals .links {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals .links li {
  display: block !important;
  margin: 0 !important;
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals .links li a {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals .links li.view a {
  background: linear-gradient(90deg, #e65100, #fb8c00);
  color: #ffffff;
}

body:has(.pkp_site_name img[src*="public/site/"])
  .journals
  .links
  li.view
  a:hover {
  background: linear-gradient(90deg, #bf360c, #e65100);
}

body:has(.pkp_site_name img[src*="public/site/"]) .journals .links li.current a {
  background: #ffffff;
  color: #b34700;
  border: 1.5px solid #ffcc80;
}

body:has(.pkp_site_name img[src*="public/site/"])
  .journals
  .links
  li.current
  a:hover {
  background: #fff3e0;
}

/* responsive grid */
@media (max-width: 1199px) {
  body:has(.pkp_site_name img[src*="public/site/"]) .journals > ul {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  body:has(.pkp_site_name img[src*="public/site/"]) .journals > ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  body:has(.pkp_site_name img[src*="public/site/"]) .journals > ul {
    grid-template-columns: 1fr;
  }
}

/* ---------- Publisher homepage: About the Publisher (bento) ----------
   Markup comes from templates/frontend/pages/indexSite.tpl. */
.spark-about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: stretch;
  margin: 44px 0 14px;
}

.sa-main {
  position: relative;
  overflow: hidden;
  padding: 42px 44px;
  background: #ffffff;
  border: 1px solid #efe6da;
  border-radius: 22px;
  box-shadow: 0 22px 48px rgba(20, 17, 15, 0.07);
}

.sa-main::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, #ffb300, #e65100, #bf360c);
}

.sa-kicker {
  margin: 0 0 12px !important;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #e65100;
  text-align: left !important;
}

.sa-title {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #14110f;
  text-align: left;
}

.sa-lead {
  margin: 0 0 24px !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(15.5px, 1.4vw, 18px);
  line-height: 1.8;
  color: #3a332c;
  text-align: left !important;
}

.sa-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.sa-chips li {
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff3e0;
  border: 1px solid #ffd9a8;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b34700;
}

.sa-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
}

.sa-panel {
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  border-radius: 22px;
}

.sa-panel::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -46px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(230, 81, 0, 0.1);
}

.sa-panel h3 {
  position: relative;
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sa-panel p {
  position: relative;
  margin: 0 !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.8;
  text-align: left !important;
}

.sa-vision {
  background: linear-gradient(160deg, #fff7ee, #ffe4c2);
  border: 1px solid #ffd9a8;
}

.sa-vision h3 {
  color: #b34700;
}

.sa-vision p {
  color: #4a3f34;
}

.sa-mission {
  background: linear-gradient(160deg, #1d1815, #2b211b);
  border: 1px solid #2b211b;
}

.sa-mission h3 {
  color: #ffb300;
}

.sa-mission p {
  color: #e9ded0;
}

.sa-mission::after {
  background: rgba(255, 179, 0, 0.14);
}

@media (max-width: 991px) {
  .spark-about {
    grid-template-columns: 1fr;
  }

  .sa-side {
    grid-template-rows: auto auto;
  }
}

@media (max-width: 600px) {
  .sa-main {
    padding: 30px 24px;
  }

  .sa-panel {
    padding: 22px 22px;
  }
}

/* ---------- Publisher footer (from the theme's footer.tpl override) ---------- */
.spark-footer {
  margin-top: 50px;
  background: #3e2723;
  color: #d7b8a5;
  font-family: Georgia, "Times New Roman", serif;
  text-align: left;
}

.sf-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 24px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}

.sf-col {
  flex: 1 1 200px;
}

.sf-brand {
  flex: 1 1 320px;
}

.sf-name {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.sf-tag {
  margin-top: 3px;
  font-size: 12px;
  color: #c9a78f;
}

.sf-desc {
  margin: 16px 0 !important;
  font-size: 14px;
  line-height: 1.8;
  color: #d7b8a5;
  text-align: left !important;
}

.sf-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sf-badges span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(255, 179, 0, 0.14);
  border: 1px solid rgba(255, 179, 0, 0.4);
  font-size: 12px;
  font-weight: 700;
  color: #ffb300;
}

.spark-footer h4 {
  margin: 0 0 16px;
  padding-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.spark-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.spark-footer li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.7;
}

.spark-footer a {
  color: #d7b8a5;
  text-decoration: none;
}

.spark-footer a:hover {
  color: #ffb300;
}

.sf-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

.sf-bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 13px;
  color: #c9a78f;
}
