
/* =========================================================
   OJS 3.5 — Elegant Responsive Theme (Sky Blue & Gold)
   with Header/Title/Menu/Submenu fixes for TJSBR
   Author: ChatGPT
   ========================================================= */

/* ===== Brand tokens ===== */
:root{
  --brand:#38BDF8;       /* sky blue */
  --brand-2:#0EA5E9;     /* deeper sky */
  --accent:#D4AF37;      /* gold */
  --text:#0f172a;        /* slate-900 */
  --muted:#64748b;       /* slate-500 */
  --paper:#ffffff;
  --soft:#f8fafc;        /* slate-50 */
  --ring:#93c5fd;        /* focus ring */
  --radius:16px;
  --container:1100px;
}

/* ===== Containers ===== */
.pkp_structure_main,
.pkp_head_wrapper .pkp_site_name_wrapper,
.pkp_navigation_primary_wrapper,
.pkp_structure_footer > .pkp_contain{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== Base typography ===== */
body{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a{ color: var(--brand-2); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* ===== Header / Navbar ===== */
.pkp_head_wrapper{
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #eaf6ff;
  border-bottom: none;
  position: sticky; top: 0; z-index: 3000;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}
@supports (backdrop-filter: blur(6px)){
  .pkp_head_wrapper{
    backdrop-filter: saturate(1.2) blur(6px);
    background: linear-gradient(180deg, rgba(56,189,248,.92), rgba(14,165,233,.92));
  }
}
.pkp_site_name_wrapper { display:flex; align-items:center; gap:1rem; }
.pkp_site_name img { max-height: 64px; width: auto; border-radius: 8px; }

/* Journal name styling */
.pkp_site_name a,
.pkp_site_name h1,
.pkp_site_name .site-name,
.pkp_site_name .pkp_site_name_text,
.pkp_site_name a.pkp_site_name_title{
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: .3px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
  margin: 0;
}

/* Force title visible even if theme hides it when logo exists */
.pkp_site_name .is_text,
.pkp_site_name .site-name,
.pkp_site_name .pkp_site_name_text,
.pkp_site_name h1,
.pkp_site_name a.pkp_site_name_title{
  display:inline !important; visibility:visible !important; opacity:1 !important;
}

/* Fallback injection of full title if only logo renders */
.pkp_site_name:has(img)::after {
  content: "Timorese Journal of Social & Business Research (TJSBR)";
  display: inline-block; margin-left: .75rem;
  font-weight: 800; font-size: 1.2rem; color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
@supports not (selector(:has(*))) {
  .pkp_site_name > a:first-child::after {
    content: "Timorese Journal of Social & Business Research (TJSBR)";
    display: inline-block; margin-left: .75rem;
    font-weight: 800; font-size: 1.2rem; color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
  }
}

/* ===== Primary menu bar with better contrast ===== */
.pkp_navigation_primary_wrapper {
  background: linear-gradient(180deg, rgba(14, 65, 105, .96), rgba(14, 65, 105, .96));
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(0,0,0,.15);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.pkp_navigation_primary ul { gap: .25rem; padding: .35rem 0; }
.pkp_navigation_primary a{
  color: #ffffff !important;
  font-weight: 600;
  padding: .55rem .85rem;
  border-radius: 999px;
  transition: background .2s ease, transform .12s ease, box-shadow .2s ease;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
.pkp_navigation_primary a:hover,
.pkp_navigation_primary .current a,
.pkp_navigation_primary .current{
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 0 0 2px rgba(212,175,55,.55);
  transform: translateY(-1px);
}

/* ===== Submenu dropdown contrast & legibility ===== */
.pkp_navigation_primary li { position: relative; }
.pkp_navigation_primary li ul{
  background: #ffffff;
  border: 1px solid rgba(14, 65, 105, .18);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(2, 6, 23, .18);
  padding: .4rem;
  min-width: 240px;
  z-index: 4000;
}
.pkp_navigation_primary li ul li a{
  display:block;
  color:#0f172a !important;
  font-weight:500;
  padding:.6rem .8rem;
  border-radius:.5rem;
  text-decoration:none;
  text-shadow:none;
}
.pkp_navigation_primary li ul li a:hover,
.pkp_navigation_primary li ul li a:focus{
  background: linear-gradient(180deg, rgba(56,189,248,.12), rgba(14,165,233,.12));
  box-shadow: inset 0 0 0 2px rgba(212,175,55,.45);
  color:#0f172a !important;
}
.pkp_navigation_primary li ul li.separator{ height:1px; background:rgba(14,65,105,.15); margin:.35rem; }

/* ===== Homepage Hero ===== */
.pkp_page_index .page_index_main{
  background:
    radial-gradient(900px 380px at 15% -10%, rgba(255,255,255,.28), rgba(255,255,255,0)),
    linear-gradient(180deg, var(--soft) 0%, #fff 100%);
  padding: 2.25rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(15,23,42,.06);
  border: 1px solid rgba(212,175,55,.18);
}

/* ===== Responsive grids ===== */
.cmp_article_list, .cmp_issue_toc{
  display: grid; gap: 1rem; grid-template-columns: repeat(12, minmax(0, 1fr));
}
.cmp_article_list > .obj_article_summary,
.cmp_issue_toc > .cmp_issue_toc__item{ grid-column: span 12; }
@media (min-width:640px){
  .cmp_article_list > .obj_article_summary,
  .cmp_issue_toc > .cmp_issue_toc__item{ grid-column: span 6; }
}
@media (min-width:1024px){
  .cmp_article_list > .obj_article_summary,
  .cmp_issue_toc > .cmp_issue_toc__item{ grid-column: span 4; }
}

/* ===== Cards ===== */
.obj_article_summary, .cmp_issue_toc__item, .obj_issue_toc .galleys>li{
  background: var(--paper);
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 28px rgba(15,23,42,.04);
  transition: box-shadow .18s ease, transform .14s ease, border-color .18s ease;
}
.obj_article_summary:hover, .cmp_issue_toc__item:hover{
  transform: translateY(-2px); border-color:#cbd5e1; box-shadow: 0 14px 38px rgba(15,23,42,.08);
}
.obj_article_summary .title a{
  font-weight:700; letter-spacing:.2px;
  border-left:4px solid var(--accent); padding-left:.55rem;
}
.obj_article_summary .meta, .obj_article_summary .authors{ color: var(--muted); font-size: .94rem; }

/* ===== Buttons ===== */
.pkp_button, .cmp_button, .obj_galley_link{
  background: var(--brand-2);
  color:#fff !important;
  border-radius:999px; border: none; padding:.6rem 1rem;
  box-shadow: 0 8px 20px rgba(14,165,233,.25);
  transition: transform .1s ease, opacity .2s ease, box-shadow .2s ease;
  position: relative; overflow: hidden;
}
.pkp_button:hover, .cmp_button:hover, .obj_galley_link:hover{
  opacity:.96; transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(14,165,233,.3);
}
.pkp_button::after, .cmp_button::after, .obj_galley_link::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  box-shadow: inset 0 0 0 2px rgba(212,175,55,.55); border-radius:999px; opacity:.0; transition:opacity .2s ease;
}
.pkp_button:hover::after, .cmp_button:hover::after, .obj_galley_link:hover::after{ opacity:1; }

/* ===== Forms ===== */
input[type="text"], input[type="email"], input[type="search"], input[type="password"],
textarea, select{
  border-radius: 12px; border: 1px solid #dbe2ea; padding: .6rem .75rem; background:#fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, textarea:focus, select:focus{
  outline: none; border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(147,197,253,.45);
}

/* ===== Tables ===== */
table{ border-collapse: separate; border-spacing:0; width:100%; }
thead th{
  background: linear-gradient(180deg, rgba(212,175,55,.12), rgba(212,175,55,.06));
  color:#0f172a; font-weight:600;
  border-bottom:1px solid #e5e7eb;
}
th, td{ border-bottom:1px solid #e5e7eb; padding:.7rem .6rem; }
tr:hover td{ background:#f8fafc; }

/* ===== Pagination ===== */
.cmp_pagination{ display:flex; gap:.5rem; flex-wrap:wrap; }
.cmp_pagination .current, .cmp_pagination a{
  border:1px solid #dbe2ea; border-radius:999px; padding:.45rem .8rem; text-decoration:none;
}
.cmp_pagination .current{
  background: var(--accent); color:#1f2937; border-color: transparent; font-weight: 600;
}

/* ===== Article Page ===== */
.pkp_page_article .obj_article_details .item > h2{
  font-size:1.12rem; border-left:4px solid var(--accent); padding-left:.6rem; margin-top:1rem;
}
.pkp_page_article .main_entry{ font-size:1.06rem; }
.pkp_page_article .galleys_links li a{ background: var(--brand-2); }
.pkp_page_article .galleys_links li a:hover{ box-shadow: 0 0 0 2px rgba(212,175,55,.55) inset; }

/* ===== Footer ===== */
.pkp_structure_footer_wrapper{
  background:#0b1220; color:#cbd5e1; border-top:0; margin-top:2rem;
  background-image: linear-gradient(180deg, #0b1220, #0b1220),
                    radial-gradient(circle at 10% -10%, rgba(56,189,248,.25), rgba(56,189,248,0)),
                    radial-gradient(circle at 90% 110%, rgba(212,175,55,.18), rgba(212,175,55,0));
  background-blend-mode: screen, normal, normal;
}
.pkp_structure_footer a{ color:#93c5fd; }
.pkp_structure_footer a:hover{ color:#bfdbfe; }

/* ===== Accessibility ===== */
:focus-visible{ outline: none; box-shadow: 0 0 0 3px rgba(147,197,253,.6); border-radius:10px; }
@media (prefers-reduced-motion: reduce){ *{ transition:none !important; animation:none !important; } }

/* ===== Extra responsiveness ===== */
@media (max-width: 992px){
  .pkp_navigation_primary, .pkp_navigation_user{ font-size:.95rem; }
  .obj_article_summary, .cmp_issue_toc__item{ padding: .9rem 1rem; }
}
@media (max-width: 640px){
  .pkp_site_name_wrapper { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .pkp_site_name img { max-height: 48px; }
  .pkp_site_name a { font-size: 1.1rem; }
  .pkp_navigation_primary_wrapper { padding-left:.75rem; padding-right:.75rem; }
}
