/* ========== This is style for the commentary page, for example ../perspectives/pakistan-forest-plantations-from-space/ ========= */

:root{
  --ink:#18352f;
  --muted:#60736e;
  --accent:#2f7d67;
  --accent2:#dcefe8;
  --paper:#ffffff;
  --soft:#f4f8f6;
  --line:#dce7e2;
  --gold:#b48a45;
  --shadow:0 12px 34px rgba(24,53,47,.08);
}
*{box-sizing:border-box}
html,body{overflow-x:hidden;max-width:100%;}
body{
  margin:0;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  color:var(--ink);
  background:linear-gradient(180deg,#f3f8f6 0,#fff 42%);
  line-height:1.75;
  padding-top:84px; /* Prevents content from hiding behind fixed header */
}
.wrap{max-width:850px;margin:auto;padding:28px 22px 60px}

/* ========== FIXED HEADER (ALWAYS VISIBLE) ========= */
.site-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:10000;
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
  box-shadow:0 4px 20px rgba(24,53,47,.06);
}
.nav-inner{
  max-width:1050px;
  margin:0 auto;
  padding:0 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:64px;
  gap:12px;
}
.nav-brand{
  font-weight:800;
  font-size:17px;
  color:var(--ink);
  text-decoration:none;
  letter-spacing:-.02em;
}
.nav-brand span{color:var(--accent)}
.nav-links{
  display:flex;
  align-items:center;
  gap:4px;
  list-style:none;
  margin:0;
  padding:0;
}
.nav-links a{
  text-decoration:none;
  color:var(--muted);
  font-size:13px;
  font-weight:600;
  padding:8px 10px;
  border-radius:999px;
  transition:all .22s ease;
  white-space:nowrap;
}
.nav-links a:hover,
.nav-links a.active{
  color:var(--accent);
  background:var(--accent2);
}
.nav-toggle{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  padding:8px;
}
.nav-toggle span{
  display:block;
  width:22px;
  height:2px;
  background:var(--ink);
  margin:5px 0;
  transition:.3s;
}

@media(max-width:900px){
  .nav-toggle{display:block}
  .nav-links{
    position:fixed;
    top:64px;
    left:0;
    right:0;
    background:#fff;
    flex-direction:column;
    align-items:stretch;
    padding:12px 16px 24px;
    gap:4px;
    border-bottom:1px solid var(--line);
    box-shadow:0 12px 30px rgba(24,53,47,.1);
    transform:translateY(-120%);
    opacity:0;
    pointer-events:none;
    transition:all .3s ease;
  }
  .nav-links.open{
    transform:translateY(0);
    opacity:1;
    pointer-events:auto;
  }
  .nav-links a{
    padding:14px 16px;
    border-radius:12px;
  }
}

/* ========== ARTICLE / PERSPECTIVE STYLING ========= */
.article-header{
  margin:20px 0 28px;
  text-align:left;
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  font-size:.72rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-weight:800;
  color:var(--accent);
  background:var(--accent2);
  border:1px solid #c5e4d5;
  border-radius:999px;
  padding:6px 12px;
  margin-bottom:14px;
}
h1{
  font-size:clamp(30px, 4.5vw, 44px);
  line-height:1.15;
  margin:0 0 16px;
  letter-spacing:-.025em;
  color:var(--ink);
}
.article-meta-info{
  font-size:13.5px;
  color:var(--muted);
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}
.author-link{
  background:none;
  border:0;
  padding:0;
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:3px;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}
.author-link:hover{color:#1b4a3d;}

/* Author Modal Dialog with Colored Logos & Brand Buttons */
.author-dialog {
  border: 1px solid #d6e7db;
  border-radius: 20px;
  max-width: min(520px, calc(100% - 32px));
  padding: 30px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  color: var(--ink);
  background: #fff;
}
.author-dialog::backdrop { background: rgba(7, 28, 23, 0.65); backdrop-filter: blur(3px); }
.author-dialog h2 { margin: 0 0 4px 0; font-size: 22px; }
.author-dialog .author-role { font-size: 13.5px; color: var(--accent); font-weight: 700; margin-bottom: 12px; }
.author-dialog p { line-height: 1.65; color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.author-close { float: right; border: 0; background: var(--accent2); color: var(--accent); border-radius: 50%; width: 32px; height: 32px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: background .2s; }
.author-close:hover { background: #cfe9df; }

/* Grid layout for brand links with official colors */
.author-social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.author-social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
}
.author-social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}
.author-social-btn .social-icon-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.author-social-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Brand specific hover and border accents */
.author-social-btn.web:hover { border-color: #0f766e; color: #0f766e; }
.author-social-btn.orcid:hover { border-color: #A6CE39; color: #588300; }
.author-social-btn.researchgate:hover { border-color: #00CCBB; color: #008f82; }
.author-social-btn.linkedin:hover { border-color: #0a66c2; color: #0a66c2; }
.author-social-btn.x-twitter:hover { border-color: #000000; color: #000000; }
.author-social-btn.scholar:hover { border-color: #4285F4; color: #1a73e8; }

/* Story / Commentary Card Highlight */
.story-commentary-card {
  background: linear-gradient(135deg, #14332c, #2f7d67);
  color: #fff;
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}
.story-commentary-card h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.story-commentary-card p {
  margin: 0;
  font-size: 14.5px;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}

.article-content {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}
.article-content h2 {
  font-size: 22px;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.article-content a { color:var(--accent); text-decoration:underline; text-underline-offset:3px; font-weight:600; }
.article-content a:hover { color:#174d3d; }
.article-content p {
  margin: 0 0 18px 0;
  color: #334155;
}
.article-content ol, .article-content ul {
  margin: 0 0 18px 0;
  padding-left: 24px;
  color: #334155;
}
.article-content li {
  margin-bottom: 10px;
}

/* Article Figure / Image Styles */
.article-figure {
  margin: 28px 0;
  text-align: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.article-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
  margin: 0 auto;
}
.article-figure figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}
.article-hero-figure blockquote {
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
}
.article-hero-figure iframe {
  max-width: 100% !important;
}
.article-hero-figure .imgur-embed-pub {
  min-height: 280px;
}

/* Collaboration / Code Callout Box */
.code-request-box {
  background: #f0f7f4;
  border: 1.5px solid #b9d8cd;
  border-radius: 16px;
  padding: 22px 26px;
  margin: 32px 0 16px 0;
}
.code-request-box h3 {
  margin: 0 0 8px 0;
  font-size: 17px;
  color: var(--ink);
}
.code-request-box p {
  margin: 0 0 14px 0;
  font-size: 14px;
  color: var(--muted);
}
.btn-collab-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-collab-trigger:hover {
  background: #1e5c4b;
  transform: translateY(-1px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 20px;
}
.back-link:hover { text-decoration: underline; }

footer {
  
   max-width: 1050px;
  width: calc(100% - 32px);
  box-sizing: border-box;
  margin: 45px auto 30px;
  padding: 18px 12px;
  text-align: center;
  color: #ffffff;
  background: #2f7d67;
  font-size: 13px;
  border-radius: 8px;
}

/* Scroll Progress Bar */
#scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  z-index: 10001;
  background: rgba(220, 230, 225, 0.65);
  pointer-events: none;
}
#scroll-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #0d9488, #3b82f6, #8b5cf6, #ec4899);
  transition: width 0.08s linear;
}
#scroll-progress-text {
  position: absolute;
  top: 9px;
  right: 12px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(20, 51, 44, 0.88);
  color: #fff;
  font: 11px Arial, sans-serif;
  letter-spacing: 0.3px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* Chatbot Styles */
.adnan-chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 9999; font-family: inherit; }
.adnan-chat-bubble { width: 58px; height: 58px; background: #23735b; color: #ffffff; border: 3px solid #ffffff; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease; outline: none; }
.adnan-chat-bubble:hover { transform: scale(1.06); background: #1c5e4a; }
.adnan-chat-bubble svg { width: 24px; height: 24px; fill: currentColor; }
.adnan-chat-window { position: absolute; bottom: 75px; right: 0; width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 120px); background: #fff; border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(24,53,47,0.18); display: flex; flex-direction: column; overflow: hidden; transform: scale(0.9); opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.adnan-chat-widget.active .adnan-chat-window { transform: scale(1); opacity: 1; pointer-events: auto; }
.adnan-chat-header { background: linear-gradient(135deg, #14332c 0%, #0f766e 100%); color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.adnan-chat-title h3 { margin: 0; font-size: 15px; font-weight: 700; }
.adnan-chat-title span { font-size: 11px; opacity: 0.85; }
.adnan-chat-close { background: transparent; border: none; color: #fff; font-size: 20px; cursor: pointer; padding: 0 4px; opacity: 0.8; }
.adnan-chat-close:hover { opacity: 1; }
.lead-form-card { display: none; background: #f8f9fa; border-bottom: 1px solid var(--line); padding: 12px 14px; font-size: 12px; color: #333; max-height: 250px; overflow-y: auto; flex-shrink: 0; }
.lead-form-card input, .lead-form-card textarea { width: 100%; padding: 6px 9px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 11.5px; font-family: inherit; outline: none; }
.lead-form-actions { display: flex; gap: 6px; margin-top: 4px; }
.lead-form-actions button { padding: 5px 12px; border-radius: 6px; font-size: 11.5px; font-weight: 600; cursor: pointer; border: none; }
.btn-submit-lead { background: #0f766e; color: #fff; }
.btn-cancel-lead { background: #e2e8f0; color: #334155; }
#leadStatusMsg { margin-top: 6px; font-size: 11px; font-weight: 600; }
.adnan-chat-messages { flex: 1; padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: #fbfcfe; }
.adnan-msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.45; word-wrap: break-word; dir: auto; unicode-bidi: plaintext; }
.adnan-msg.bot { background: #fff; color: var(--ink); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.adnan-msg.user { background: #0f766e; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.adnan-chat-input-area { padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.adnan-chat-input-area textarea { flex: 1; min-width: 0; max-height: 130px; min-height: 42px; resize: none; padding: 11px 13px; border: 1px solid #dce7e2; border-radius: 10px; font: inherit; line-height: 1.35; outline: none; }
.adnan-chat-input-area button { background: #0f766e; color: #fff; border: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.adnan-chat-input-area button svg { width: 16px; height: 16px; fill: currentColor; transform: translateX(1px); }
.lead-toggle-btn { background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer; }

/* Author dialog profile header */
.author-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.author-profile-header .author-avatar {
  width: 110px;
  height: 110px;
  min-width: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
}
.author-profile-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.author-profile-info h2 {
  margin: 0;
}
.author-profile-info .author-role {
  margin: 0;
}
@media (max-width: 480px) {
  .author-profile-header {
    gap: 14px;
  }
  .author-profile-header .author-avatar {
    width: 85px;
    height: 85px;
    min-width: 85px;
  }
}


/* text highlight */
.article-content mark {
  background-color: #e2f5e9;
  color: #245b49 !important;
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
.text-accent {
  border-bottom: 2px solid #78b99c;
  padding-bottom: 1px;
}
