/* LIMM Skills Academy — presentation fixes applied over the generated theme. */

/* 1. Buttons: never green text on a green field. */
.sog-article a.btn,
.sog-article a.btn:visited { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); text-decoration: none; }
.sog-article a.btn:hover { background: var(--accent-hover, #185741); border-color: var(--accent-hover, #185741); color: #fff; }
.band-inverse .btn { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.band-inverse .btn:hover { background: #fff; border-color: #fff; color: var(--accent); }
.band-inverse .btn-ghost { background: transparent; border-color: #fff; color: #fff; }
.band-inverse .btn-ghost:hover { background: #fff; border-color: #fff; color: var(--accent); }

/* 2. Footer social icons sit in a row. */
.site-footer .footer-grid ul.social,
.topbar .social { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }

/* 3. Gallery: three equal cards with aligned captions. */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
.gallery .photo,
.gallery figure { margin: 0; }
.gallery .photo:first-child { grid-row: auto; }
.gallery img,
.gallery .photo:first-child img,
.gallery .photo:nth-child(2) img,
.gallery .photo:nth-child(3) img { width: 100%; height: auto; min-height: 0; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { min-height: 1.5em; }
@media (max-width: 900px) { .gallery { grid-template-columns: 1fr; } }

/* 4. Home hero spans the full viewport width. */
body.home .hero { padding: 0; }
body.home .hero .hero-grid {
  width: 100%;
  max-width: none;
  margin: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: 0;
  align-items: stretch;
  min-height: clamp(540px, 72vh, 800px);
}
body.home .hero .hero-grid > .wp-block-group:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 860px;
  margin-left: auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.25rem, 6vw, 6rem);
}
body.home .hero-visual { padding: 0; display: flex; min-height: 100%; }
body.home .hero-photo { margin: 0; width: 100%; height: 100%; }
body.home .hero-photo img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 0; }
body.home .hero-photo figcaption { position: absolute; right: 0.9rem; bottom: 0.7rem; margin: 0; padding: 0.2rem 0.55rem; background: rgba(255, 255, 255, 0.86); border-radius: 6px; }
body.home .hero-badge { position: absolute; left: clamp(0.75rem, 3vw, 2.5rem); bottom: 2rem; width: min(300px, 62%); z-index: 3; }
@media (max-width: 900px) {
  body.home .hero .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  body.home .hero .hero-grid > .wp-block-group:first-child { margin: 0; max-width: none; padding: 2.25rem 1.25rem 1.5rem; }
  body.home .hero-visual { display: block; padding: 0 0 2.5rem; }
  body.home .hero-photo img { height: auto; aspect-ratio: 4 / 3; }
  body.home .hero-photo figcaption { position: static; background: none; padding: 0.5rem 0 0; }
  body.home .hero-badge { left: 1rem; bottom: 3.5rem; width: min(260px, 70%); }
}

/* 5. Imported article pages: comfortable reading measure, aligned media. */
.sog-article img { border-radius: 12px; }
.sog-article .sog-embed { margin: 1.5em 0; }
.sog-article .sog-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; }

/* 6. Course cards: equal heights inside each row. */
.sog-course-grid { grid-auto-rows: 1fr; }
.sog-course-grid li { display: flex; }
.sog-course-grid a { width: 100%; }

/* 7. Awarding-body partner row (About page). */
.partner-list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.partner-list li { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: center; min-width: 180px; min-height: 96px; }
.partner-list img { height: 56px; width: auto; max-width: 200px; object-fit: contain; }

/* 8. Tighter join between a page hero and the article body. */
.page-hero + .sog-article-section { padding-top: clamp(1rem, 2.5vw, 2rem); }

/* 9. Mobile: the hero badge sits below the photo instead of over the copy. */
@media (max-width: 900px) {
  body.home .hero-badge { position: static; width: auto; margin: 1rem 1.25rem 0; }
  body.home .hero-visual { padding-bottom: 1.5rem; }
}

/* 10. Stop intrinsic image sizes from widening CSS grid/flex tracks (mobile overflow). */
:where(.hero-grid, .gallery, .split, .visit, .stats, .footer-grid, .sog-course-grid) > * { min-width: 0; }
.sog-article img, .photo img, .hero-photo img { max-width: 100%; }

/* 11. No horizontal scrolling from decorative pseudo-elements. */
html, body { overflow-x: clip; }

/* 12. Remove the double gap between page hero and body. */
.page-hero + .sog-article-section { padding-top: 0; }
.sog-article > :first-child { margin-top: 0; }

/* 13. Contact form layout. */
.contact-form form.wpcf7-form { display: block; }
.sog-form-head h3 { margin: 0 0 0.35rem; font-size: 1.35rem; line-height: 1.2; }
.sog-form-head p { margin: 0 0 1.35rem; color: var(--ink-soft); font-size: 0.95rem; }
.sog-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.sog-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.sog-field--full { grid-column: 1 / -1; }
.sog-field > label { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.sog-field .req { color: var(--accent); }
.sog-field .opt { text-transform: none; letter-spacing: 0; font-weight: 500; opacity: 0.75; }
.sog-field .wpcf7-form-control-wrap { display: block; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.45;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.wpcf7-form textarea { min-height: 132px; resize: vertical; }
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder { color: #9a948a; opacity: 1; }
.wpcf7-form input.wpcf7-not-valid,
.wpcf7-form textarea.wpcf7-not-valid { border-color: #c04a32; }
.wpcf7-not-valid-tip { margin-top: 0.25rem; font-size: 0.78rem; color: #a3341f; }
.sog-form-actions { margin-top: 1.3rem; }
.sog-form-actions .btn { width: auto; }
.sog-form-actions .wpcf7-spinner { margin-left: 0.6rem; }
.sog-form-note { margin: 0.9rem 0 0; font-size: 0.82rem; color: var(--ink-soft); }
.wpcf7-form .wpcf7-response-output {
  margin: 1.1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.wpcf7-form.sent .wpcf7-response-output { background: var(--accent-tint); border-color: var(--accent); color: #14392c; }
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.aborted .wpcf7-response-output { background: #f8e7e2; border-color: #c04a32; color: #7a2314; }
.wpcf7-form fieldset.hidden-fields-container { display: none; }
@media (max-width: 640px) {
  .sog-form-grid { grid-template-columns: 1fr; }
  .sog-form-actions .btn { width: 100%; justify-content: center; }
}

/* 14. Content pages: reading column + enquiry card. */
.sog-article { width: min(1120px, 100%); }
.sog-page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(1.75rem, 4vw, 3.25rem); align-items: start; }
.sog-page-main { min-width: 0; }
.sog-page-aside { display: grid; gap: 1rem; position: sticky; top: 1.5rem; }
.sog-page-figure { margin: 0 0 1.9rem; }
.sog-page-figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; display: block; }
.sog-aside-card { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 1.3rem 1.35rem; box-shadow: var(--shadow-badge); }
.sog-aside-label { margin: 0 0 0.35rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); }
.sog-aside-card h2 { margin: 0 0 0.5rem; font-size: 1.15rem; line-height: 1.25; }
.sog-aside-card h2::before { display: none; }
.sog-aside-card p { margin: 0 0 0.9rem; font-size: 0.9rem; line-height: 1.55; color: var(--ink-soft); }
.sog-aside-card .btn { width: 100%; justify-content: center; margin: 0 0 1rem; padding: 0.75rem 1rem; }
.sog-aside-list { list-style: none; margin: 0; padding: 0.95rem 0 0; border-top: 1px solid var(--rule); display: grid; gap: 0.65rem; font-size: 0.86rem; line-height: 1.4; }
.sog-aside-list li { margin: 0; }
.sog-aside-list span { display: block; margin-bottom: 0.1rem; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.sog-aside-list a { color: var(--accent); text-decoration: none; }
.sog-aside-list a:hover { text-decoration: underline; }
.sog-aside-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.86rem; }
.sog-aside-toc li { margin: 0; }
.sog-aside-toc a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.sog-aside-toc a:hover { color: var(--accent); border-bottom-color: currentColor; }

/* 15. Article typography: sections get a rule, sub-heads get colour. */
.sog-page-main > p:first-child { font-size: 1.12rem; line-height: 1.65; color: #37413c; }
.sog-article h2 { position: relative; margin-top: 2.4em; padding-top: 1rem; }
.sog-article h2::before { content: ""; position: absolute; top: 0; left: 0; width: 46px; height: 4px; border-radius: 2px; background: var(--accent); }
.sog-article h2:first-child { margin-top: 0; }
.sog-article h3 { color: var(--accent); }
.sog-article ul li::marker { color: var(--accent); }
.sog-article hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.sog-article table th { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* 16. Policy documents as cards. */
.sog-doc-list { list-style: none; margin: 1.1rem 0 2.2rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.7rem; }
.sog-doc-list li { margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 0.8rem 1rem; font-size: 0.92rem; line-height: 1.4; }
.sog-doc-list li a { font-weight: 600; color: var(--ink); text-decoration: none; }
.sog-doc-list li a:hover { text-decoration: underline; }
.sog-doc-list li span { display: block; margin-top: 0.15rem; font-size: 0.76rem; color: var(--ink-soft); }

/* 17. Collapse the layout on tablets. */
@media (max-width: 900px) {
  .sog-page-layout { grid-template-columns: 1fr; }
  .sog-page-aside { position: static; }
  .sog-page-figure { margin-bottom: 1.4rem; }
}

/* 18. Page figure: a banner, not a poster. */
.sog-page-figure img { aspect-ratio: 16 / 7; max-height: 320px; }

/* 19. Course links as numbered cards. */
.sog-course-list { list-style: none; counter-reset: course; margin: 1.1rem 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.7rem; }
.sog-course-list li { margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; transition: border-color 0.15s ease; }
.sog-course-list li:hover { border-color: var(--accent); }
.sog-course-list li a { display: block; position: relative; padding: 0.85rem 1rem 0.85rem 2.7rem; font-weight: 600; font-size: 0.94rem; line-height: 1.35; color: var(--ink); text-decoration: none; }
.sog-course-list li a::before { counter-increment: course; content: counter(course, decimal-leading-zero); position: absolute; left: 1rem; top: 0.9rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); }

/* 20. Sub-headings and contents list. */
.sog-article h3 { margin-top: 1.9em; font-size: 1.08rem; }
.sog-page-main > p:first-of-type { font-size: 1.12rem; line-height: 1.65; color: #37413c; }
.sog-aside-toc li.lvl-3 { padding-left: 0.85rem; font-size: 0.82rem; }
