/*
Theme Name: Logtrain
Theme URI: https://www.logtrain.africa
Author: Logtrain International
Description: Block theme for logtrain.africa — customs, import and export training.
Version: 1.13.19
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: logtrain
*/

.wp-site-blocks > * { margin-block-start: 0; }
main.wp-block-group { margin-top: 0; }
.wp-block-post-content > * { margin-block-start: 0; }

/* Sections */
.lt-section { padding-top: 64px; padding-bottom: 64px; }
.lt-section.lt-hero { padding-top: 64px; padding-bottom: 72px; }
.has-white-color :is(h1, h2, h3, h4), .has-white-color a:not(.wp-block-button__link) { color: #FFFFFF; }
.has-navy-background-color p, .has-dark-background-color p { color: #DCE4F2; }
.has-navy-background-color .lt-card p, .has-dark-background-color .lt-card p { color: #4A5568; }
.has-navy-background-color .lt-card :is(h2, h3), .has-dark-background-color .lt-card :is(h2, h3) { color: #12306A; }

/* Grids of cards */
.wp-block-columns.lt-grid, .wp-block-columns.lt-split { flex-wrap: wrap !important; gap: 20px; }
.wp-block-columns.lt-grid > .wp-block-column { flex: 1 1 240px !important; min-width: 240px; }
.wp-block-columns.lt-split > .wp-block-column { flex: 1 1 340px !important; min-width: 300px; }
.lt-card { background: #FFFFFF; border: 1px solid #DDE2EA; border-radius: 10px; padding: 24px; }
.lt-card > * + * { margin-top: 8px !important; }
.lt-card h3 a { text-decoration: none; }
.lt-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #4A5568; }
.lt-crumbs { font-size: 14px; }
.lt-more a { font-weight: 700; text-decoration: none; }
.lt-placeholder { border: 2px dashed #8FA2C8; border-radius: 10px; padding: 48px 24px; text-align: center; color: #4A5568; }
.has-navy-background-color .lt-placeholder { color: #C3D0EA; border-color: #6F86B8; }

/* Buttons */
.wp-block-button__link { text-decoration: none; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: #12306A; border: 2px solid #12306A; padding: 12px 24px; }
.has-navy-background-color .wp-block-button.is-style-outline .wp-block-button__link { color: #FFFFFF; border-color: #FFFFFF; }
.has-yellow-background-color .wp-block-button__link { background: #0B1F47; color: #FFFFFF; }

/* FAQs */
.wp-block-details { padding: 14px 0; }
.wp-block-details summary { cursor: pointer; font-weight: 700; color: #0E1A2F; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; flex: none; font-size: 28px; font-weight: 400; line-height: 1; color: #12306A; }
.wp-block-details[open] summary::after { content: "\2212"; }
.wp-block-details summary:hover { color: #12306A; }
.wp-block-details p { color: #4A5568; margin-top: 10px; }

/* Header */
.lt-topbar { padding-top: 8px; padding-bottom: 8px; font-size: 14px; }
.lt-topbar-inner { gap: 24px; }
.lt-topbar p { margin: 0; }
.lt-topbar a { color: #FFFFFF; text-decoration: none; }
.lt-header { border-bottom: 1px solid #DDE2EA; padding-top: 18px; padding-bottom: 18px; background: #FFFFFF; }
.lt-header .wp-block-site-title a { color: #12306A; text-decoration: none; font-weight: 700; font-size: 32px; display: inline-flex; align-items: flex-end; gap: 6px; }
.lt-header .wp-block-site-title a::before { content: ""; width: 32px; height: 32px; background: #F5C42C; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.lt-header .wp-block-navigation { font-weight: 600; gap: 28px; }
.lt-header .wp-block-navigation a { text-decoration: none; }
.lt-header .wp-block-navigation__submenu-container { border: 1px solid #DDE2EA !important; border-radius: 8px; padding: 8px !important; box-shadow: 0 12px 30px rgba(11,31,71,.14); min-width: 290px !important; }
.lt-header .wp-block-navigation__submenu-container a { padding: 8px 12px !important; }

/* Footer */
.lt-footer { padding-top: 56px; padding-bottom: 32px; font-size: 15px; }
.lt-footer p { color: #C9D3E6; margin: 0 0 8px; }
.lt-footer a { color: #C9D3E6 !important; text-decoration: none !important; }
.lt-footer a:hover, .lt-footer a:focus { color: #FFFFFF !important; }
.lt-wa a, .lt-tel a, .lt-mail a { display: inline-flex; align-items: center; gap: 8px; }
.lt-wa a::before { content: ""; width: 18px; height: 18px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2325D366' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z'/%3E%3C/svg%3E") no-repeat center / contain; }
.lt-footer h4 { color: #FFFFFF; font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.lt-footer .lt-copy { border-top: 1px solid #22396A; padding-top: 20px; margin-top: 24px; font-size: 14px; }

.lt-tel a::before, .lt-mail a::before { content: ""; width: 16px; height: 16px; flex: none; }
.lt-tel a::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5C42C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") no-repeat center / contain; }
.lt-mail a::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5C42C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E") no-repeat center / contain; }
.lt-topbar .lt-wa a::before { width: 16px; height: 16px; }
.lt-topbar a:hover { color: #F5C42C; }

/* Client logo slider (gallery with class lt-logos) */
.wp-block-gallery.lt-logos { gap: 40px; align-items: center; justify-content: center; }
.wp-block-gallery.lt-logos .wp-block-image { flex: none !important; width: auto !important; margin: 0 !important; }
.lt-logos img { height: 56px !important; width: auto !important; max-width: none !important; object-fit: contain !important; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.lt-logos img:hover { filter: none; opacity: 1; }
.lt-logos.is-marquee { display: block !important; overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.lt-logos-track { display: flex; align-items: center; width: max-content; animation: lt-marquee var(--lt-dur, 30s) linear infinite; }
.lt-logos-track > * { flex: none !important; margin: 0 48px 0 0 !important; }
.lt-logos-track:hover { animation-play-state: paused; }
@keyframes lt-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .lt-logos-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .lt-logos-track > [aria-hidden="true"] { display: none; }
}

/* Hero picture box: full height of the text column, top level with the headline */
.lt-hero .wp-block-columns.lt-split { align-items: stretch !important; }
.lt-hero .lt-split > .wp-block-column:has(.lt-placeholder), .lt-hero .lt-split > .wp-block-column:has(> .wp-block-image) { display: flex; flex-direction: column; }
.lt-hero .lt-split .lt-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 420px; margin: 0; }
.lt-hero .lt-split > .wp-block-column > .wp-block-image { flex: 1; margin: 0; min-height: 420px; }
.lt-hero .lt-split > .wp-block-column > .wp-block-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
@media (min-width: 900px) {
  /* Only when the text starts with a small line above the headline (homepage): drop the picture to the headline */
  .lt-hero .lt-split:has(> .wp-block-column:first-child > p:first-child + h1) .lt-placeholder,
  .lt-hero .lt-split:has(> .wp-block-column:first-child > p:first-child + h1) > .wp-block-column > .wp-block-image { margin-top: 44px; }
}

/* Course cards: label, heading, text and link line up across every card in a row */
.wp-block-columns.lt-grid:has(> .lt-card > .lt-label) { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.wp-block-columns.lt-grid:has(> .lt-card > .lt-label) > .lt-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 10px; align-content: start; min-width: 0 !important; }
.wp-block-columns.lt-grid:has(> .lt-card > .lt-label) > .lt-card > * { margin: 0 !important; }

/* Yellow brand accent on course cards */
.lt-card:has(> .lt-label) { border-top: 4px solid #F5C42C; transition: box-shadow .2s, border-color .2s; }
.lt-card:has(> .lt-label):hover { border-color: #F5C42C; box-shadow: 0 10px 28px rgba(11,31,71,.10); }

/* Homepage "About Logtrain": four yellow boxes span the full height of the text beside them */
.wp-block-columns.lt-split:has(> .wp-block-column > .lt-grid) { align-items: stretch !important; }
.lt-split > .wp-block-column:has(> .lt-grid) { display: flex; }
.lt-split > .wp-block-column > .wp-block-columns.lt-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 20px; flex: 1; margin: 0 !important; }
.lt-split > .wp-block-column > .lt-grid > .lt-card { background: #F5C42C; border-color: #F5C42C; min-width: 0 !important; display: flex; flex-direction: column; justify-content: center; }
.lt-split > .wp-block-column > .lt-grid > .lt-card :is(h3, p) { color: #0B1F47; }
@media (max-width: 600px) { .lt-split > .wp-block-column > .wp-block-columns.lt-grid { grid-template-columns: 1fr; } }

/* Links inside body text: yellow underline */
main p:not(.lt-more):not(.lt-crumbs) a:not(.wp-block-button__link), main li a { text-decoration-color: #F5C42C; text-decoration-thickness: 2px; text-underline-offset: 4px; font-weight: 600; }
main p:not(.lt-more):not(.lt-crumbs) a:not(.wp-block-button__link):hover { text-decoration-thickness: 3px; }

/* "Why Logtrain" section */
.lt-why .lt-split > .wp-block-column:first-child { flex: 3 1 420px !important; }
.lt-why .lt-split > .lt-panel { flex: 2 1 320px !important; }
.lt-panel { padding: 36px; border-radius: 12px; border-top: 4px solid #F5C42C; }
.lt-panel p { color: #DCE4F2; }
.lt-checks { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; margin-top: 24px !important; }
.lt-checks li { position: relative; padding-left: 34px; font-weight: 600; color: #12306A; }
.lt-checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: #F5C42C url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1F47' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / 14px; }
.lt-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lt-chips li { border: 1px solid #F5C42C; color: #FFFFFF; border-radius: 999px; padding: 4px 14px; font-size: 14px; font-weight: 600; }

/* FAQ section: intro left, questions right */
.lt-faq .lt-split > .lt-faq-intro { flex: 1 1 300px !important; }
.lt-faq .lt-split > .lt-faq-list { flex: 2 1 480px !important; }
.lt-faq .lt-faq-intro p { max-width: 360px; color: #4A5568; }
.lt-faq .lt-faq-intro .wp-block-buttons { margin-top: 24px; }

.lt-footer :is(.lt-tel, .lt-wa, .lt-mail) a::before { width: 18px; height: 18px; }

/* Sticky header: top bar and menu stay visible while scrolling */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 100; transition: box-shadow .2s; }
.wp-site-blocks > header.wp-block-template-part.is-scrolled { box-shadow: 0 6px 20px rgba(11,31,71,.15); }
body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }

/* Hero: same text/picture proportions on every page */
.lt-hero .lt-split > .wp-block-column:first-child { flex: 1 1 480px !important; }
.lt-hero .lt-split > .wp-block-column:last-child { flex: 1 1 420px !important; }

/* Hero intro text: larger lead size */
.lt-hero p:not(.lt-label):not(.lt-crumbs):not(.lt-placeholder):not(.lt-more) { font-size: 19px; }

/* Contact page: "Prefer to talk?" panel */
.lt-contact { margin-bottom: 20px; }
.lt-contact > * + * { margin-top: 14px !important; }
.lt-contact a { color: #FFFFFF !important; font-weight: 700; text-decoration: none !important; }
.lt-contact a:hover { color: #F5C42C !important; }
.lt-contact :is(.lt-tel, .lt-wa, .lt-mail) a::before { width: 20px; height: 20px; }
.lt-contact :is(.lt-tel, .lt-wa, .lt-mail) a { gap: 12px; }
.lt-hours { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #C9D3E6 !important; }
.lt-hours::before { content: ""; width: 20px; height: 20px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5C42C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") no-repeat center / contain; }

/* Facilitator panel on course pages */
.lt-panel .lt-label { color: #F5C42C; }
.lt-panel > * + * { margin-top: 10px !important; }

/* Hero picture: exactly the height of the text beside it (top = headline, bottom = buttons) */
.lt-hero .lt-split > .wp-block-column:last-child:has(> .lt-placeholder:only-child),
.lt-hero .lt-split > .wp-block-column:last-child:has(> .wp-block-image:only-child) { position: relative; display: block !important; min-height: 320px; }
.lt-hero .lt-split > .wp-block-column:last-child > .lt-placeholder:only-child,
.lt-hero .lt-split > .wp-block-column:last-child > .wp-block-image:only-child { position: absolute; inset: 0; margin: 0 !important; min-height: 0 !important; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lt-hero .lt-split > .wp-block-column > .wp-block-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
/* Small line above the homepage headline: fixed size so the picture can line up with the headline */
.lt-hero .lt-split > .wp-block-column:first-child > p:first-child:has(+ h1) { font-size: 14px !important; line-height: 20px; margin: 0; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #F5C42C !important; }
@media (min-width: 900px) {
  .lt-hero .lt-split:has(> .wp-block-column:first-child > p:first-child + h1) > .wp-block-column > :is(.lt-placeholder, .wp-block-image) { top: calc(20px + 1.1rem); }
}

/* Placeholder logos keep their dashed frame visible */
.lt-logos img[src*="client-logo-"] { filter: none; opacity: 1; height: 72px !important; }

/* Footer: columns spread evenly from the left margin to the right margin */
.lt-footer .wp-block-columns.lt-grid { display: flex !important; flex-wrap: wrap !important; justify-content: space-between; gap: 32px 48px; }
.lt-footer .wp-block-columns.lt-grid > .wp-block-column { flex: 0 1 auto !important; min-width: 0 !important; }
.lt-footer .wp-block-columns.lt-grid > .wp-block-column:first-child { max-width: 270px; }

/* Enquiry form */
.lt-form { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.lt-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; color: #0E1A2F; }
.lt-form input[type=text], .lt-form input[type=email], .lt-form input[type=tel], .lt-form select, .lt-form textarea { font: inherit; font-weight: 400; font-size: 16px; color: #0E1A2F; border: 1px solid #B8C2D3; border-radius: 6px; padding: 12px; background: #fff; width: 100%; box-sizing: border-box; min-height: 46px; }
.lt-form :is(input, select, textarea):focus { outline: 2px solid #12306A; outline-offset: 1px; }
.lt-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.lt-radio { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.lt-radio legend { font-weight: 600; font-size: 15px; margin-bottom: 8px; width: 100%; }
.lt-radio label { flex-direction: row; align-items: center; gap: 10px; border: 1px solid #B8C2D3; border-radius: 6px; padding: 10px 16px; font-weight: 500; }
.lt-consent { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; font-size: 14px !important; color: #4A5568 !important; }
.lt-consent input { margin-top: 3px; }
.lt-form button { align-self: flex-start; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 17px; background: #F5C42C; color: #0B1F47; padding: 14px 28px; border-radius: 6px; min-height: 48px; }
.lt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lt-form-ok { background: #E8F1E4; color: #1F4D1A; border-radius: 8px; padding: 18px; font-weight: 600; }
.lt-form-err { background: #FDECEA; color: #8A1C12; border-radius: 8px; padding: 18px; font-weight: 600; margin-bottom: 8px; }

/* Contact page: wide form column, narrower contact panel */
.lt-hero .lt-split:has(.lt-form) > .wp-block-column:first-child { flex: 2 1 560px !important; padding: 36px; }
.lt-hero .lt-split:has(.lt-form) > .wp-block-column:last-child { flex: 1 1 300px !important; }

/* Official Logtrain logo */
.lt-header .wp-block-site-title a { display: block; width: 210px; height: 46px; background: url(assets/logtrain-logo.png) no-repeat left center / contain; color: transparent !important; font-size: 0 !important; line-height: 0; }
.lt-header .wp-block-site-title a::before { display: none !important; }
.lt-footer .wp-block-column:first-child h4 { width: 132px; height: 29px; background: url(assets/logtrain-logo-white.png) no-repeat left center / contain; color: transparent !important; font-size: 0 !important; margin-bottom: 8px !important; }
@media (max-width: 600px) { .lt-header .wp-block-site-title a { width: 170px; height: 37px; } }

/* Client logo tiles */
.lt-logos img[src*="assets/clients/"] { height: 96px !important; width: auto !important; filter: none; opacity: 1; border-radius: 10px; }

/* Consistent typography across the whole site */
body, button, input, select, textarea, .wp-element-button, .wp-block-button__link, .wp-block-navigation, .wp-block-site-title { font-family: "Montserrat", sans-serif !important; }
main p, main li, .wp-block-details p { font-size: 17px; }
.lt-card p:not(.lt-label):not(.lt-more), .lt-panel p:not(.lt-label) { font-size: 17px; }
.lt-label, .lt-card .lt-label { font-size: 13px !important; }
.lt-crumbs { font-size: 14px !important; }
.lt-more, .lt-more a { font-size: 17px; }
main h2 { font-size: clamp(1.625rem, 3vw, 2rem); }
main h3, .lt-card h3 { font-size: 1.25rem; }
.lt-panel h3 { font-size: 22px; }
.wp-block-details summary { font-size: 17px; }
.lt-checks li { font-size: 17px; }
.lt-footer, .lt-footer p, .lt-footer a { font-size: 15px; }
.lt-topbar, .lt-topbar a { font-size: 14px; }

/* Logo slider: clear space between logo tiles (overrides WordPress gallery sizing) */
.lt-logos-track { gap: 0 !important; }
.lt-logos-track > figure.wp-block-image:not(#lt-x) { flex: 0 0 auto !important; width: auto !important; max-width: none !important; margin: 0 32px 0 0 !important; display: block !important; }
.lt-logos-track > figure.wp-block-image:not(#lt-x) img { width: 192px !important; height: 96px !important; max-width: none !important; object-fit: contain !important; flex: none !important; border-radius: 10px; }
.wp-block-gallery.lt-logos:not(.is-marquee) figure.wp-block-image:not(#lt-x) { width: auto !important; flex: 0 0 auto !important; }
.wp-block-gallery.lt-logos:not(.is-marquee) figure.wp-block-image:not(#lt-x) img { width: 192px !important; height: 96px !important; object-fit: contain !important; }

/* Homepage yellow "About" boxes: bold headings, all aligned to the top */
.lt-split > .wp-block-column > .lt-grid > .lt-card { justify-content: flex-start !important; padding: 28px; }
.lt-split > .wp-block-column > .lt-grid > .lt-card > :first-child { font-weight: 700 !important; font-size: 20px !important; line-height: 1.3; color: #0B1F47 !important; margin: 0 !important; }
.lt-split > .wp-block-column > .lt-grid > .lt-card > * + * { margin-top: 10px !important; }

.lt-panel .lt-label + .lt-chips { margin-top: 8px !important; }
.lt-panel .lt-chips + .lt-label { margin-top: 18px !important; }

/* "Why Logtrain": left column fills the height of the Africa panel */
.lt-why .wp-block-columns.lt-split { align-items: stretch !important; }
.lt-why .lt-split > .wp-block-column:first-child { display: flex; flex-direction: column; }
.lt-why .lt-topics { margin-top: auto !important; padding-top: 28px; border-top: 1px solid #DDE2EA; }
.lt-topic-chips { list-style: none; padding: 0; margin: 12px 0 0 !important; display: flex; flex-wrap: wrap; gap: 10px; }
.lt-topic-chips li { font-size: 15px !important; }
.lt-topic-chips li a { display: inline-block; padding: 8px 16px; border: 1px solid #B8C2D3; border-radius: 999px; color: #12306A; font-weight: 600; text-decoration: none !important; transition: background .2s, border-color .2s; }
.lt-topic-chips li a:hover { background: #FFF4CF; border-color: #F5C42C; }

/* About page: "At a glance" stat panel */
.wp-block-columns.lt-split:has(> .lt-glance) { align-items: stretch !important; }
.lt-glance { border-radius: 12px; border-top: 4px solid #F5C42C; padding: 32px !important; display: flex; flex-direction: column; gap: 20px; }
.lt-glance h3 { color: #FFFFFF !important; margin: 0 !important; font-size: 22px !important; }
.lt-stats { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 14px; margin: 0 !important; }
.lt-stat { background: rgba(255,255,255,.07); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; justify-content: center; margin: 0 !important; }
.lt-stat > * { margin: 0 !important; }
.lt-stat-value { color: #F5C42C !important; font-weight: 700; font-size: 30px !important; line-height: 1.1; }
.lt-stat-label { color: #DCE4F2 !important; font-size: 15px !important; margin-top: 6px !important; }
.lt-glance-note { color: #C9D3E6 !important; font-size: 15px !important; margin: 0 !important; }

/* About: team cards */
.lt-person .lt-placeholder { padding: 0 !important; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; margin: 0 0 8px !important; }
.lt-person .lt-label { color: #12306A !important; white-space: normal !important; }
.lt-person h3 { margin-top: 0 !important; }

/* Cards on dark navy sections (homepage learning path): navy cards as in the design */
.has-dark-background-color .wp-block-column.lt-card { background: #12306A !important; border: 0 !important; border-top: 0 !important; box-shadow: none !important; }
.has-dark-background-color .lt-card :is(h2, h3), .has-dark-background-color .lt-card :is(h2, h3) a { color: #FFFFFF !important; }
.has-dark-background-color .lt-card p:not(.lt-label), .has-dark-background-color .lt-card p:not(.lt-label) a { color: #C9D3E6 !important; }
.has-dark-background-color .lt-card .lt-label { color: #F5C42C !important; }
.has-dark-background-color .lt-card a { text-decoration: none !important; }
.has-dark-background-color .lt-card a:hover { color: #F5C42C !important; }

/* Centred card grids (homepage topics) */
.lt-center > .lt-card { text-align: center; justify-content: flex-start; }
.lt-center > .lt-card > * { margin-left: auto; margin-right: auto; }

/* Homepage topic cards: headings and descriptions level across the row */
.wp-block-columns.lt-grid.lt-center { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.wp-block-columns.lt-grid.lt-center > .lt-card { display: grid !important; grid-row: span 2; grid-template-rows: subgrid; row-gap: 10px; align-content: start; min-width: 0 !important; }
.wp-block-columns.lt-grid.lt-center > .lt-card > * { margin: 0 !important; align-self: start; }
.wp-block-columns.lt-grid.lt-center > .lt-card > h3 { align-self: start; }

/* Address with map-pin icon */
.lt-pin a { display: inline-flex; align-items: flex-start; gap: 8px; }
.lt-pin a::before { content: ""; width: 18px; height: 18px; flex: none; margin-top: 2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5C42C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") no-repeat center / contain; }
.lt-contact .lt-pin a { gap: 12px; }
.lt-contact .lt-pin a::before { width: 20px; height: 20px; }
/* More space between the footer logo and description */
.lt-footer .wp-block-column:first-child h4 { margin-bottom: 16px !important; }

/* South Africa section */
.lt-sa-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.lt-sa-chips li { padding: 8px 16px; border: 1px solid #B8C2D3; border-left: 4px solid #F5C42C; border-radius: 6px; color: #12306A; font-weight: 600; font-size: 15px !important; }


/* Quote sections: large centred quote with attribution, as in the design */
.lt-quote p { text-align: center; margin-left: auto !important; margin-right: auto !important; max-width: 900px; }
.lt-quote p:first-of-type { font-size: 28px !important; font-weight: 600; line-height: 1.35; color: #12306A; }
.lt-quote p:last-of-type { font-size: 15px !important; color: #4A5568; margin-top: 16px !important; }
@media (max-width: 600px) { .lt-quote p:first-of-type { font-size: 22px !important; } }

/* Section header with a single link on the right ("See all 10 courses"), as in the design */
.wp-block-columns.lt-split:has(> .wp-block-column:last-child > .lt-more:only-child) { align-items: flex-end !important; }
.lt-split > .wp-block-column:last-child:has(> .lt-more:only-child) { display: flex; justify-content: flex-end; }
.lt-split > .wp-block-column:last-child > .lt-more:only-child { text-align: right; margin: 0 !important; }
.lt-split > .wp-block-column:last-child > .lt-more:only-child a { text-decoration: underline !important; text-decoration-color: #F5C42C !important; text-decoration-thickness: 2px !important; text-underline-offset: 5px; }

/* South Africa section: everything aligned to the same left edge as the heading */
.lt-sa > .lt-sa-chips { max-width: 1200px; margin: 10px auto 0 !important; }
.lt-sa > p:not(.lt-label) { max-width: min(820px, 100%) !important; margin-left: max(0px, calc((100% - 1200px) / 2)) !important; margin-right: auto !important; }

/* South Africa section: own pale-yellow band, equal space top and bottom */
.lt-section.lt-sa { background: #F5C42C; padding-top: 72px !important; padding-bottom: 72px !important; }
.lt-sa :is(h2, p, .lt-label) { color: #0B1F47 !important; }
.lt-sa-chips li { border-color: #0B1F47 !important; border-left: 4px solid #0B1F47 !important; color: #0B1F47 !important; }
.lt-sa > :first-child { margin-top: 0 !important; }
.lt-sa > :last-child { margin-bottom: 0 !important; }
.lt-sa-chips li { background: #FFFFFF; }

/* Yellow call-to-action bands, as in the design: large heading left, navy button right */
.lt-section.has-yellow-background-color { padding-top: 48px !important; padding-bottom: 48px !important; }
.lt-section.has-yellow-background-color .wp-block-columns.lt-split { align-items: center !important; }
.lt-section.has-yellow-background-color .lt-split > .wp-block-column:first-child p { font-size: 30px !important; font-weight: 700; line-height: 1.25; color: #0B1F47 !important; margin: 0 !important; }
.lt-cta-action { display: flex; justify-content: flex-end; flex: 0 1 auto !important; }
.lt-cta-action .wp-block-buttons { justify-content: flex-end; margin: 0 !important; }
.has-yellow-background-color .lt-cta-action .wp-block-button__link { background: #0B1F47 !important; color: #FFFFFF !important; }
.lt-cta-action .wp-block-button__link { white-space: nowrap; }
.lt-section.has-navy-background-color .lt-split:has(.lt-cta-action) { align-items: center !important; }
.lt-section.has-navy-background-color .lt-split:has(.lt-cta-action) > .wp-block-column:first-child p { font-size: 28px !important; font-weight: 700; color: #FFFFFF !important; margin: 0 !important; }
@media (max-width: 781px) { .lt-cta-action { justify-content: flex-start; } .lt-section.has-yellow-background-color .lt-split > .wp-block-column:first-child p { font-size: 24px !important; } }

/* At a glance tiles: centred */
.lt-stat { align-items: center; text-align: center; }

/* At a glance tiles: figures line up across each row */
.lt-stat { justify-content: center !important; padding: 24px 16px !important; }

/* Courses page: qualification line as a Logtrain-yellow tag */
.lt-card > p.lt-label:nth-last-child(2) { background: #F5C42C; color: #0B1F47 !important; padding: 6px 12px; border-radius: 4px; width: fit-content; justify-self: start; letter-spacing: 0.04em; }

/* Courses page: three cards per row, as in the design */
.wp-block-columns.lt-grid:has(> .lt-card > p.lt-label:nth-last-child(2)) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 960px) { .wp-block-columns.lt-grid:has(> .lt-card > p.lt-label:nth-last-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 600px) { .wp-block-columns.lt-grid:has(> .lt-card > p.lt-label:nth-last-child(2)) { grid-template-columns: 1fr !important; } }

/* Cards: the closing link always sits at the bottom, so links line up across a row */
.wp-block-column.lt-card:not(:has(> .lt-label)) { display: flex !important; flex-direction: column; }
.wp-block-column.lt-card > .lt-more:last-child { margin-top: auto !important; padding-top: 12px; }

/* Courses dropdown opens to the right, starting under the word "Courses" (as in the design) */
.lt-header .wp-block-navigation .has-child > .wp-block-navigation__submenu-container,
.lt-header .wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child > .wp-block-navigation__submenu-container { left: -12px !important; right: auto !important; }

/* Course pages: reading content left, stacked info cards right */
.wp-block-columns.lt-split.lt-course { align-items: flex-start !important; gap: 48px; }
.lt-split.lt-course > .lt-course-main { flex: 2 1 560px !important; }
.lt-split.lt-course > .lt-course-side { flex: 1 1 320px !important; display: flex; flex-direction: column; gap: 20px; }
.lt-course-side > .lt-side-card { margin: 0 !important; padding: 28px; border-radius: 12px; }
.lt-course-side > .lt-side-card > * + * { margin-top: 12px !important; }
.lt-course-side .lt-details { box-shadow: 0 10px 30px rgba(11,31,71,.08); }
.lt-course-side ul, .lt-course-side ol { padding-left: 20px; }
.lt-course-side li { font-size: 15px !important; margin-bottom: 6px; }
.lt-course-side h3 { font-size: 22px !important; }
.lt-course-side .lt-panel p:not(.lt-label) { font-size: 16px !important; }
.lt-btn-wide { width: 100%; }
.lt-btn-wide .wp-block-button__link { width: 100%; text-align: center; }
.lt-details .wp-block-buttons { flex-direction: column; gap: 10px; }
.lt-course-main > h2 { margin-top: 40px !important; }
.lt-course-main > h2:first-child { margin-top: 0 !important; }
.lt-subtitle { font-weight: 600; color: #12306A; font-size: 15px !important; }

/* Course pages: two aligned rows. Row 1 = content | details + audience. Row 2 = FAQ | facilitator. Then "Where it fits" full width. */
.lt-cgrid { display: grid !important; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 40px 48px; align-items: start; }
.lt-cgrid > * { margin: 0 !important; min-width: 0; }
.lt-cg-side { display: flex; flex-direction: column; gap: 20px; }
.lt-cg-side > .lt-side-card { margin: 0 !important; padding: 28px; border-radius: 12px; }
.lt-cg-side > .lt-side-card > * + *, .lt-cg-fac > * + * { margin-top: 12px !important; }
.lt-cg-fac { padding: 28px !important; border-radius: 12px; }
.lt-cg-fac p:not(.lt-label) { font-size: 16px !important; }
.lt-cg-fac h3, .lt-cg-side h3, .lt-cg-where h3 { font-size: 22px !important; }
.lt-cg-side li { font-size: 15px !important; margin-bottom: 6px; }
.lt-cg-side ul { padding-left: 20px; }
.lt-cg-main > h2 { margin-top: 40px !important; }
.lt-cg-main > h2:first-child, .lt-cg-faq > h2:first-child { margin-top: 0 !important; }
.lt-cg-where { grid-column: 1 / -1; background: #F3F5F9; border-radius: 12px; padding: 24px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.lt-cg-where > * { margin: 0 !important; }
.lt-path a { color: #12306A; }
.lt-arrow { color: #F5C42C; font-weight: 700; margin: 0 6px; }
@media (max-width: 860px) { .lt-cgrid { grid-template-columns: 1fr; } }

/* Home, About and In-house heroes fill the screen to the fold on desktop */
@media (min-width: 1024px) and (min-height: 640px) {
	.lt-hero:has(.wp-block-image) { min-height: calc(100vh - var(--lt-above-hero, 156px)); display: flex; flex-direction: column; justify-content: center; }
	.lt-hero:has(.wp-block-image) > .wp-block-columns { width: 100%; }
}

/* Logo strip intro line centred, as in the design */
p:has(+ .lt-logos), p:has(+ .wp-block-gallery.lt-logos) { text-align: center; }

/* South Africa section: white with a yellow edge down the left of the content */
.lt-section.lt-sa { background: #F3F5F9 !important; }
.lt-sa + .lt-faq { background: #FFFFFF !important; }
.lt-sa :is(h2, p) { color: inherit !important; }
.lt-sa h2 { color: #12306A !important; }
.lt-sa .lt-label { color: #4A5568 !important; }
.lt-sa > * { border-left: 6px solid #F5C42C; padding-left: 32px !important; padding-bottom: 18px !important; margin-top: 0 !important; margin-bottom: 0 !important; box-sizing: border-box; }
.lt-sa > :last-child { padding-bottom: 0 !important; }
.lt-sa > .lt-label { padding-bottom: 10px !important; }
.lt-sa-chips li { border: 1px solid #B8C2D3 !important; border-left: 4px solid #F5C42C !important; color: #12306A !important; background: #FFFFFF; }

#enquiry { scroll-margin-top: 140px; }

/* Mobile menu: everything sits behind the menu button; the quote button moves inside it */
.lt-header .lt-nav-cta { display: none !important; }
@media (max-width: 599px) {
	.lt-header .wp-block-buttons { display: none !important; }
	.wp-block-navigation__responsive-container.is-menu-open .lt-nav-cta { display: block !important; margin-top: 16px; }
	.wp-block-navigation__responsive-container.is-menu-open .lt-nav-cta a { background: #F5C42C; color: #0B1F47 !important; padding: 12px 20px !important; border-radius: 6px; font-weight: 700; }
	.wp-block-navigation__responsive-container.is-menu-open { padding: 32px 24px !important; }
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 18px; font-weight: 600; }
	.lt-header .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; fill: #12306A; }
	.lt-topbar-inner { justify-content: center !important; gap: 8px 18px !important; font-size: 13px; }
}

/* At a glance on phones: smaller figures that fit one line, everything starting from the top so rows line up */
@media (max-width: 600px) {
	.lt-glance { padding: 24px 18px !important; }
	.lt-stats { gap: 10px !important; }
	.lt-stat { justify-content: flex-start !important; padding: 18px 10px !important; }
	.lt-stat-value { font-size: 22px !important; white-space: nowrap; }
	.lt-stat-label { font-size: 13px !important; line-height: 1.35; }
}

/* Floating WhatsApp button */
.lt-wa-float { position: fixed; right: 24px; bottom: 24px; z-index: 9999; width: 60px; height: 60px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.22); text-decoration: none !important; transition: transform .2s, box-shadow .2s; }
.lt-wa-float:hover, .lt-wa-float:focus-visible { transform: scale(1.06); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.lt-wa-float:focus-visible { outline: 3px solid #12306A; outline-offset: 3px; }
.lt-wa-tip { position: absolute; right: 72px; white-space: nowrap; background: #0B1F47; color: #FFFFFF; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 6px; opacity: 0; pointer-events: none; transform: translateX(6px); transition: opacity .2s, transform .2s; }
.lt-wa-float:hover .lt-wa-tip, .lt-wa-float:focus-visible .lt-wa-tip { opacity: 1; transform: none; }
@media (max-width: 600px) { .lt-wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; } .lt-wa-tip { display: none; } }
@media (prefers-reduced-motion: reduce) { .lt-wa-float, .lt-wa-tip { transition: none; } }

/* Mobile menu (1.13.15): centre every item and collapse Courses behind a toggle arrow */
.lt-sub-toggle { display: none; }
@media (max-width: 599px) {
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list { align-items: center !important; justify-content: flex-start !important; text-align: center; width: 100%; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { align-items: center !important; justify-content: center; text-align: center; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open li.wp-block-navigation-submenu { flex-direction: row !important; flex-wrap: wrap; justify-content: center; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .lt-sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-left: 4px; padding: 0; border: 0; background: transparent; color: #12306A; cursor: pointer; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .lt-sub-toggle svg { width: 16px; height: 16px; transition: transform .2s ease; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .lt-sub-open > .lt-sub-toggle svg { transform: rotate(180deg); }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open li.wp-block-navigation-submenu > .wp-block-navigation__submenu-container { display: none !important; flex-basis: 100%; width: 100% !important; min-width: 0 !important; border: 0 !important; box-shadow: none !important; padding: 4px 0 8px !important; align-items: center !important; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open li.wp-block-navigation-submenu.lt-sub-open > .wp-block-navigation__submenu-container { display: flex !important; flex-direction: column; gap: 4px; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item { font-size: 16px; font-weight: 500; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon { display: none !important; }
}

/* Mobile menu (1.13.16): Logtrain navy overlay, white text, content centred vertically */
@media (max-width: 599px) {
	.lt-header .wp-block-navigation__responsive-container.is-menu-open { background: #12306A !important; color: #FFFFFF !important; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close,
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog { min-height: 100%; height: 100%; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog { display: flex; flex-direction: column; justify-content: center; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 0 !important; justify-content: center !important; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open a,
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: #FFFFFF !important; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { background: transparent !important; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a { color: #DDE2EA !important; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .lt-sub-toggle { color: #F5C42C !important; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { color: #FFFFFF !important; top: 8px; right: 0; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg { fill: #FFFFFF !important; width: 28px; height: 28px; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open .lt-nav-cta a { color: #0B1F47 !important; }
	.lt-header .wp-block-navigation__responsive-container.is-menu-open a:focus-visible { outline: 2px solid #F5C42C; outline-offset: 4px; }
}
