/*
Theme Name: SayangSabah News
Theme URI: https://sayangsabah.com.my/
Author: SayangSabah / ChatGPT conversion
Description: Custom WordPress news theme converted from the SayangSabah Blogger layout. Built for Gutenberg, fast news publishing, ticker, popular posts, article layout and social follow widget.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: sayangsabah
*/

:root {
  --ss-red:#e60000;
  --ss-blue:#032966;
  --ss-dark:#111;
  --ss-text:#333;
  --ss-muted:#777;
  --ss-border:#e5e5e5;
  --ss-bg:#f8fafc;
  --ss-white:#fff;
  --ss-container:1060px;
  --ss-header-height:72px;
}

* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  margin:0;
  background:var(--ss-bg);
  color:var(--ss-text);
  font-family:Inter, Arial, sans-serif;
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
a { color:inherit; text-decoration:none; }
a:hover { color:var(--ss-red); }
img { max-width:100%; height:auto; display:block; }

.ss-container {
  width:min(var(--ss-container), calc(100% - 32px));
  margin-inline:auto;
}

.ss-top-ticker {
  position:relative;
  z-index:3000;
  display:flex;
  align-items:center;
  height:34px;
  overflow:hidden;
  background:#242424;
  color:#fff;
  font-family:Georgia, 'Times New Roman', serif;
}
.ss-top-ticker.is-fixed {
  position:fixed;
  top:0;
  left:0;
  right:0;
}
.ss-top-label {
  flex:0 0 auto;
  height:100%;
  display:flex;
  align-items:center;
  padding:0 16px;
  color:#ff2a2a;
  font-size:14px;
  font-weight:700;
  white-space:nowrap;
}
.ss-top-marquee {
  flex:1;
  height:100%;
  overflow:hidden;
  display:flex;
  align-items:center;
  transform:translateZ(0);
}
.ss-top-track {
  display:inline-flex;
  align-items:center;
  gap:64px;
  width:max-content;
  min-width:max-content;
  white-space:nowrap;
  will-change:transform;
  transform:translate3d(0,0,0);
}
.ss-top-track a {
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  height:100%;
  color:#fff;
  font-size:14px;
  white-space:nowrap;
}
.ss-top-track .ss-cat {
  color:#ff2a2a;
  margin-right:6px;
}
.ss-top-track .ss-sep {
  color:#fff;
  opacity:.9;
  margin-right:8px;
}

.site-header {
  position:sticky;
  top:0;
  z-index:2900;
  min-height:var(--ss-header-height);
  background:#fff;
  box-shadow:0 1px 5px rgba(0,0,0,.08);
}
body.ss-ticker-active .site-header {
  top:34px;
}
.header-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:var(--ss-header-height);
  gap:24px;
}
.site-logo {
  display:flex;
  align-items:center;
  min-width:0;
}
.site-logo img {
  max-height:42px;
  width:auto;
}
.site-title {
  font-weight:800;
  font-size:24px;
  color:#111;
}
.main-navigation {
  display:flex;
  align-items:center;
  gap:18px;
  margin-left:auto;
}
.main-navigation ul {
  display:flex;
  align-items:center;
  gap:18px;
  margin:0;
  padding:0;
  list-style:none;
}
.main-navigation a {
  font-size:15px;
  font-weight:700;
  color:#1e293b;
}
.menu-toggle {
  display:none;
  width:40px;
  height:40px;
  align-items:center;
  justify-content:center;
  border:0;
  background:#f1f1f1;
  color:#111;
  font-size:22px;
  cursor:pointer;
}

.site-main {
  padding:32px 0;
}
.content-layout {
  display:grid;
  grid-template-columns:minmax(0, 1fr) 300px;
  gap:32px;
  align-items:start;
}
.no-sidebar .content-layout {
  grid-template-columns:1fr;
}

.section-title {
  display:inline-flex;
  align-items:center;
  background:linear-gradient(to right, #c90000, #e60000);
  color:#fff;
  font-size:20px;
  font-weight:900;
  text-transform:uppercase;
  line-height:1.75;
  padding:0 10px;
  margin:0 0 24px;
}

.post-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
}
.post-card {
  background:#fff;
  border-radius:8px;
  overflow:hidden;
  box-shadow:0 1px 5px rgba(0,0,0,.06);
  transition:transform .18s ease;
}
.post-card:hover {
  transform:translateY(-3px);
}
.post-card-thumb {
  aspect-ratio:16/10;
  overflow:hidden;
  background:#e5e7eb;
}
.post-card-thumb img {
  width:100%;
  height:100%;
  object-fit:cover;
}
.post-card-body {
  padding:16px;
}
.entry-category {
  display:inline-block;
  color:var(--ss-red);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  margin-bottom:8px;
}
.post-card-title {
  margin:0 0 8px;
  font-size:20px;
  line-height:1.15;
  font-weight:800;
  color:#111;
}
.entry-meta {
  color:var(--ss-muted);
  font-size:13px;
}
.entry-summary {
  margin:10px 0 0;
  color:#555;
  font-size:15px;
}

.single-article {
  background:#fff;
  border-radius:8px;
  box-shadow:0 1px 5px rgba(0,0,0,.06);
  padding:24px;
}
.single-article .entry-title {
  margin:0 0 12px;
  color:#111;
  font-size:36px;
  line-height:1.08;
  letter-spacing:-.03em;
  font-weight:900;
}
.single-article .entry-meta {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-bottom:18px;
}
.single-article .post-thumbnail {
  margin:0 0 20px;
  border-radius:8px;
  overflow:hidden;
}
.entry-content {
  font-family:Georgia, 'Times New Roman', serif;
  font-size:18px;
  line-height:1.75;
  color:#222;
}
.entry-content p {
  margin:0 0 1.4em;
}
.entry-content h2,
.entry-content h3 {
  line-height:1.25;
  margin:1.5em 0 .7em;
}
.entry-content blockquote {
  margin:1.5em 0;
  padding:18px 22px;
  border-left:4px solid var(--ss-red);
  background:#f7f7f7;
}

.inline-share {
  display:flex;
  gap:8px;
  margin:12px 0 20px;
  padding:0;
  list-style:none;
}
.inline-share a {
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  color:#fff;
  background:#111;
  font-size:13px;
  font-weight:800;
}
.inline-share .wa { background:#22bfa6; }
.inline-share .fb { background:#2f6da8; }
.inline-share .x { background:#000; }
.inline-share .mail { background:#222; }

.sidebar .widget {
  background:#fff;
  border-radius:8px;
  box-shadow:0 1px 5px rgba(0,0,0,.06);
  padding:18px;
  margin-bottom:20px;
}
.sidebar .widget-title {
  display:inline-flex;
  align-items:center;
  background:linear-gradient(to right, #032966, #0045b5);
  color:#fff;
  font-size:18px;
  font-weight:900;
  text-transform:uppercase;
  line-height:1.75;
  padding:0 10px;
  margin:0 0 16px;
}
.sidebar ul {
  margin:0;
  padding:0;
  list-style:none;
}
.sidebar li + li {
  border-top:1px solid var(--ss-border);
  padding-top:12px;
  margin-top:12px;
}

.ss-article-popular {
  display:none;
  background:#fff;
  border-top:1px solid #d9d9d9;
  border-bottom:1px solid #d9d9d9;
  overflow:hidden;
}
.ss-article-popular-inner {
  position:relative;
  min-height:82px;
  padding:8px 62px 8px 14px;
}
.ss-article-popular-title {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:25px;
  min-width:116px;
  padding:0 10px;
  border:1px solid #d9d9d9;
  border-top:0;
  font-size:11px;
  font-weight:800;
  color:#111;
  background:#fff;
}
.ss-article-popular-item {
  display:none;
  grid-template-columns:88px 1fr;
  gap:12px;
  align-items:center;
  min-height:66px;
}
.ss-article-popular-item.is-active {
  display:grid;
}
.ss-article-popular-item img {
  width:88px;
  height:66px;
  object-fit:cover;
  background:#e5e7eb;
}
.ss-article-popular-copy .cat {
  color:#e60000;
  font-family:Georgia, 'Times New Roman', serif;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}
.ss-article-popular-copy h3 {
  margin:2px 0 0;
  color:#111;
  font-family:Georgia, 'Times New Roman', serif;
  font-size:15px;
  line-height:1.08;
}
.ss-pop-nav {
  position:absolute;
  right:9px;
  width:32px;
  height:32px;
  border:0;
  border-radius:50%;
  background:#ef1824;
  color:#fff;
  cursor:pointer;
}
.ss-pop-next { top:8px; }
.ss-pop-prev { top:48px; }

#ss-social-follow-card {
  position:fixed;
  right:0;
  bottom:100px;
  z-index:99999;
  display:flex;
  flex-direction:row-reverse;
  align-items:stretch;
  gap:0;
  padding:0;
  background:transparent;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  overflow:visible;
  transition:opacity .22s ease, visibility .22s ease;
}
#ss-social-follow-card.show {
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
#ss-social-follow-card .ss-social-icons {
  display:flex;
  flex-direction:column;
  width:40px;
  min-width:40px;
  height:160px;
  overflow:hidden;
  border-radius:14px 0 0 14px;
  box-shadow:0 5px 14px rgba(0,0,0,.12);
}
#ss-social-follow-card .ss-social-icon {
  display:flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  color:#fff;
  font-size:13px;
  font-weight:900;
}
#ss-social-follow-card .facebook { background:#4267B2; }
#ss-social-follow-card .tiktok { background:#000; }
#ss-social-follow-card .instagram { background:linear-gradient(135deg,#feda75 0%,#fa7e1e 25%,#d62976 55%,#962fbf 78%,#4f5bd5 100%); }
#ss-social-follow-card .whatsapp { background:#25D366; }
#ss-social-follow-card .ss-follow-label {
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  width:27px;
  min-width:27px;
  height:160px;
  padding:25px 2px 5px;
  background:rgba(255,255,255,.94);
  box-shadow:0 5px 14px rgba(0,0,0,.08);
  overflow:hidden;
}
#ss-social-follow-card .ss-follow-logo-wrap {
  display:flex;
  align-items:center;
  justify-content:center;
  width:17px;
  height:78px;
  margin:0 0 2px;
  overflow:visible;
}
#ss-social-follow-card .ss-follow-logo-img {
  display:block;
  width:69px;
  max-width:none;
  height:auto;
  transform:rotate(-90deg);
  transform-origin:center center;
}
#ss-social-follow-card .ss-follow-word {
  display:block;
  writing-mode:vertical-rl;
  text-orientation:mixed;
  transform:rotate(180deg);
  font-family:Arial,sans-serif;
  font-size:.54rem;
  font-weight:900;
  line-height:1;
  color:#111;
  white-space:nowrap;
}
#ss-social-follow-card .ss-social-close {
  position:absolute;
  top:3px;
  right:3px;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:center;
  width:14px;
  height:14px;
  background:#d9d9d9;
  color:#fff;
  font-size:.72rem;
  line-height:1;
  cursor:pointer;
}

.site-footer {
  background:#171717;
  color:#f8fafc;
  padding:32px 0;
  margin-top:32px;
}
.site-footer a { color:#fff; }

@media (max-width: 900px) {
  .content-layout {
    grid-template-columns:1fr;
  }
  .post-grid {
    grid-template-columns:1fr;
  }
  .main-navigation {
    display:none;
    position:absolute;
    top:var(--ss-header-height);
    left:0;
    right:0;
    background:#fff;
    border-top:1px solid var(--ss-border);
    box-shadow:0 6px 12px rgba(0,0,0,.08);
    padding:12px 16px;
  }
  .main-navigation.is-open {
    display:block;
  }
  .main-navigation ul {
    display:block;
  }
  .main-navigation li + li {
    margin-top:10px;
  }
  .menu-toggle {
    display:flex;
  }
}

@media (max-width: 767px) {
  :root {
    --ss-header-height:64px;
  }
  body.ss-ticker-active .site-header {
    top:32px;
  }
  .ss-top-ticker {
    height:32px;
  }
  .ss-top-label,
  .ss-top-track a {
    font-size:12px;
  }
  .site-logo img {
    max-height:34px;
  }
  .site-main {
    padding:18px 0;
  }
  .single-article {
    padding:16px;
    border-radius:0;
  }
  .single-article .entry-title {
    font-size:29px;
  }
  .entry-content {
    font-size:17px;
    line-height:1.68;
  }
  .ss-article-popular {
    display:block;
    position:sticky;
    top:calc(32px + var(--ss-header-height));
    z-index:2500;
  }
}
