/* SINGLE POST (Latest News, Blog, Achievements): centred column, picture never huge */
body.single .ast-single-post-featured-section,
body.single article.ast-article-single,
body.single .post-navigation{
  max-width:900px; margin-left:auto !important; margin-right:auto !important;
}

/* Astra pulls the article up over the wide image (-80px). Turn that off. */
body.single article.ast-article-single{
  margin-top:0 !important; position:static !important; padding-top:0 !important;
  box-shadow:none !important; background:transparent !important;
}
body.single article.ast-article-single .single-layout-1{ padding:0 !important; }
body.single article.ast-article-single .entry-header{ padding-top:0 !important; margin-top:0 !important; }

/* picture: whole image visible, capped height, centred on a soft background */
body.single .ast-single-post-featured-section,
body.single .ast-single-post-featured-section.ast-article-image-container--wide{
  width:100% !important; max-width:900px !important;
  margin:8px auto 28px !important; padding:0 !important; left:auto !important; right:auto !important;
  height:auto !important; max-height:none !important; min-height:0 !important;
  background:transparent !important; border-radius:0; overflow:visible; text-align:left;
}
body.single .ast-single-post-featured-section img,
body.single img.wp-post-image{
  display:block; width:auto !important; max-width:100% !important;
  height:auto !important; max-height:480px !important;
  margin:0; object-fit:contain !important; border-radius:12px;
  contain-intrinsic-size:none !important;
}

/* heading + date */
body.single h1.entry-title{ font-size:34px; font-weight:700; line-height:1.25; color:var(--navy); margin:0 0 8px; }
body.single .entry-meta,
body.single .entry-meta *{ color:#8a93a3 !important; font-size:15px !important; font-weight:500 !important; }

@media (max-width:768px){
  body.single .ast-single-post-featured-section img,
  body.single img.wp-post-image{ max-height:300px !important; }
  body.single h1.entry-title{ font-size:26px; }
}

/* =====================================================================
   ARTICLE FORMATTING (Latest News, Blog, Achievements, Magazine posts)
   Blue headings, justified text, circle-arrow bullets, a./b./c. lists, clean tables.
   The alumni story pages (body.srs-story) keep their own design.
   ===================================================================== */
body.single:not(.srs-story) article.ast-article-single,
body.single:not(.srs-story) .ast-single-post-featured-section,
body.single .post-navigation{ max-width:100% !important; }

body.single:not(.srs-story) .entry-content{ font-size:18px; line-height:1.9; color:#333; }
body.single:not(.srs-story) .entry-content p{ margin:0 0 20px; text-align:justify; hyphens:auto; -webkit-hyphens:auto; }
body.single:not(.srs-story) .entry-content strong{ color:#111; }
body.single:not(.srs-story) .entry-content a{ color:var(--navy); }

body.single:not(.srs-story) .entry-content h2{
  font-size:30px; font-weight:700; line-height:1.3; color:var(--drawer); margin:38px 0 12px;
}
body.single:not(.srs-story) .entry-content h3{
  font-size:23px; font-weight:700; line-height:1.3; color:var(--drawer); margin:28px 0 10px;
}

/* small bold sub-heading (Heading block, level H4) and bold-italic quote (Quote block) */
body.single:not(.srs-story) .entry-content h4{
  font-size:20px; font-weight:700 !important; line-height:1.4; color:#222; margin:26px 0 10px;
}
body.single:not(.srs-story) .entry-content blockquote,
body.single:not(.srs-story) .entry-content .wp-block-quote{
  margin:6px 0 22px; padding:0; border:0; background:transparent; quotes:none;
  font-style:italic; font-weight:700; font-size:inherit; line-height:1.9; color:#222; text-align:justify;
}
body.single:not(.srs-story) .entry-content blockquote p,
body.single:not(.srs-story) .entry-content .wp-block-quote p{ font-style:italic; font-weight:700; margin:0 0 8px; font-size:inherit; }
body.single:not(.srs-story) .entry-content blockquote cite{ display:block; font-style:italic; font-weight:700; color:#222; }
body.single:not(.srs-story) .entry-content blockquote::before,
body.single:not(.srs-story) .entry-content blockquote::after{ content:none; }

/* a paragraph that is only bold text = sub-heading (staff just bold the line, like on the Udgam site) */
body.single:not(.srs-story) .entry-content p.srs-subhead{ margin:26px 0 10px; text-align:left; }
body.single:not(.srs-story) .entry-content p.srs-subhead strong{ font-size:20px; font-weight:700; line-height:1.4; color:#222; }

/* bullet list: black circle with a white arrow, like the footer */
body.single:not(.srs-story) .entry-content ul{ list-style:none; margin:8px 0 26px; padding:0; }
body.single:not(.srs-story) .entry-content ul li{ position:relative; padding-left:36px; margin:0 0 12px; }
body.single:not(.srs-story) .entry-content ul li::before{
  content:"\203A"; position:absolute; left:0; top:.4em; width:21px; height:21px; border-radius:50%;
  background:#111; color:#fff; font-size:16px; line-height:20px; text-align:center;
}
/* numbered / lettered list (choose "a, b, c" in the List block's numbering style) */
body.single:not(.srs-story) .entry-content ol{ margin:8px 0 26px; padding-left:38px; }
body.single:not(.srs-story) .entry-content ol li{ margin:0 0 10px; padding-left:8px; }

/* tables */
body.single:not(.srs-story) .entry-content .wp-block-table{ overflow-x:auto; margin:14px 0 30px; }
body.single:not(.srs-story) .entry-content table{ width:100%; border-collapse:collapse; margin:0; }
body.single:not(.srs-story) .entry-content th,
body.single:not(.srs-story) .entry-content td{
  border:1px solid #a9c1e0; padding:14px 16px; text-align:left; font-size:17px; line-height:1.6; vertical-align:top;
}
body.single:not(.srs-story) .entry-content thead th,
body.single:not(.srs-story) .entry-content thead td{ background:var(--light); color:var(--navy); font-weight:700; }

@media (max-width:768px){
  body.single:not(.srs-story) .entry-content{ font-size:16px; line-height:1.75; }
  /* small screens: left-aligned and no word-splitting, so lines never get big gaps or chopped words */
  body.single .entry-content p{ text-align:left !important; hyphens:none !important; -webkit-hyphens:none !important; }
  body.single:not(.srs-story) .entry-content h2{ font-size:24px; margin-top:30px; }
  body.single:not(.srs-story) .entry-content h3{ font-size:20px; }
  body.single:not(.srs-story) .entry-content h4{ font-size:18px; }
  body.single:not(.srs-story) .entry-content p.srs-subhead strong{ font-size:18px; }
  body.single:not(.srs-story) .entry-content th,
  body.single:not(.srs-story) .entry-content td{ font-size:15px; padding:11px 10px; }
}

/* honour the numbering style chosen in the List block: a. b. c. and i. ii. iii. (Astra otherwise forces 1. 2. 3.) */
body.single .entry-content ol[type="a"]{ list-style-type:lower-alpha; }
body.single .entry-content ol[type="i"]{ list-style-type:lower-roman; }

/* featured picture sits in the middle of the article (Latest News, Blog, Achievements, Magazine) */
body.single:not(.srs-story) .ast-single-post-featured-section{ text-align:center; }
body.single:not(.srs-story) .ast-single-post-featured-section img,
body.single:not(.srs-story) img.wp-post-image{ margin-left:auto !important; margin-right:auto !important; }

/* =====================================================================
   LATEST NEWS single post: title first (grey, thin line, like the list page), then the picture, then the text.
   No date shown. Same look as the Udgam reference.
   ===================================================================== */
body.single.srs-cat-latest-news main#main{ display:flex; flex-direction:column; }
body.single.srs-cat-latest-news article.ast-article-single,
body.single.srs-cat-latest-news article .single-layout-1{ display:contents; }
body.single.srs-cat-latest-news article .entry-header{ order:1; width:100%; }
body.single.srs-cat-latest-news .ast-single-post-featured-section{ order:2; }
body.single.srs-cat-latest-news article .entry-content{ order:3; width:100%; }
body.single.srs-cat-latest-news article > *:not(.entry-header):not(.entry-content){ order:4; }
body.single.srs-cat-latest-news .post-navigation{ order:5; }

body.single.srs-cat-latest-news h1.entry-title{
  display:block; width:100%; font-size:38px; font-weight:400; line-height:1.2; color:#444;
  margin:0 0 30px !important; padding:0 0 4px !important; border-bottom:2px solid #d9d9d9;
}
body.single.srs-cat-latest-news .entry-meta,
body.single.srs-cat-latest-news .entry-header .ast-blog-meta-container{ display:none !important; }
body.single.srs-cat-latest-news .entry-content p{ margin:0 0 12px; }
body.single.srs-cat-latest-news .entry-content p.srs-subhead{ margin:0 0 12px; }
body.single.srs-cat-latest-news .entry-content p.srs-subhead strong{ font-size:18px; }
@media (max-width:600px){ body.single.srs-cat-latest-news h1.entry-title{ font-size:28px; } }

/* =====================================================================
   BLOG single post: title first (grey, thin line, like the list page), then the picture, then the text.
   No date shown. Same look as the Udgam reference.
   ===================================================================== */
body.single.srs-cat-blog main#main{ display:flex; flex-direction:column; }
body.single.srs-cat-blog article.ast-article-single,
body.single.srs-cat-blog article .single-layout-1{ display:contents; }
body.single.srs-cat-blog article .entry-header{ order:1; width:100%; }
body.single.srs-cat-blog .ast-single-post-featured-section{ order:2; }
body.single.srs-cat-blog article .entry-content{ order:3; width:100%; }
body.single.srs-cat-blog article > *:not(.entry-header):not(.entry-content){ order:4; }
body.single.srs-cat-blog .post-navigation{ order:5; }

body.single.srs-cat-blog h1.entry-title{
  display:block; width:100%; font-size:38px; font-weight:400; line-height:1.2; color:#444;
  margin:0 0 30px !important; padding:0 0 4px !important; border-bottom:2px solid #d9d9d9;
}
body.single.srs-cat-blog .entry-meta,
body.single.srs-cat-blog .entry-header .ast-blog-meta-container{ display:none !important; }
body.single.srs-cat-blog .entry-content p{ margin:0 0 12px; }
body.single.srs-cat-blog .entry-content p.srs-subhead{ margin:0 0 12px; }
body.single.srs-cat-blog .entry-content p.srs-subhead strong{ font-size:18px; }
@media (max-width:600px){ body.single.srs-cat-blog h1.entry-title{ font-size:28px; } }

/* ---- picture: never upscaled, centred, never taller than 600px (Latest News and Blog) ---- */
body.single.srs-cat-latest-news .ast-single-post-featured-section,
body.single.srs-cat-blog .ast-single-post-featured-section{ max-width:100% !important; margin:0 auto 28px !important; }
body.single.srs-cat-latest-news .ast-single-post-featured-section img,
body.single.srs-cat-latest-news img.wp-post-image,
body.single.srs-cat-blog .ast-single-post-featured-section img,
body.single.srs-cat-blog img.wp-post-image{ max-width:100% !important; width:auto !important; max-height:600px !important; border-radius:0; }

/* ---- blog article look (Udgam reference): blue question headings, tight spacing, plain table ---- */
body.single.srs-cat-blog .entry-content h2{ font-size:28px; font-weight:700; line-height:1.3; color:var(--drawer); margin:26px 0 8px; }
body.single.srs-cat-blog .entry-content h3{ font-size:22px; margin:20px 0 8px; }
body.single.srs-cat-blog .entry-content ul{ margin:8px 0 14px; }
body.single.srs-cat-blog .entry-content ul li{ margin:0 0 12px; }
body.single.srs-cat-blog .entry-content .wp-block-table,
body.single.srs-cat-blog .entry-content table{ margin-top:8px; margin-bottom:18px; }
body.single.srs-cat-blog .entry-content thead th,
body.single.srs-cat-blog .entry-content thead td{ background:#fff; color:#222; font-weight:700; }
body.single.srs-cat-blog .entry-content th,
body.single.srs-cat-blog .entry-content td{ border-color:#b8c9e3; padding:14px 13px; }
@media (max-width:768px){
  body.single.srs-cat-blog .entry-content h2{ font-size:23px; }
  body.single .entry-content table{ display:block; overflow-x:auto; }
}

/* ---- FAQ accordion: use the "Details" block (type /details). Works in every article. ---- */
body.single:not(.srs-story) .entry-content details{ background:#fff; border:1px solid #e3e3e3; margin:0 0 12px; }
body.single:not(.srs-story) .entry-content details > summary{
  position:relative; list-style:none; cursor:pointer; background:#ededed;
  padding:20px 20px 20px 56px; font-size:21px; font-weight:700; line-height:1.35; color:#333;
}
body.single:not(.srs-story) .entry-content details > summary::-webkit-details-marker{ display:none; }
body.single:not(.srs-story) .entry-content details > summary::marker{ content:""; }
body.single:not(.srs-story) .entry-content details > summary::before{
  content:"+"; position:absolute; left:22px; top:50%; transform:translateY(-50%); font-size:26px; font-weight:700; line-height:1; color:#333;
}
body.single:not(.srs-story) .entry-content details[open] > summary::before{ content:"\2212"; }
body.single:not(.srs-story) .entry-content details > *:not(summary){ margin:0; padding:14px 20px; }
body.single:not(.srs-story) .entry-content details > p:last-child{ padding-bottom:18px; }
@media (max-width:768px){
  body.single:not(.srs-story) .entry-content details > summary{ font-size:18px; padding:16px 14px 16px 46px; }
  body.single:not(.srs-story) .entry-content details > summary::before{ left:16px; }
}

/* Astra forces post pictures into a 16:9 frame (blank bars above and below wide pictures). Use the picture's own shape. */
body.single:not(.srs-story) .ast-single-post-featured-section img,
body.single:not(.srs-story) img.wp-post-image{ aspect-ratio:auto !important; height:auto !important; }

/* =====================================================================
   ACHIEVEMENTS single post (same as Latest News): title first (grey, thin line, like the list page), then the picture, then the text.
   No date shown. Same look as the Udgam reference.
   ===================================================================== */
body.single.srs-cat-achievements main#main{ display:flex; flex-direction:column; }
body.single.srs-cat-achievements article.ast-article-single,
body.single.srs-cat-achievements article .single-layout-1{ display:contents; }
body.single.srs-cat-achievements article .entry-header{ order:1; width:100%; }
body.single.srs-cat-achievements .ast-single-post-featured-section{ order:2; }
body.single.srs-cat-achievements article .entry-content{ order:3; width:100%; }
body.single.srs-cat-achievements article > *:not(.entry-header):not(.entry-content){ order:4; }
body.single.srs-cat-achievements .post-navigation{ order:5; }

body.single.srs-cat-achievements h1.entry-title{
  display:block; width:100%; font-size:38px; font-weight:400; line-height:1.2; color:#444;
  margin:0 0 30px !important; padding:0 0 4px !important; border-bottom:2px solid #d9d9d9;
}
body.single.srs-cat-achievements .entry-meta,
body.single.srs-cat-achievements .entry-header .ast-blog-meta-container{ display:none !important; }
body.single.srs-cat-achievements .entry-content p{ margin:0 0 12px; }
body.single.srs-cat-achievements .entry-content p.srs-subhead{ margin:0 0 12px; }
body.single.srs-cat-achievements .entry-content p.srs-subhead strong{ font-size:18px; }
@media (max-width:600px){ body.single.srs-cat-achievements h1.entry-title{ font-size:28px; } }


body.single.srs-cat-achievements .ast-single-post-featured-section{ max-width:100% !important; margin:0 auto 28px !important; }
body.single.srs-cat-achievements .ast-single-post-featured-section img,
body.single.srs-cat-achievements img.wp-post-image{ max-width:100% !important; width:auto !important; max-height:600px !important; border-radius:0; }

/* same 20px side margin on phones and tablets as every other page (Astra adds 9px + extra padding on single posts) */
@media (max-width:921px){
  body.single .ast-container{ padding-left:20px !important; padding-right:20px !important; }
  body.single article.ast-article-single{ padding-left:0 !important; padding-right:0 !important; }
}

/* less empty space between the menu and the title on single posts (Astra adds 60px on wide screens) */
@media (min-width:1200px){ body.single:not(.srs-story).ast-plain-container.ast-no-sidebar #primary{ margin-top:16px; } }

/* Previous / Next: same button as the Home "Read More" (outlined blue; on hover a blue fill sweeps across and an arrow slides in) */
body.single .post-navigation{ margin-top:36px !important; }
body.single .post-navigation .nav-links{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; }
body.single .post-navigation .nav-previous,
body.single .post-navigation .nav-next{ flex:0 1 calc(50% - 8px); width:auto; max-width:none; }
body.single .post-navigation .nav-next{ margin-left:auto; text-align:right; }
body.single .post-navigation .nav-links a{
  position:relative; display:block; overflow:hidden; padding:16px 26px;
  border:2px solid var(--drawer); border-radius:4px; background:#fff;
  color:var(--drawer) !important; text-decoration:none !important; transition:color .35s ease;
}
body.single .post-navigation .nav-links a::before{
  content:""; position:absolute; left:0; top:0; bottom:0; width:0; background:var(--drawer);
  transition:width .7s cubic-bezier(.22,.61,.36,1); z-index:0;
}
body.single .post-navigation .nav-links a > *{ position:relative; z-index:1; }
body.single .post-navigation .nav-links a:hover,
body.single .post-navigation .nav-links a:focus-visible{ color:#fff !important; }
body.single .post-navigation .nav-links a:hover::before,
body.single .post-navigation .nav-links a:focus-visible::before{ width:100%; }
body.single .post-navigation .ast-post-nav{
  display:inline-flex; align-items:center; font-size:13px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:inherit;
}
/* the little arrow is always visible and nudges a little on hover */
body.single .post-navigation .ast-post-nav .ahfb-svg-iconset{ display:inline-flex; width:14px; margin:0 0 0 8px; opacity:1; transition:transform .3s ease; }
body.single .post-navigation .nav-previous .ast-post-nav .ahfb-svg-iconset{ margin:0 8px 0 0; }
body.single .post-navigation .ast-post-nav svg{ width:14px; height:14px; fill:currentColor; flex:none; }
body.single .post-navigation .nav-next a:hover .ast-post-nav .ahfb-svg-iconset{ transform:translateX(5px); }
body.single .post-navigation .nav-previous a:hover .ast-post-nav .ahfb-svg-iconset{ transform:translateX(-5px); }
body.single .post-navigation .nav-links a p{
  margin:6px 0 0; font-size:17px; font-weight:500; line-height:1.4; color:inherit;
  white-space:normal; overflow:visible; text-overflow:clip;
}
@media (max-width:600px){
  body.single .post-navigation .nav-previous,
  body.single .post-navigation .nav-next{ flex-basis:100%; }
}

/* make the two buttons fill their half of the row (Astra squeezes them to 80% and draws a divider line) */
body.single .post-navigation .nav-links{ width:100%; padding:0; }
body.single .post-navigation .nav-links a{ width:100% !important; max-width:none !important; }
body.single .post-navigation .nav-previous:after,
body.single .post-navigation .nav-next:after{ display:none !important; }
body.single .post-navigation .nav-links a p{ display:block !important; }
body.single .post-navigation .nav-links a .ast-post-nav{ font-size:13px; }
body.single .post-navigation{ margin-top:24px !important; padding:0 !important; }
body.single .post-navigation{ max-width:none !important; width:100%; }

/* two equal columns, equal height, nothing sticking out (tablet and phone included) */
body.single .post-navigation .nav-links{ display:grid !important; grid-template-columns:1fr 1fr; gap:16px; align-items:stretch; box-sizing:border-box; }
body.single .post-navigation .nav-previous,
body.single .post-navigation .nav-next{ margin:0 !important; padding:0 !important; width:auto; min-width:0; flex:none; display:flex; }
body.single .post-navigation .nav-next{ grid-column:2; }
body.single .post-navigation .nav-previous{ grid-column:1; }
body.single .post-navigation .nav-links a{ box-sizing:border-box; flex:1; min-width:0; overflow-wrap:anywhere; }
@media (max-width:600px){
  body.single .post-navigation .nav-links{ grid-template-columns:1fr; }
  body.single .post-navigation .nav-next,
  body.single .post-navigation .nav-previous{ grid-column:1; }
}
body.single .post-navigation .nav-previous,
body.single .post-navigation .nav-next{ width:100% !important; max-width:none !important; }
/* phones: just "Previous" / "Next" (no long title), two side-by-side buttons of equal size */
@media (max-width:600px){
  body.single .post-navigation .nav-links{ grid-template-columns:1fr 1fr; gap:12px; }
  body.single .post-navigation .nav-previous{ grid-column:1; }
  body.single .post-navigation .nav-next{ grid-column:2; }
  body.single .post-navigation .nav-links a{ padding:14px 12px; }
  body.single .post-navigation .nav-links a p{ display:none !important; }
  body.single .post-navigation .nav-links a .ast-post-nav{ display:flex; justify-content:center; font-size:14px; }
}
@media (max-width:600px){
  body.single .post-navigation .nav-links a{ padding:14px 8px; overflow-wrap:normal; }
  body.single .post-navigation .nav-links a .ast-post-nav{ white-space:nowrap; font-size:12px; letter-spacing:.04em; }
  body.single .post-navigation .ast-post-nav .ahfb-svg-iconset{ margin-left:6px; }
  body.single .post-navigation .nav-previous .ast-post-nav .ahfb-svg-iconset{ margin:0 6px 0 0; }
}
