/* ================================================================
   SJWS STANDARD ARTICLE CSS v6 - Professional Text + Smart Images + Contact Links
   Template: sjwschool-new | Joomla 3.8.2

   Scope / safety contract:
   - This file is loaded ONLY for new normal com_content articles.
   - Deployment baseline: article ID 2872.
   - Existing articles (<= 2872) never load this file.
   - Home and designed menu pages never load this file.
   - Future custom pages can opt out with Joomla Page Class:
     sjw-no-standard
   - Every rule is additionally scoped by body.sjw-standard-page.
================================================================ */

body.sjw-site-new.sjw-standard-page {
  --sjw-std-navy: #071b33;
  --sjw-std-navy-2: #0b2447;
  --sjw-std-blue: #0b6fb3;
  --sjw-std-gold: #f3b233;
  --sjw-std-text: #4d6680;
  --sjw-std-text-strong: #263f5c;
  --sjw-std-line: #d8e9f5;
  --sjw-std-soft: #f7fbff;
  --sjw-std-white: #ffffff;
}

/* ================================================================
   01. Article shell
================================================================ */

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page {
  width: 100% !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding-bottom: 64px !important;
  overflow: hidden !important;
  border: 1px solid rgba(216, 233, 245, 0.95) !important;
  border-radius: 32px !important;
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 28px 78px rgba(11, 36, 71, 0.10) !important;
}

/* ================================================================
   02. Article header / title
================================================================ */

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .page-header {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 52px 64px 38px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(216, 233, 245, 0.92) !important;
  background:
    radial-gradient(circle at 8% 12%, rgba(11, 111, 179, 0.10), transparent 30%),
    radial-gradient(circle at 92% 10%, rgba(243, 178, 51, 0.12), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 100%) !important;
  text-align: left !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .page-header::before {
  content: "Sir John Wilson School" !important;
  display: inline-flex !important;
  align-items: center !important;
  width: max-content !important;
  max-width: 100% !important;
  min-height: 32px !important;
  margin: 0 0 18px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(11, 111, 179, 0.13) !important;
  border-radius: 999px !important;
  background: rgba(11, 111, 179, 0.08) !important;
  color: var(--sjw-std-blue) !important;
  font: 900 11px/1 Arial, Helvetica, sans-serif !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .page-header h1,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .page-header h2 {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--sjw-std-navy) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: clamp(36px, 4.2vw, 54px) !important;
  line-height: 1.08 !important;
  font-weight: 900 !important;
  letter-spacing: -1.3px !important;
  overflow-wrap: break-word !important;
}

/* ================================================================
   03. Content measure and typography
================================================================ */

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > p,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h2,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h3,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h4,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h5,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h6,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > ul,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > ol,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > blockquote,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > table,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .sjw-table-wrap,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .sjw-media-wrap,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > div:not(.page-header):not(.icons):not(.article-info):not(.actions) {
  width: calc(100% - 128px) !important;
  max-width: 900px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page {
  color: var(--sjw-std-text) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 17px !important;
  line-height: 1.82 !important;
  font-weight: 500 !important;
  font-kerning: normal !important;
  font-variant-ligatures: common-ligatures contextual !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* Neutralize the older global rule that forces every nested div/span/font
   to become 17px text. New article components inherit from their parent. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page div,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page span,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page font {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
  word-spacing: inherit !important;
  text-indent: 0 !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page p {
  margin-top: 0 !important;
  margin-bottom: 20px !important;
  color: var(--sjw-std-text) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 17px !important;
  line-height: 1.82 !important;
  font-weight: 500 !important;
  text-align: justify !important;
  text-justify: inter-word !important;
  text-align-last: left !important;
  -webkit-hyphens: auto !important;
  hyphens: auto !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > p:first-of-type {
  margin-top: 42px !important;
  color: var(--sjw-std-text-strong) !important;
  font-size: 19px !important;
  line-height: 1.78 !important;
  font-weight: 600 !important;
}


/* ================================================================
   03A. Professional text flow
   - Full justification is limited to narrative content.
   - Headings, buttons, tables and UI controls stay naturally aligned.
   - Hyphenation reduces large gaps between justified words.
================================================================ */

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page
  > div:not(.page-header):not(.icons):not(.article-info):not(.actions):not(.sjw-table-wrap):not(.sjw-media-wrap),
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page li,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page blockquote,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page blockquote p {
  text-align: justify !important;
  text-justify: inter-word !important;
  text-align-last: left !important;
  -webkit-hyphens: auto !important;
  hyphens: auto !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

/* Never justify interface-like content. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h1,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h2,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h3,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h4,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h5,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h6,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .btn,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .btn-primary,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .sjw-global-btn,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .sjw-download-link,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page table th,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page table td {
  text-align: left !important;
  text-align-last: auto !important;
  hyphens: manual !important;
}

/* Narrow phones: left alignment is intentionally restored.
   Full justification on a very narrow column creates visibly large word gaps. */
@media (max-width: 600px) {
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page p,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page
    > div:not(.page-header):not(.icons):not(.article-info):not(.actions):not(.sjw-table-wrap):not(.sjw-media-wrap),
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page li,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page blockquote,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page blockquote p {
    text-align: left !important;
    text-align-last: auto !important;
  }
}

/* ================================================================
   04. Headings
================================================================ */

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h2,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h3,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h4,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h5,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h6 {
  color: var(--sjw-std-navy) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  text-align: left !important;
  overflow-wrap: break-word !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h2 {
  margin-top: 48px !important;
  margin-bottom: 18px !important;
  font-size: clamp(28px, 3vw, 36px) !important;
  line-height: 1.18 !important;
  font-weight: 900 !important;
  letter-spacing: -0.6px !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h2::after {
  content: "" !important;
  display: block !important;
  width: 54px !important;
  height: 3px !important;
  margin-top: 12px !important;
  border-radius: 999px !important;
  background: var(--sjw-std-gold) !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .page-header h2::after {
  display: none !important;
  content: none !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h3 {
  margin-top: 34px !important;
  margin-bottom: 12px !important;
  font-size: 23px !important;
  line-height: 1.30 !important;
  font-weight: 900 !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h4 {
  margin-top: 28px !important;
  margin-bottom: 10px !important;
  color: var(--sjw-std-blue) !important;
  font-size: 18px !important;
  line-height: 1.38 !important;
  font-weight: 900 !important;
}

/* ================================================================
   05. Lists - unordered stays visual; ordered keeps numbering
================================================================ */

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page ul,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page ol {
  margin-top: 20px !important;
  margin-bottom: 28px !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page ul {
  padding-left: 0 !important;
  list-style: none !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page ul > li {
  position: relative !important;
  margin: 0 0 11px !important;
  padding-left: 30px !important;
  color: var(--sjw-std-text) !important;
  font-size: 16px !important;
  line-height: 1.78 !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page ul > li::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 12px !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: var(--sjw-std-blue) !important;
  box-shadow: 0 0 0 5px rgba(11, 111, 179, 0.08) !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page ol {
  padding-left: 28px !important;
  list-style: decimal outside !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page ol > li {
  position: static !important;
  margin: 0 0 11px !important;
  padding-left: 6px !important;
  color: var(--sjw-std-text) !important;
  font-size: 16px !important;
  line-height: 1.78 !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page ol > li::before {
  display: none !important;
  content: none !important;
}

/* ================================================================
   06. Links and standard buttons
================================================================ */

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page a:not(.btn):not(.readmore):not(.sjw-global-btn):not(.sjw-download-link) {
  color: var(--sjw-std-blue) !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(11, 111, 179, 0.24) !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page a:not(.btn):not(.readmore):not(.sjw-global-btn):not(.sjw-download-link):hover,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page a:not(.btn):not(.readmore):not(.sjw-global-btn):not(.sjw-download-link):focus {
  color: #d58b00 !important;
  border-bottom-color: rgba(243, 178, 51, 0.58) !important;
}

/* v6: Automatically generated telephone/email links.
   They stay inline and readable instead of becoming large buttons. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page a.sjw-contact-link {
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(11, 111, 179, 0.30) !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--sjw-std-blue) !important;
  font: inherit !important;
  font-weight: 800 !important;
  line-height: inherit !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  transform: none !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page a.sjw-contact-link:hover,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page a.sjw-contact-link:focus {
  color: #d58b00 !important;
  border-bottom-color: rgba(243, 178, 51, 0.70) !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page a.sjw-contact-link:focus-visible {
  outline: 2px solid rgba(11, 111, 179, 0.30) !important;
  outline-offset: 3px !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .btn,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .btn-primary,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .sjw-global-btn,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page a.readmore,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .readmore a,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .sjw-download-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-height: 46px !important;
  margin: 8px 8px 8px 0 !important;
  padding: 0 22px !important;
  border: 1px solid rgba(11, 36, 71, 0.96) !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #0b2447 0%, #0d3565 100%) !important;
  color: #ffffff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.35px !important;
  text-decoration: none !important;
  border-bottom-color: rgba(11, 36, 71, 0.96) !important;
  box-shadow: 0 14px 30px rgba(11, 36, 71, 0.16) !important;
  transition: transform .2s ease, background .2s ease, border-color .2s ease !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .btn:hover,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .btn-primary:hover,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .sjw-global-btn:hover,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page a.readmore:hover,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .readmore a:hover,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .sjw-download-link:hover {
  transform: translateY(-2px) !important;
  background: linear-gradient(135deg, #f3b233 0%, #ffd66d 100%) !important;
  border-color: var(--sjw-std-gold) !important;
  color: var(--sjw-std-navy) !important;
}


/* ================================================================
   06A. Smart image layout
   JS marks image-only content blocks so ordinary article images can
   form a responsive gallery without affecting text or old pages.
================================================================ */

/* Neutralize legacy/button/decorative styling around image-only content. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-item,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery-inline,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page a.sjw-standard-image-link {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

/* Stop decorative circles/pills inherited from other project rules. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-item::before,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-item::after,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery::before,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery::after,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery-inline::before,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery-inline::after,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page a.sjw-standard-image-link::before,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page a.sjw-standard-image-link::after {
  content: none !important;
  display: none !important;
}

/* Linked images must behave as images, never as large buttons/pills. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page a.sjw-standard-image-link {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: inherit !important;
  text-decoration: none !important;
  transform: none !important;
}

/* A single image-only block. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-item {
  width: calc(100% - 128px) !important;
  max-width: 980px !important;
  margin: 30px auto !important;
  padding: 0 !important;
  text-align: center !important;
  line-height: 0 !important;
  overflow: visible !important;
}

/* Multiple consecutive image-only blocks. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery-inline {
  width: calc(100% - 96px) !important;
  max-width: 1020px !important;
  margin: 32px auto !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
  align-items: start !important;
  justify-items: stretch !important;
  overflow: visible !important;
  line-height: 0 !important;
}

/* v5: Joomla editor markup may contain float/alignment/margin styles.
   Once JS identifies a real image gallery, every gallery cell is normalized
   so both images always start on the same row. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery > .sjw-image-cell,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery-inline > .sjw-image-cell {
  display: block !important;
  float: none !important;
  position: static !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  align-self: start !important;
  justify-self: stretch !important;
  text-align: center !important;
  line-height: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

/* Reset legacy editor alignment on everything inside a generated cell. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-cell > *,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-cell a,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-cell picture,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-cell span {
  float: none !important;
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  vertical-align: top !important;
}

/* The actual image is always proportional and anchored to the top. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-cell img.sjw-standard-image {
  display: block !important;
  float: none !important;
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  object-fit: contain !important;
  object-position: center top !important;
  vertical-align: top !important;
}


/* Three or more images use an adaptive grid on wider screens. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery.sjw-image-gallery-many,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery-inline.sjw-image-gallery-many {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
}

/* Children in a generated gallery must not keep paragraph spacing. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery > .sjw-image-item,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery-inline > .sjw-image-item {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery > .sjw-image-cell,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery-inline > .sjw-image-cell {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
}

/* Gallery images fill their grid cell while preserving the original ratio. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery img.sjw-standard-image,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page .sjw-image-gallery-inline img.sjw-standard-image {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: center top !important;
  border-radius: 18px !important;
}

/* Prevent editor width/height attributes from creating horizontal overflow. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
  .item-page img.sjw-standard-image {
  max-width: 100% !important;
  height: auto !important;
}

/* Tablet: keep two images side-by-side when enough space is available. */
@media (max-width: 900px) {
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-item {
    width: calc(100% - 56px) !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery-inline {
    width: calc(100% - 48px) !important;
    gap: 16px !important;
  }
}

/* Mobile: images stack cleanly with no crop and no horizontal scrolling. */
@media (max-width: 680px) {
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-item,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery-inline {
    width: calc(100% - 28px) !important;
    max-width: none !important;
    margin: 22px auto !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery-inline,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery.sjw-image-gallery-many,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery-inline.sjw-image-gallery-many {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery > .sjw-image-item,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery-inline > .sjw-image-item {
    width: 100% !important;
    margin: 0 !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery > .sjw-image-cell,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery-inline > .sjw-image-cell {
    width: 100% !important;
    margin: 0 !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery img.sjw-standard-image,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component
    .item-page .sjw-image-gallery-inline img.sjw-standard-image {
    border-radius: 14px !important;
  }
}

/* ================================================================
   07. Images, video, quote
================================================================ */

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 32px auto !important;
  border-radius: 20px !important;
  box-shadow: 0 18px 46px rgba(11, 36, 71, 0.10) !important;
  object-fit: contain !important;
  object-position: center top !important;
}

/* Utility opt-out for logos/icons/small images inside future articles. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page img.sjw-image-plain,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page img.sjw-image-inline {
  display: inline-block !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .sjw-media-wrap {
  width: calc(100% - 128px) !important;
  max-width: 900px !important;
  margin: 34px auto !important;
  overflow: hidden !important;
  border-radius: 24px !important;
  background: #ffffff !important;
  box-shadow: 0 22px 56px rgba(11, 36, 71, 0.11) !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .sjw-media-wrap iframe,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .sjw-media-wrap video {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  border: 0 !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page blockquote {
  margin-top: 36px !important;
  margin-bottom: 36px !important;
  padding: 28px 32px !important;
  border: 0 !important;
  border-left: 5px solid var(--sjw-std-gold) !important;
  border-radius: 22px !important;
  background: var(--sjw-std-soft) !important;
  box-shadow: 0 16px 40px rgba(11, 36, 71, 0.07) !important;
}

/* ================================================================
   08. Tables
================================================================ */

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .sjw-table-wrap {
  width: calc(100% - 128px) !important;
  max-width: 960px !important;
  margin: 34px auto !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border: 1px solid var(--sjw-std-line) !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 48px rgba(11, 36, 71, 0.09) !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .sjw-table-wrap table,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page table.sjw-standard-table {
  width: 100% !important;
  min-width: 640px !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: collapse !important;
  background: #ffffff !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component table th,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component table td {
  padding: 15px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid #e3edf6 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  text-align: left !important;
  vertical-align: top !important;
  white-space: normal !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component table th {
  background: var(--sjw-std-navy-2) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component table tr:nth-child(even) td {
  background: #f8fbff !important;
}

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component table tr:last-child td {
  border-bottom: 0 !important;
}

/* ================================================================
   09. Joomla article tools - Print and Email must never appear
================================================================ */

body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .print-icon,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .email-icon,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .icons .print-icon,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .icons .email-icon,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .actions .print-icon,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .actions .email-icon {
  display: none !important;
}

/* Joomla 3.x may render Print/Email inside a utility dropdown. On standard
   pages the utility container itself is hidden so there is no flash of
   unstyled Print/Email links before JavaScript runs. */
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .icons,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .actions,
body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .btn-group.pull-right {
  display: none !important;
}

/* ================================================================
   10. Responsive
================================================================ */

@media (max-width: 768px) {
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page {
    border-radius: 24px !important;
    padding-bottom: 44px !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .page-header {
    padding: 38px 26px 30px !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .page-header h1,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > .page-header h2 {
    font-size: clamp(31px, 9vw, 42px) !important;
    letter-spacing: -0.8px !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > p,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h2,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h3,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h4,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h5,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h6,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > ul,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > ol,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > blockquote,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > div:not(.page-header):not(.icons):not(.article-info):not(.actions),
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .sjw-table-wrap,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .sjw-media-wrap {
    width: calc(100% - 48px) !important;
    max-width: none !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > p:first-of-type {
    margin-top: 32px !important;
    font-size: 18px !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page h2 {
    margin-top: 40px !important;
    font-size: 28px !important;
  }
}

@media (max-width: 480px) {
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > p,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h2,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h3,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h4,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h5,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > h6,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > ul,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > ol,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > blockquote,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page > div:not(.page-header):not(.icons):not(.article-info):not(.actions),
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .sjw-table-wrap,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .sjw-media-wrap {
    width: calc(100% - 34px) !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page p {
    font-size: 16px !important;
    line-height: 1.78 !important;
  }

  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .btn,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .btn-primary,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .sjw-global-btn,
  body.sjw-site-new.sjw-standard-page.option-com_content.view-article #content.sjw-component .item-page .sjw-download-link {
    min-height: 44px !important;
    padding: 0 18px !important;
    font-size: 12px !important;
  }
}
