/*
Theme Name: Sajan ST
Theme URI: https://sajanst.blog
Description: Personal equity research and market education theme for Sajan ST — Index Outlook, Sector Reports, Mutual Funds, Personal Finance, Market Updates, and ETFs.
Author: Sajan ST
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sajanst
Requires at least: 5.0
Requires PHP: 7.4
*/

/* ══════════════════════════════════════════════ RESET & VARS ══ */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }

:root{
  --navy:#0B1628;
  --navy-deep:#080f1c;
  --silver:#C4C8D0;
  --silver-bright:#E4E6EA;
  --silver-mid:#9AA1AD;
  --white:#FFFFFF;
  --card:#FCFCFD;
  --ink:#0B1628;
  --muted:#6B7280;
  --line:#E8E9EC;
}

body{
  font-family:'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color:var(--ink);
  background:var(--white);
  line-height:1.7;
}

a{ color:var(--navy); text-decoration:none; }
a:hover{ color:var(--silver-mid); }
img{ max-width:100%; height:auto; display:block; }

h1,h2,h3,h4{
  font-family:'Fraunces',Georgia,serif;
  font-weight:600;
  color:var(--ink);
  line-height:1.2;
}

/* ══════════════════════════════════════════════ TOPBAR/NAV ══ */
.site-header{
  background:var(--navy);
  border-bottom:2px solid var(--silver);
  position:sticky; top:0; z-index:500;
}
.header-inner{
  max-width:1200px; margin:0 auto; padding:18px 40px;
  display:flex; align-items:center; justify-content:space-between; gap:20px;
}
.site-branding{ text-decoration:none; }
.site-branding .name{
  font-family:'Fraunces',Georgia,serif; font-size:22px; font-weight:600; color:#fff;
}
.site-branding .tagline{
  font-size:11px; color:var(--silver); text-transform:uppercase; letter-spacing:.1em; margin-top:2px;
}
.main-nav ul{ list-style:none; display:flex; gap:26px; flex-wrap:wrap; }
.main-nav a{
  color:rgba(255,255,255,.82); font-size:14px; text-decoration:none;
}
.main-nav a:hover{ color:var(--silver-bright); }
.nav-toggle{ display:none; background:none; border:none; color:#fff; font-size:24px; cursor:pointer; }

/* ══════════════════════════════════════════════ HERO ══ */
.sst-hero{
  background:var(--navy); color:#fff;
  padding:70px 40px; text-align:center;
}
.sst-hero-badge{
  display:inline-block; background:var(--silver-bright); color:var(--navy);
  font-size:12px; padding:4px 14px; border-radius:20px; margin-bottom:16px;
}
.sst-hero h1{
  color:#fff; font-size:clamp(30px,4.5vw,46px); margin-bottom:12px;
}
.sst-hero p{
  color:rgba(255,255,255,.78); font-size:15px; max-width:560px; margin:0 auto;
}

/* ══════════════════════════════════════════════ SUBSCRIBE ══ */
.sst-subscribe{
  background:#F4F5F7; border:1px solid var(--line); border-radius:8px;
  padding:40px; margin:48px auto; max-width:640px; text-align:center;
}
.sst-subscribe h2{ font-size:22px; margin-bottom:8px; }
.sst-subscribe p{ font-size:14px; color:var(--muted); margin-bottom:20px; }
.sst-subscribe-form{ display:flex; gap:10px; max-width:420px; margin:0 auto; flex-wrap:wrap; justify-content:center; }
.sst-subscribe-form input[type=email]{
  flex:1; min-width:220px; padding:11px 14px; border:1px solid var(--line);
  border-radius:6px; font-size:14px; font-family:inherit;
}
.sst-subscribe-form button{
  background:var(--navy); color:#fff; border:none; padding:11px 22px;
  border-radius:6px; font-size:14px; font-weight:500; cursor:pointer; font-family:inherit;
}
.sst-subscribe-form button:hover{ background:var(--navy-deep); }
.sst-subscribe-note{ font-size:11.5px; color:#9AA1AD; margin-top:10px; }

/* Widget-area fallback styling (native Jetpack subscribe widget if used) */
.sst-subscribe .widget{ max-width:420px; margin:0 auto; }

/* ══════════════════════════════════════════════ CATEGORY GRID ══ */
.sst-section{ padding:56px 40px 70px; max-width:1200px; margin:0 auto; }
.sst-section-title{ text-align:center; font-size:clamp(24px,3vw,30px); margin-bottom:36px; }

.sst-grid{
  display:grid; grid-template-columns:repeat(3,1fr); gap:26px;
}
.sst-card{
  background:var(--card); border:1px solid var(--line); border-top:3px solid var(--silver-mid);
  border-radius:8px; padding:28px; transition:transform .2s ease, box-shadow .2s ease;
  text-decoration:none; display:block;
}
.sst-card:hover{ transform:translateY(-5px); box-shadow:0 14px 28px rgba(11,22,40,.1); }
.sst-card-icon{ font-size:26px; margin-bottom:10px; }
.sst-card h3{ font-size:19px; margin-bottom:8px; color:var(--ink); }
.sst-card p{ font-size:13.5px; color:var(--muted); margin-bottom:14px; }
.sst-card-link{ font-size:13.5px; font-weight:500; color:var(--navy); }
.sst-card-link::after{ content:'→'; margin-left:5px; }

/* ══════════════════════════════════════════════ DISCLAIMER ══ */
.sst-disclaimer{
  background:#F4F5F7; border:1px solid var(--line); border-left:4px solid var(--silver-mid);
  border-radius:6px; padding:20px 24px; margin:0 auto 20px; max-width:900px;
}
.sst-disclaimer p{ font-size:12.5px; color:#5B6270; line-height:1.6; margin:0; }
.sst-disclaimer a{ font-weight:500; text-decoration:underline; }

/* ══════════════════════════════════════════════ ARCHIVE / CATEGORY PAGE ══ */
.archive-hero{ background:var(--navy); color:#fff; padding:48px 40px; text-align:center; }
.archive-hero .icon{ font-size:36px; margin-bottom:10px; }
.archive-hero h1{ color:#fff; font-size:clamp(26px,4vw,38px); margin-bottom:10px; }
.archive-hero p{ color:rgba(255,255,255,.78); font-size:14px; }
.breadcrumb{ font-size:12.5px; margin-bottom:16px; }
.breadcrumb a{ color:rgba(255,255,255,.65); }
.breadcrumb a:hover{ color:var(--silver-bright); }
.crumb-sep{ margin:0 8px; color:rgba(255,255,255,.35); }

.articles-grid{
  display:grid; grid-template-columns:repeat(3,1fr); gap:28px;
  max-width:1200px; margin:0 auto; padding:50px 40px 70px;
}
.article-card{
  background:var(--white); border:1px solid var(--line); border-radius:8px; overflow:hidden;
  transition:transform .2s ease, box-shadow .2s ease; display:flex; flex-direction:column;
}
.article-card:hover{ transform:translateY(-5px); box-shadow:0 14px 26px rgba(11,22,40,.08); }
.article-card-img{ height:180px; background-size:cover; background-position:center; background-color:var(--navy); }
.article-card-img.placeholder{ display:flex; align-items:center; justify-content:center; font-size:34px; background:linear-gradient(135deg,var(--navy),var(--navy-deep)); }
.article-card-body{ padding:20px; display:flex; flex-direction:column; flex:1; }
.article-card-meta{ font-size:11.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; margin-bottom:8px; }
.article-card-title{ font-size:17px; margin-bottom:8px; }
.article-card-title a{ color:var(--ink); }
.article-card-excerpt{ font-size:13px; color:var(--muted); margin-bottom:14px; flex:1; }
.article-card-more{ font-size:13px; font-weight:500; color:var(--navy); }
.article-card-more::after{ content:'→'; margin-left:5px; }

.archive-empty{ text-align:center; padding:60px 20px; max-width:460px; margin:0 auto; }
.archive-empty .icon{ font-size:42px; margin-bottom:14px; }
.archive-empty h2{ font-size:22px; margin-bottom:10px; }
.archive-empty p{ font-size:14px; color:var(--muted); margin-bottom:20px; }
.archive-empty a{ display:inline-block; background:var(--navy); color:#fff; padding:11px 22px; border-radius:6px; font-size:13.5px; }

/* ══════════════════════════════════════════════ SINGLE ARTICLE ══ */
.post-hero{ position:relative; background:var(--navy); color:#fff; padding:56px 40px 46px; overflow:hidden; }
.post-hero-bg{ position:absolute; inset:0; background-size:cover; background-position:center; }
.post-hero-overlay{ position:absolute; inset:0; background:linear-gradient(180deg,rgba(11,22,40,.88),rgba(11,22,40,.78)); }
.post-hero-inner{ position:relative; z-index:2; max-width:780px; margin:0 auto; }
.post-hero-cat{ display:inline-block; font-size:12px; color:var(--silver-bright); border:1px solid rgba(196,200,208,.4); padding:5px 12px; border-radius:2px; margin-bottom:16px; }
.post-hero h1{ color:#fff; font-size:clamp(26px,4.2vw,40px); margin-bottom:16px; }
.post-hero-meta{ font-size:13px; color:rgba(255,255,255,.68); }
.meta-dot{ margin:0 8px; color:rgba(255,255,255,.4); }

.post-content-wrap{ max-width:720px; margin:0 auto; padding:50px 40px; }
.post-content{ font-size:16px; }
.post-content p{ margin-bottom:20px; }
.post-content h2{ font-size:24px; margin:36px 0 14px; }
.post-content h3{ font-size:19px; margin:28px 0 12px; }
.post-content ul,.post-content ol{ margin:0 0 20px 22px; }
.post-content li{ margin-bottom:6px; }
.post-content blockquote{ border-left:3px solid var(--silver-mid); padding:4px 0 4px 20px; margin:24px 0; font-style:italic; color:var(--muted); }
.post-content img{ border-radius:6px; margin:24px 0; }

.related-section{ background:#F9FAFB; padding:50px 40px 70px; }
.related-inner{ max-width:1200px; margin:0 auto; }
.related-title{ font-size:24px; margin-bottom:28px; }
.related-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }

/* ══════════════════════════════════════════════ FOOTER ══ */
.site-footer{ background:var(--navy); color:#fff; padding:50px 40px 26px; }
.footer-inner{ max-width:1200px; margin:0 auto; }
.footer-top{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:24px; margin-bottom:30px; }
.footer-brand .name{ font-family:'Fraunces',Georgia,serif; font-size:19px; margin-bottom:4px; }
.footer-brand .tag{ font-size:12px; color:rgba(255,255,255,.6); }
.footer-links{ display:flex; gap:24px; flex-wrap:wrap; }
.footer-links a{ font-size:13px; color:rgba(255,255,255,.72); }
.footer-links a:hover{ color:var(--silver-bright); }
.footer-copy{ border-top:1px solid rgba(196,200,208,.15); padding-top:20px; font-size:12px; color:rgba(255,255,255,.55); text-align:center; }

/* ══════════════════════════════════════════════ RESPONSIVE ══ */
@media (max-width:1024px){
  .sst-grid, .articles-grid, .related-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:768px){
  .header-inner{ padding:14px 20px; }
  .main-nav{ display:none; }
  .nav-toggle{ display:block; }
  .sst-hero{ padding:46px 20px; }
  .sst-section{ padding:40px 20px 50px; }
  .archive-hero{ padding:36px 20px; }
  .articles-grid{ padding:40px 20px 50px; }
  .post-hero{ padding:40px 20px; }
  .post-content-wrap{ padding:40px 20px; }
  .related-section{ padding:40px 20px; }
  .footer-top{ flex-direction:column; }
}
@media (max-width:640px){
  .sst-grid, .articles-grid, .related-grid{ grid-template-columns:1fr; }
  .sst-subscribe{ padding:28px 20px; margin:32px 16px; }
}
/* ═══════════════════════════════════════════════════════════════
   ADD-ON (v1.1): Hero background image support
   Add this to the END of your theme's style.css (via Theme File Editor)
   ═══════════════════════════════════════════════════════════════ */

.sst-hero{ position:relative; overflow:hidden; }
.sst-hero-content{ position:relative; z-index:2; }

.sst-hero-has-image .sst-hero-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(11,22,40,.82) 0%, rgba(11,22,40,.72) 100%);
  z-index:1;
}
/* ═══════════════════════════════════════════════════════════════
   ADD-ON (v1.2): Mobile menu fix
   Add this to the END of your theme's style.css (via Theme File Editor)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width:768px){
  .site-header{ position:sticky; }

  .main-nav.nav-open{
    display:block;
    position:absolute;
    top:100%;
    left:0;
    right:0;
    background:var(--navy);
    border-top:1px solid rgba(196,200,208,.2);
    padding:8px 20px 16px;
    box-shadow:0 12px 24px rgba(0,0,0,.25);
  }

  .main-nav.nav-open ul{
    flex-direction:column;
    gap:0;
  }

  .main-nav.nav-open ul li{
    border-bottom:1px solid rgba(255,255,255,.08);
  }

  .main-nav.nav-open ul li a{
    display:block;
    padding:13px 0;
  }
}
/* ═══════════════════════════════════════════════════════════════
   ADD-ON (v1.3): Footer contact details + LinkedIn icon
   Add this to the END of your theme's style.css (via Theme File Editor)
   ═══════════════════════════════════════════════════════════════ */

.footer-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  flex-wrap:wrap;
  gap:32px;
}

.footer-contact{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:12px;
}

.footer-contact-item{
  display:flex;
  align-items:center;
  gap:9px;
  font-size:13.5px;
  color:rgba(255,255,255,.78);
}

.footer-contact-item:hover{
  color:var(--silver-bright);
}

.footer-contact-item svg{
  width:16px;
  height:16px;
  fill:var(--silver);
  flex-shrink:0;
}

.footer-linkedin{
  display:flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  background:#0A66C2;
  border-radius:6px;
  margin-top:4px;
  transition:opacity .2s ease;
}

.footer-linkedin:hover{
  opacity:.85;
}

.footer-linkedin svg{
  width:18px;
  height:18px;
  fill:#ffffff;
}

@media (max-width:768px){
  .footer-top{
    flex-direction:column;
    gap:26px;
  }
}
