/* ==========================================================================
   PAMJ Blog - shared styles (Bootstrap 5.3)
   Used by posts/resources/index_post.php, _INCLUDES/BlogHeader.php, _INCLUDES/BlogFooter.php
   Class names inside post.htm, CmtFrm.php, CmtRegist.php and process_blog_post.php
   (BoxPost, CmtDiv, CmtBox, MorePost, card-text...) are kept as they are.
   ========================================================================== */

:root {
  --blog-brand: #0099FF;
  --blog-brand-dark: #0070BB;
  --blog-ink: #1F2933;
  --blog-text: #3E4A57;
  --blog-muted: #6B7785;
  --blog-line: #E3E8EE;
  --blog-soft: #F5F8FB;
  --blog-night: #2B3542;
  --blog-navbar-height: 72px;

  --bs-body-font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bs-body-color: var(--blog-text);
  --bs-link-color: var(--blog-brand-dark);
  --bs-link-color-rgb: 0, 112, 187;
  --bs-link-hover-color: var(--blog-brand);
  --bs-link-hover-color-rgb: 0, 153, 255;
}

html { scroll-padding-top: calc(var(--blog-navbar-height) + 1rem); }

body {
  padding-top: var(--blog-navbar-height);
  background-color: #FFFFFF;
}

h1, h2, h3, h4, h5, h6 { color: var(--blog-ink); }

/* ---------- Navbar ---------- */
.blog-navbar {
  background-color: var(--blog-brand);
  min-height: var(--blog-navbar-height);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}
.blog-navbar-logo { width: 180px; height: auto; }
.blog-navbar .nav-link {
  color: rgba(255, 255, 255, .9);
  font-weight: 500;
}
.blog-navbar .nav-link:hover,
.blog-navbar .nav-link:focus { color: #FFFFFF; }

/* Search box in the blue bar (not connected yet) */
.blog-search .input-group { min-width: 260px; }
.blog-search .input-group-text,
.blog-search .form-control {
  background-color: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .5);
  color: #FFFFFF;
}
.blog-search .form-control::placeholder { color: rgba(255, 255, 255, .85); }
.blog-search .form-control:focus {
  background-color: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--blog-ink);
  box-shadow: none;
}
.blog-search .btn { color: var(--blog-brand-dark); }

/* ---------- Post header ---------- */
.blog-post { padding-top: 2.5rem; }

.blog-category {
  display: inline-block;
  background-color: rgba(0, 153, 255, .1);
  color: var(--blog-brand-dark);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .4em .8em;
  border-radius: 999px;
}

.TitleDiv { margin-bottom: 1.75rem; }
.TitleDiv h1 {
  font-weight: 700;
  font-size: calc(1.5rem + 1.2vw);
  line-height: 1.25;
  margin: 1rem 0 1rem;
}
@media (min-width: 1200px) {
  .TitleDiv h1 { font-size: 2.5rem; }
}

.blog-meta {
  color: var(--blog-muted);
  font-size: .9rem;
  margin: 0;
}
.blog-meta .list-inline-item:not(:last-child) { margin-right: 1.25rem; }
.blog-meta i { color: var(--blog-brand); margin-right: .3rem; }
.blog-meta a { color: inherit; text-decoration: none; }
.blog-meta a:hover { color: var(--blog-brand-dark); }

.FeatImg {
  width: 100%;
  height: auto;
  border-radius: .75rem;
  border: 1px solid var(--blog-line);
}

/* ---------- Post body (post.htm) ---------- */
.PostArticle {
  font-size: 1.075rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  /* framed box around the included post.htm */
  background-color: #FFFFFF;
  border: 1px solid var(--blog-line);
  border-top: 4px solid var(--blog-brand);
  border-radius: .75rem;
  box-shadow: 0 6px 20px rgba(31, 41, 51, .07);
  padding: 1.75rem 2rem;
}
@media (max-width: 575.98px) {
  .PostArticle { padding: 1.25rem 1rem; }
}
.PostArticle .BoxPost > :first-child { margin-top: 0; }
.PostArticle .BoxPost > :last-child { margin-bottom: 0; }
.PostArticle h2, .PostArticle h3, .PostArticle h4 {
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.PostArticle h3 { font-size: 1.35rem; }
.PostArticle ul, .PostArticle ol { padding-left: 1.4rem; }
.PostArticle li { margin-bottom: .35rem; }

.BoxPost img {
  width: 100%;
  height: auto;
  border: 1px solid var(--blog-line);
  border-radius: .5rem;
  margin-bottom: 10px;
}
.BoxPost iframe { max-width: 100%; }
.BoxPost table {
  width: 100%;
  margin-bottom: 20px;
}
.BoxPost table tr td { padding: 5px; }
.BoxPost a:link,
.BoxPost a:visited {
  color: var(--blog-brand-dark);
  text-decoration: none;
  border-bottom: 2px solid rgba(0, 153, 255, .45);
}
.BoxPost a:hover,
.BoxPost a:active {
  color: var(--blog-brand);
  border-bottom-color: var(--blog-brand);
}
.ArticleAbstract img { border: 1px solid var(--blog-line); }

/* ---------- Tags ---------- */
.blog-tags { margin-bottom: 2rem; }
.blog-tag {
  display: inline-block;
  background-color: var(--blog-soft);
  border: 1px solid var(--blog-line);
  color: var(--blog-text);
  font-size: .8rem;
  padding: .3em .8em;
  border-radius: 999px;
  margin: 0 .35rem .5rem 0;
}

/* ---------- Author card ---------- */
.blog-author {
  background-color: var(--blog-night);
  color: #FFFFFF;
  border-radius: .75rem;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}
.blog-author-photo {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: #FFFFFF;
  object-fit: contain;
  padding: 6px;
}
.blog-author-label {
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}
.blog-author h2 {
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 700;
  margin: .2rem 0 .25rem;
}
.blog-author p { margin: 0; color: rgba(255, 255, 255, .8); font-size: .95rem; }

/* ---------- Section headings (Comments, Related posts) ---------- */
.blog-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  padding-bottom: .5rem;
  margin-bottom: 1.25rem;
  border-bottom: 3px solid var(--blog-brand);
  display: inline-block;
}

/* ---------- Comments ---------- */
.blog-comments { margin-bottom: 2.5rem; }
.CmtDiv {
  border-bottom: 1px dashed var(--blog-line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.blog-comments .CmtDiv { margin-left: 0; margin-right: 0; }
.blog-comments .CmtDiv > .col { padding-left: 0; padding-right: 0; }
.CmtDiv b { color: var(--blog-ink); }
.CmtDiv span { font-size: 95%; }

.CmtPost h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 .75rem;
}
.CmtBox {
  border: 1px solid var(--blog-line);
  border-radius: .75rem;
  background-color: var(--blog-soft);
  color: var(--blog-ink);
  margin: 0;
  padding: 1.5rem;
}
.CmtBox > .col { padding: 0; }

/* ---------- Comment forms (CmtFrm.php, CmtRegist.php) ---------- */
.btn-primary {
  --bs-btn-bg: var(--blog-brand);
  --bs-btn-border-color: var(--blog-brand);
  --bs-btn-hover-bg: var(--blog-brand-dark);
  --bs-btn-hover-border-color: var(--blog-brand-dark);
  --bs-btn-active-bg: var(--blog-brand-dark);
  --bs-btn-active-border-color: var(--blog-brand-dark);
  --bs-btn-disabled-bg: var(--blog-brand);
  --bs-btn-disabled-border-color: var(--blog-brand);
  font-weight: 600;
}
.CmtBox .form-label { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.CmtBox .form-control:focus {
  border-color: var(--blog-brand);
  box-shadow: 0 0 0 .2rem rgba(0, 153, 255, .2);
}
.cmt-intro { font-weight: 600; margin-bottom: 1rem; }
.cmt-intro i { color: var(--blog-brand); }
.cmt-msg { margin-bottom: 1rem; }
.cmt-policy {
  font-size: .9rem;
  background-color: #FFFFFF;
  border-left: 4px solid var(--blog-brand);
  border-radius: .5rem;
  padding: .75rem 1rem;
  margin-bottom: 1.25rem;
}
.cmt-policy i { color: var(--blog-brand); }
.cmt-register-toggle {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--blog-line);
}
.cmt-register-toggle a { text-decoration: none; }
.cmt-register {
  background-color: #FFFFFF;
  border: 1px solid var(--blog-line);
  border-radius: .75rem;
  padding: 1.25rem;
  margin-top: 1rem;
}
.cmt-captcha-img table { border-collapse: separate; }
.cmt-captcha-img td { padding: 0 .25rem 0 0; vertical-align: middle; }
.cmt-captcha-img #cryptogram {
  border: 1px dashed #8D8D8D;
  border-radius: .375rem;
  background-color: #FFFFFF;
}
.cmt-captcha-input {
  width: 8rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.CmtClose {
  background-color: var(--blog-soft);
  color: var(--blog-muted);
  border-left: 4px solid var(--blog-line);
  border-radius: .5rem;
  font-style: italic;
  padding: 1rem 1.25rem;
  margin-bottom: 2.5rem;
}
.CmtClose h4 { font-size: 1rem; margin: 0; color: var(--blog-muted); }

/* ---------- Related posts (markup from process_blog_post.php) ---------- */
.blog-related {
  background-color: var(--blog-soft);
  border-top: 1px solid var(--blog-line);
  padding: 2.5rem 0 1.5rem;
}
.MorePost .card {
  border: 1px solid var(--blog-line);
  border-radius: .75rem;
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}
.MorePost .card:hover {
  box-shadow: 0 8px 24px rgba(31, 41, 51, .1);
  transform: translateY(-2px);
}
.MorePost .card-img-top { object-fit: cover; }

/* Equal-height cards: every card in the row stretches to the same height,
   and the title area always reserves room for a 150-character title. */
.blog-related .MorePost > [class*="col-"] {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}
.blog-related .MorePost .card {
  flex: 1 1 auto;
  margin-bottom: 0 !important;
}
.blog-related .MorePost .card-body {
  display: flex;
  flex-direction: column;
}
.blog-related .MorePost .card-text {
  font-size: 1.05rem !important;
  line-height: 1.45;
  min-height: calc(1.45em * 6);
  margin-bottom: 1rem;
}
.blog-related .MorePost .card-body > .d-flex { margin-top: auto; }
.card-text a:link,
.card-text a:visited,
.card-text a:active {
  color: var(--blog-ink);
  font-weight: 600;
  text-decoration: none;
}
.card-text a:hover { color: var(--blog-brand-dark); }

/* ---------- Footer ---------- */
.blog-footer {
  background-color: var(--blog-night);
  color: rgba(255, 255, 255, .8);
  padding: 3rem 0 2rem;
  font-size: .9rem;
  font-weight: 400; /* stops an unclosed <b> in a page (e.g. rss/index.php) from making the footer bold */
}
.blog-footer h2 {
  color: #FFFFFF;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.blog-footer p { margin-bottom: .45rem; }
.blog-footer a:link,
.blog-footer a:visited { color: #FFFFFF; text-decoration: none; }
.blog-footer a:hover { color: #FFFFFF; text-decoration: underline; }
.blog-footer-logos img { width: 100px; height: auto; }

/* ==========================================================================
   Step 2 - Homepage (index.php) and RSS page (rss/index.php)
   Markup inside index/latest.htm and index/CatList.htm is generated by the
   publishing tool and is styled here without changing it.
   ========================================================================== */

/* ---------- Social links (shared footer) ---------- */
.blog-social { display: flex; gap: .6rem; }
.blog-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, .1);
  color: #FFFFFF !important;
  font-size: 1rem;
  transition: background-color .2s ease;
}
.blog-social a:hover { background-color: var(--blog-brand); text-decoration: none !important; }

/* ---------- Blue page title band ---------- */
.blog-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #0099FF 0%, #0077CC 60%, #005A9C 100%);
  color: #FFFFFF;
  padding: 2.5rem 0 2.75rem;
}
/* dot grid echoing the PAMJ logo */
.blog-hero::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 360px;
  height: 240px;
  background-image: radial-gradient(rgba(255, 255, 255, .22) 9px, transparent 10px);
  background-size: 34px 34px;
  pointer-events: none;
}
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero h1 {
  color: #FFFFFF;
  font-weight: 800;
  font-size: calc(1.6rem + 1.4vw);
  margin: .25rem 0 .35rem;
}
@media (min-width: 1200px) { .blog-hero h1 { font-size: 2.75rem; } }
.blog-hero-sub { font-size: 1.1rem; margin: 0; color: rgba(255, 255, 255, .9); }
.blog-hero .breadcrumb { margin-bottom: .5rem; font-size: .85rem; }
.blog-hero .breadcrumb a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.blog-hero .breadcrumb a:hover { color: #FFFFFF; text-decoration: underline; }
.blog-hero .breadcrumb-item.active,
.blog-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .7); }

.blog-home {
  background-color: var(--blog-soft);
  padding: 2.5rem 0 3rem;
}

/* ---------- Post list (index/latest.htm) ---------- */
.entries .entry {
  background-color: #FFFFFF;
  border: 1px solid var(--blog-line);
  border-top: 4px solid var(--blog-brand);
  border-radius: .75rem;
  box-shadow: 0 6px 20px rgba(31, 41, 51, .07);
  overflow: hidden;
  margin-bottom: 1.75rem;
  transition: box-shadow .2s ease, transform .2s ease;
}
.entries .entry:hover {
  box-shadow: 0 12px 28px rgba(31, 41, 51, .12);
  transform: translateY(-2px);
}
.entries .entry-img img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  background-color: var(--blog-line);
}
.entries .entry-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 1.25rem 1.5rem .75rem;
}
.entries .entry-title a { color: var(--blog-ink); text-decoration: none; }
.entries .entry-title a:hover { color: var(--blog-brand-dark); }
.entries .entry-meta { margin: 0 1.5rem 1rem; }
.entries .entry-meta ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .85rem;
  color: var(--blog-muted);
}
.entries .entry-meta li { gap: .35rem; }
.entries .entry-meta i { color: var(--blog-brand); }
.entries .entry-meta a { color: inherit; text-decoration: none; }
.entries .entry-content {
  margin: 0 1.5rem 1.5rem;
  line-height: 1.75;
}
.entries .read-more { text-align: right; margin-top: 1rem; }
.entries .read-more a {
  display: inline-block;
  background-color: var(--blog-brand);
  color: #FFFFFF;
  font-weight: 600;
  font-size: .9rem;
  padding: .45rem 1.1rem;
  border-radius: .375rem;
  text-decoration: none;
}
.entries .read-more a:hover { background-color: var(--blog-brand-dark); }
@media (max-width: 575.98px) {
  .entries .entry-title { margin: 1rem 1rem .6rem; font-size: 1.2rem; }
  .entries .entry-meta, .entries .entry-content { margin-left: 1rem; margin-right: 1rem; }
}

/* ---------- Sidebar ---------- */
.sidebar-panel {
  background-color: #FFFFFF;
  border: 1px solid var(--blog-line);
  border-radius: .75rem;
  box-shadow: 0 4px 14px rgba(31, 41, 51, .05);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
}
.sidebar-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding-bottom: .6rem;
  margin-bottom: 1rem;
  border-bottom: 3px solid var(--blog-brand);
  display: inline-block;
}
.Bckgd_class_1 {
  height: 200px;
  width: 100%;
  background-image: url("../img/Cover.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-color: #2D65B0;
}

.categories ul { list-style: none; padding: 0; margin: 0; }
.categories li + li { border-top: 1px dashed var(--blog-line); }
.categories a {
  display: flex;
  justify-content: space-between;
  padding: .5rem 0;
  color: var(--blog-text);
  text-decoration: none;
  font-weight: 500;
}
.categories a:hover { color: var(--blog-brand-dark); }
.categories a span {
  background-color: rgba(0, 153, 255, .1);
  color: var(--blog-brand-dark);
  font-size: .8rem;
  font-weight: 700;
  border-radius: 999px;
  padding: .1rem .6rem;
}

.recent-posts .post-item {
  display: flex;
  flex-direction: column;
  padding-left: 92px;
  position: relative;
  min-height: 64px;
}
.recent-posts .post-item + .post-item { margin-top: 1rem; }
.recent-posts .post-item img {
  position: absolute;
  left: 0;
  top: 0;
  width: 80px !important;
  height: 60px !important;
  object-fit: cover;
  border-radius: .375rem;
  background-color: var(--blog-line);
}
.recent-posts .post-item h4 {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 .2rem;
}
.recent-posts .post-item h4 a { color: var(--blog-ink); text-decoration: none; }
.recent-posts .post-item h4 a:hover { color: var(--blog-brand-dark); }
.recent-posts .post-item time { font-size: .8rem; color: var(--blog-muted); }

.tags ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.tags a {
  display: inline-block;
  background-color: rgba(0, 153, 255, .1);
  color: var(--blog-brand-dark);
  font-size: .8rem;
  font-weight: 600;
  padding: .3em .85em;
  border-radius: 999px;
}

.sidebar-ad:empty { display: none; }

/* ---------- About this blog band (homepage) ---------- */
.blog-about {
  background-color: #FFFFFF;
  border-top: 1px solid var(--blog-line);
  padding: 2.5rem 0;
  font-size: .95rem;
  line-height: 1.7;
}
.blog-about h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: .75rem; }

/* ---------- RSS page ---------- */
.blog-rss {
  background-color: #FFFFFF;
  border: 1px solid var(--blog-line);
  border-top: 4px solid var(--blog-brand);
  border-radius: .75rem;
  box-shadow: 0 6px 20px rgba(31, 41, 51, .07);
  padding: 2rem;
  min-height: 300px;
}
.blog-rss-intro { color: var(--blog-muted); margin-bottom: 1.5rem; }
.blog-rss .RowList p { margin: 0 0 .75rem; }
.blog-rss .RowList a {
  display: block;
  padding: .85rem 1rem .85rem 3rem;
  position: relative;
  background-color: var(--blog-soft);
  border: 1px solid var(--blog-line);
  border-radius: .5rem;
  color: var(--blog-ink);
  text-decoration: none;
  word-break: break-all;
}
.blog-rss .RowList a::before {
  content: "\F521";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #F26522;
  font-weight: normal;
}
.blog-rss .RowList a:hover { border-color: var(--blog-brand); background-color: #FFFFFF; }
