/*
custom.css - IMA site styling port from old site (old_common.css)
Ported 29 Sep 2026. Structure mirrors the old file's section order.

Key adaptations for the CRX/Wagtail build:
  - Old hero = section.ima-jumbotron with .cover gradient + .cover-text navy box.
    New hero = CRX hero block (.hero-bg/.hero-fg). Hero-specific rules live in the
    Jumbotron section, adapted to .hero-bg selectors.
  - Old icon CSS background-image paths (images/*.svg) now point at Wagtail media
    (/media/original_images/*.svg). map-icon/link-icon/menu-icon/close-icon/
    recaptcha-icon SVGs never existed even on the old live site (404) - rules kept
    for reference but commented out where they would 404.
  - Nav rules: old site used a custom navbar (ima-fixed-width-nav-container,
    dropdown-on-hover, ima-custom-toggler). The CRX navbar has different classes -
    old nav rules ported only where the CRX markup matches; the rest is left for a
    nav-specific pass if needed.

/* General Styles */
/******************/

/* Margin added to dodge the nav - CRX already handles this via body padding;
   leaving out the old header margin (CRX uses .-fixed-img-offset instead). */

/* Utility classes kept from Bootstrap 4 era */
@media (min-width: 768px) {
    .hidden-md-up {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .hidden-md-down {
        display: none !important;
    }
}

@media (min-width: 576px) {
    .hidden-sm-up {
        display: none !important;
    }
}

@media (max-width: 575px) {
    .hidden-sm-down {
        display: none !important;
    }
}

@media (min-width: 380px) {
    .hidden-xxxs-up {
        display: none !important;
    }
}

@media (max-width: 379px) {
    .hidden-xxxs-down {
        display: none !important;
    }
}

@media (max-width: 380px) {
    .col-xxxs-12 {
        flex: 0 0 auto;
        width: 100%;
    }
}

.object-fit-none {
    object-fit: none;
}

.object-fit-cover {
    object-fit: cover;
}

.object-fit-contain {
    object-fit: contain;
}

/*****************/
/* Basic Theming */
/*****************/

.btn.btn-primary {
    background-color: #c93807;
    border-color: transparent;
}

.btn.btn-primary:hover {
    background-color: #393d7b;
    border-color: transparent;
}

/* Whole-card links: CRX cards render a 'Read more' button in card-footer.
   Old site wrapped the entire card in one link. We hide the button and use the
   stretched-link technique: the card gets position:relative (Bootstrap already
   applies .stretched-link via ::after when using <a class="stretched-link">, but
   our markup has the link on the button only). CSS-only whole-card click:
   hide footer button, make the card-body title an overlay link is NOT possible
   without markup changes - so instead we enlarge the button's clickable area to
   cover the card. */
.crx-grid .card .card-footer .btn {
    /* visual hide of the button chrome */
}

/* Hide link buttons on cards whose whole card is a click target.
   Scoped by row class (ima-cards-6up / ima-card-links) - NOT by button text,
   so descriptive link text (SEO) can't un-hide the button chrome.
   Decision from 28 Sep: hide buttons, make whole card clickable. */
div.card {
    position: relative;
}

.row.ima-cards-6up div.card .card-footer .btn,
.row.ima-card-links div.card .card-footer .btn {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    border: 0;
    padding: 0;
    margin: 0;
    z-index: 1;
    cursor: pointer;
    background: transparent;
}

.ima-card-link {
    position: relative;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
    color: #212529;
}

.ima-card-link .card-body {
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.ima-card-link:hover {
    transform: translate(0px, -5px);
    box-shadow: 0 5px 15px rgb(0 0 0 / 30%);
    border-color: #393d7b;
}

.card.ima-card-link h3.card-title {
    font-size: 16px;
}

.card.ima-card-link h2.card-title {
    font-size: 20px;
    font-weight: bold;
}

.card h3.card-title {
    font-size: 20px;
}

.card .card-header h3 {
    font-size: 20px;
    margin-bottom: 0px;
}

/**************/
/* Typography */
/**************/

body {
    font-family: 'Helvetica Neue', Helvetica, 'Open Sans', Arial, sans-serif;
}

h1, h2 {
    font-weight: 700;
}

h1 {
    font-size: 45px;
}

h2 {
    margin-bottom: 0.5em;
}

/**********/
/* Themes */
/**********/

.ima-light-theme {
    color: #212529;
}

.ima-light-theme.opaque {
    background-color: white;
}

.ima-dark-theme {
    color: white;
}

.ima-dark-theme.opaque {
    background-color: #393d7b;
}

.ima-dark-theme .ima-icon {
    filter: invert(99%) sepia(4%) saturate(0%) hue-rotate(191deg) brightness(106%) contrast(101%);
}

.primary-colour-filter {
    filter: invert(23%) sepia(41%) saturate(881%) hue-rotate(197deg) brightness(92%) contrast(91%);
}

.ima-dark-theme h2, .ima-dark-theme h4, .ima-dark-theme a {
    color: white;
}

.ima-dark-theme a:hover {
    color: #3b3f7f;
    transition: all 0.5s ease;
}

.ima-dark-theme .btn.btn-primary:hover {
    background-color: #aaabc4;
    border-color: transparent;
}

.ima-dark-theme hr {
    height: 2px;
    background-color: #aaabc4;
}

.ima-bright-theme {
    background-color: #c93807;
}

.ima-bright-theme .btn.btn-primary:hover {
    background-color: #c93807;
    color: #3b3f7f;
}

.ima-bright-theme .ima-icon {
    filter: invert(99%) sepia(4%) saturate(0%) hue-rotate(191deg) brightness(106%) contrast(101%);
}

/*********/
/* Icons */
/*********/

.ima-icon {
    height: 30px;
    width: 30px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.ima-icon.big {
    height: 40px;
    width: 40px;
}

.btn.ima-icon {
    margin: 0px 6px;
    padding: 0px;
    border-radius: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ima-icon.inline {
    display: inline-block;
    vertical-align: middle;
    height: 24px;
    width: 24px;
}

h6 .ima-icon.inline {
    height: 19px;
    width: 19px;
}

h2 .ima-icon.inline {
    height: 38px;
    width: 38px;
}

.btn-lg .ima-icon.inline {
    height: 38px;
    width: 38px;
}

@media (max-width: 576px) {
    .btn.ima-icon {
        margin: 0px 3px;
    }

    .ima-icon.big {
        height: 25px;
        width: 25px;
    }

    .btn-lg .ima-icon.inline {
        height: 23px;
        width: 23px;
    }

    .btn-lg {
        font-size: 14px;
    }
}

/* CSS background icons (footer) - black glyph SVGs from the old site's
   /style/images/ set, uploaded to Wagtail media as glyph-*.svg.
   They render white in the footer via .ima-dark-theme .ima-icon invert filter. */
.ima-icon.map-icon {
    background-image: url("/media/original_images/glyph-map-icon.svg");
}

.ima-icon.call-icon {
    background-image: url("/media/original_images/glyph-call-icon.svg");
}

.ima-icon.email-icon {
    background-image: url("/media/original_images/glyph-email-icon.svg");
}

.ima-icon.link-icon {
    background-image: url("/media/original_images/glyph-link-icon.svg");
}

/**************/
/* Nav Styles */
/**************/

.collapsing {
    transition: none !important;
}

nav.fixed-top {
    box-shadow: 0px 0px 40px 15px rgba(0, 0, 0, 0.56);
}

.navbar-brand {
    height: 70px;
}

/* Old site: #logo { height: 100% } - logo filled the 70px brand box
   (rendered 162x60 after the brand's 5px padding). CRX pins
   .navbar-brand img at height:50px - override to fill the box. */
.navbar-brand img {
    height: 100%;
    width: auto;
}

#logo {
    width: auto;
    height: 100%;
}

@media (max-width: 440px) {
    .navbar-brand {
        height: 50px;
    }
}

/*********************/
/* Navbar (old port) */
/*********************/

/* Old nav inner container: #ima-fixed-width-nav-container = container-fluid
   capped 1200px, aligned flex-end. CRX renders nav > .container (BS stock,
   1320px @xxl) - cap it to the old 1200px so the logo aligns with page
   content (132px at 1440 viewport, pixel-verified vs old site). */
nav .container {
    max-width: 1200px;
}

/* Old nav: items right-aligned (Lessons..Blog then phone + Contact Us btn
   ending flush right). CRX's ul defaults to sitting after the brand - push
   it to the right edge. */
nav .navbar-nav {
    margin-left: auto;
}

/* Old nav background: pure white (ima-light-theme opaque), not BS bg-light
   (#f8f9fa). LayoutSettings carries bg-light - override here. */
nav.navbar.bg-light {
    background-color: white !important;
}

/* Old nav link typography: 16px, compact 6px vertical padding, dark text,
   aligned to the bottom edge of the nav (container was align-items: flex-end). */
nav .navbar-nav .nav-link {
    font-size: 16px;
    padding: 6px 6px;
    color: #1e2125;
}

/* Contact Us nav item rendered as the old site's primary button (orange). */
nav .navbar-nav .nav-link.btn,
nav .navbar-nav .btn.nav-link {
    background-color: #c93807;
    border-color: transparent;
    color: white;
}

nav .navbar-nav .btn.nav-link:hover {
    background-color: #393d7b;
    border-color: transparent;
    color: white;
}

/* Phone link in the nav (external tel: link): old navbar-btn style - plain
   text link, 16px, dark. :not(.btn) keeps this away from the Contact Us
   button, which also carries navbar-btn (old site's class list) - the
   button must keep its white text. */
nav .navbar-nav .nav-link.navbar-btn:not(.btn) {
    color: #1e2125;
    font-weight: normal;
}

/* Old nav phone link: <div class="ima-icon inline call-icon"></div> before
   the number. CRX renders display_text only, so the icon is injected as a
   ::before pseudo-element: 24px inline-block (old .ima-icon.inline) with the
   old call-icon glyph, vertically centred on the text line. */
nav .navbar-nav .nav-link.ima-call-link {
    display: inline-flex;
    align-items: center;
}

nav .navbar-nav .nav-link.ima-call-link::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 6px;
    vertical-align: middle;
    background-image: url("/media/original_images/glyph-call-icon.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: invert(23%) sepia(41%) saturate(881%) hue-rotate(197deg) brightness(92%) contrast(91%);
}

/*****************/
/* Footer Styles */
/*****************/

footer {
    background-image: linear-gradient(180deg, #3b3f7f 0%, rgb(8, 8, 8) 100%);
    padding-bottom: 20px;
    padding: 0px 12px 20px 12px;
    color: white;
    font-size: 13px;
    line-height: 22px;
}

footer .container-fluid {
    max-width: 1200px;
}

/* Footer location-map cards: old site gave each map column mb-2 (8px gap
   between stacked cards on mobile). The imported cards carry mb-3 + h-100;
   the cards live one-per-column in a flex row, so the CARD's own bottom
   margin collapses into the flex row and never separates the stacked cards.
   Put the 8px rhythm on the COLUMN instead - flex rows do honour column
   margins between wrapped items. */
footer .row > .col-md-3:has(> .card.mb-3.h-100) {
    margin-bottom: 8px;
}

/* Section CTA buttons (Meet the Mentors etc): old site rendered these as
   inline <a class="btn"> centred in a col.text-center. The port needs the
   same: content-hugging, horizontally centred, 16px top gap. display:table
   + margin auto centres a content-width box inside any column without
   touching the column's own text alignment. */
.cta-btn-centered {
    display: table;
    margin: 16px auto 0 auto;
}

.ima-footer-menu {
    margin-bottom: 0px;
    padding-left: 16px;
}

.ima-footer-menu li {
    margin-bottom: 6px;
    list-style: none;
}

.ima-footer-menu li a {
    text-decoration: none;
}

.ima-footer-icon-item {
    display: flex;
    flex-direction: row;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 28px;
}

.ima-footer-col {
    justify-content: flex-end;
    display: flex;
    flex-direction: column;
}

.ima-footer-icon-item .ima-icon {
    flex-shrink: 0;
}

.ima-footer-icon-item .caption {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 440px) {
    .ima-footer-icon-item {
        font-size: 13px;
    }

    .ima-footer-menu li a {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .ima-footer-icon-item {
        font-size: 16px;
    }

    .ima-footer-menu li a {
        font-size: 16px;
    }
}

ul.ima-copywrite {
    margin: auto;
}

ul.ima-copywrite > li {
    display: inline-block;
}

ul.ima-copywrite > li::after {
    margin: .5rem;
    content: '|';
    color: #aaabc4;
}

ul.ima-copywrite > li:last-child::after {
    margin: unset;
    content: unset;
}

/*************************/
/* Simple Section Styles */
/*************************/

/* CRX renders body blocks as .container.crx-grid, not <section>. The default
   crx-grid padding (40px top/bottom) stays; old section padding was 60px.
   Bump crx-grid to match old rhythm: */

.container.crx-grid {
    max-width: 1200px;
    padding-top: 60px;
    padding-bottom: 60px;
}

.container.crx-grid .crx-grid {
    padding-top: 0;
    padding-bottom: 0;
}

.ima-section-padding {
    padding: 60px 12px;
}

/********************/
/* Jumbotron/Hero   */
/********************/

/* Old: section.ima-jumbotron with .cover (gradient + photo) and .cover-text
   (navy opaque box, white text). New: CRX .hero-bg (photo) > .hero-fg.
   Port: dark gradient over photo + cover-text box styling for hero content
   column. */

.hero-bg {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    /* Old site never sets text colour at the jumbotron level - white text
       comes from .ima-dark-theme on the cover-text box only. The hero copy
       below the 550px photo window is default dark text on white. */
}

/* Old jumbotron: the SECTION is content-sized (min-height 550px); the PHOTO
   is a fixed-window absolute .cover layer (common.css 622-630: position
   absolute, min-height 550px, background-position 50%, z-index 1) and the
   .container sits above it at z-index 2. Translated verbatim: .hero-cover
   is the photo layer (added in hero_block.html) with the darkening gradient
   baked into its background-image; .hero-bg stays in normal flow sized by
   its content. The photo frames against the WINDOW, so the cover-crop is
   natural on every viewport - no mask, no zoom-into-a-corner, nothing to
   collide. The cover-text box (450px + 100px margin) fills the window;
   copy after it starts on white; the form card overhangs the window. */
#content .hero-bg {
    min-height: 550px;
    position: relative;
}

.hero-bg .hero-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    min-height: 550px;
    background-position: 50% 50%;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
}

#content .hero-bg .hero-fg {
    position: relative;
    z-index: 2;
}

/* Imported heroes carry CRX's 'parallax' class (background-attachment: fixed).
   The old site never used parallax, and fixed backgrounds misrender on mobile
   (and expose background bands). Force the old site's plain scroll behaviour. */
.hero-bg.parallax {
    background-attachment: scroll !important;
}

@media (max-width: 767px) {
    /* Old mobile jumbotron: min-height 270px, cover 270px (common.css 671-677). */
    #content .hero-bg {
        min-height: 270px;
    }

    .hero-bg .hero-cover {
        min-height: 270px;
    }

    /* Old mobile hero: photo band 270px with cover-text (now including the
       H1) INSIDE it. CRX's 80px/80px hero-fg padding and the crx-grid
       section rhythm (60px) balloon the box, over-revealing the photo.
       Strip both. (#content prefix = beats the base 80px rule that sits
       later in file.) */
    #content .hero-bg .hero-fg .container.crx-grid {
        padding-top: 0;
        padding-bottom: 0;
    }

    #content .hero-bg .hero-fg {
        padding: 0 0 60px 0;
    }
}

/* Old cover gradient linear-gradient(rgba(0,0,0,0.45) x2) is baked into the
   .hero-cover layer's background-image (hero_block.html) - the old site's
   .cover style attribute did exactly this. The former ::before gradient is
   retired. */

.hero-bg .hero-fg {
    position: relative;
    z-index: 2;
    /* Old site: no fg padding - the cover-text's own margin-top (100px desktop,
       50px mobile) was the only spacing between nav and H1. CRX's 80px here
       plus the inner crx-grid 60px pushed the H1 ~140px too low. */
    padding: 0;
}

/* the row container inside the hero: strip the section rhythm (60px) too -
   the cover-text provides its own spacing. */
.hero-bg .hero-fg .container.crx-grid {
    padding-top: 0;
    padding-bottom: 0;
}

/* Old hero paragraph sizing (25px/30px) - old rule is .cover-text p ONLY
   (common.css 656-659); hero copy BELOW the cover-text box is default-sized
   dark text on white. Our earlier broad rule caused the form-card fine-print
   bug and mis-sized bare hero paragraphs. Scoped to the box, source-exact. */
.hero-bg .cover-text p {
    font-size: 25px;
    line-height: 30px;
    color: white;
}

/* The intro-lesson card's fine print: card is white-bg so it must not inherit
   the hero's white text cascade. (The 25px scope is now .cover-text p only,
   but the color cascade still applies to all hero text.) */
.hero-bg .hero-fg .ima-first-free-form p {
    font-size: inherit;
    line-height: 1.5;
    color: inherit;
}



/* Home hero title: white via the cover-text box's ima-dark-theme class
   (old site: .ima-dark-theme { color: white } on the box). The bare h1
   rule here is redundant now the base cascade is dark - the h1 lives
   inside cover-text. Kept for safety on heroes whose h1 escapes the box. */
.hero-bg .hero-fg h1 {
    color: white;
}

/* Hero copy BELOW the cover-text box renders on white page (the ::after
   mask) - default dark text, exactly as the old site's jumbotron copy. */
.hero-bg .hero-fg h2,
.hero-bg .hero-fg p {
    color: #212529;
}

/* ...unless it's inside the cover-text box (white on photo/box) or the
   form card (card re-declares its own dark text). */
.hero-bg .cover-text h2,
.hero-bg .cover-text p {
    color: white;
}

.hero-bg .hero-fg .ima-first-free-form h2,
.hero-bg .hero-fg .ima-first-free-form p {
    color: inherit;
}

/* Old .cover-text: inside the HERO it is TRANSPARENT text over the photo
   (old rule: section.ima-jumbotron .cover-text.ima-dark-theme { background: none }).
   Old sizing (common.css 642-647): height 450px, margin-top 100px, overflow
   hidden - the box EXACTLY FILLS the 550px photo window (100+450=550), which
   guarantees everything after it starts at the photo's bottom edge. */
.hero-bg .cover-text {
    color: white;
    background: none;
    margin-top: 100px;
    margin-bottom: 60px;
    height: 450px;
    overflow: hidden;
}

@media (max-width: 767px) {
    .hero-bg .cover-text {
        margin-top: 50px;
        height: 220px;
    }
}

.hero-bg .cover-text h1,
.hero-bg .cover-text h2 {
    font-weight: 700;
    color: white;
}

.hero-bg .cover-text p {
    font-size: 25px;
    line-height: 30px;
}

@media (max-width: 767px) {
    .hero-bg .cover-text h1 {
        font-size: 30px;
    }
}

/* Old site rendered some lesson-page H1s in ALL CAPS (guitar + singing
   locations pages, wind page) - typed as caps in the old markup. The new
   site keeps the page titles in Title Case (SEO/accessibility: real text
   in natural case, better SERP presentation) and restores the old LOOK via
   text-transform on ALL lesson pages, per Andrew's direction. Scoped per
   page body id. */
/* Old site caps map (verified 3 Oct 2026 against live old-site h1 markup):
   CAPS: guitar x5 (Brisbane/Windsor/Ashgrove/Newstead/Browns Plains),
   singing x5 (Brisbane/Windsor/Ashgrove/Newstead/Browns Plains),
   wind ('LEARN TO PLAY THE SAXOPHONE AND TRUMPET!').
   TITLE CASE: piano, drums, strings (violin) - typed as Title Case on old site,
   so NO uppercase transform on those pages. */
#page-5 h1,     /* guitar-lessons-brisbane */
#page-29 h1,    /* guitar-lessons-windsor */
#page-30 h1,    /* guitar-lessons-ashgrove */
#page-31 h1,    /* guitar-lessons-newstead */
#page-33 h1,    /* guitar-lessons-browns-plains */
#page-6 h1,     /* singing (brisbane) */
#page-48 h1,    /* singing-lessons-ashgrove */
#page-49 h1,    /* singing-lessons-browns-plains */
#page-50 h1,    /* singing-lessons-newstead */
#page-51 h1,    /* singing-lessons-windsor */
#page-9 h1 {    /* wind-lessons (saxophone) */
    text-transform: uppercase;
}

/* Hero taglines that are NOT in a cover-text box (lesson pages): white text
   over the gradient - covered by .hero-bg .hero-fg p rule above. */

/************************/
/* Testimonial styles   */
/************************/

div.ima-testimonial {
    padding: 24px;
}

p.ima-testimonial-quote {
    font-style: italic;
    padding-left: 20px;
    padding-right: 20px;
}

p.ima-testimonial-quote::before {
    position: absolute;
    padding: 20px;
    font-size: 36px;
    top: 0px;
    left: 0px;
    height: 100%;
    content: '\201C';
    color: #393d7b;
}

p.ima-testimonial-quote::after {
    position: absolute;
    padding: 20px;
    font-size: 36px;
    top: 0px;
    right: 0px;
    height: 100%;
    content: '\201D';
    text-align: right;
    color: #393d7b;
}

p.ima-testimonial-author {
    font-weight: bold;
    padding-left: 20px;
    padding-right: 20px;
    margin: 0px;
}

p.ima-testimonial-author-meta {
    margin: 0px;
    padding-left: 20px;
    padding-right: 20px;
}

/************************/
/* Shadow Effect Styles */
/************************/

.ima-shadow-parent {
    z-index: 0;
}

.ima-shadow {
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 0, 0, 0.1) inset;
}

.ima-shadow::before,
.ima-shadow::after {
    position: absolute;
    content: "";
    bottom: 12px;
    left: 15px;
    top: 80%;
    width: 45%;
    background: black;
    z-index: -1;
    box-shadow: 0 20px 15px black;
    transform: rotate(-6deg);
}

.ima-shadow::after {
    transform: rotate(6deg);
    right: 15px;
    left: auto;
}

/***********************************/
/* A card advertising an IMA mentor */
/***********************************/

.ima-mentor-card {
    position: relative;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
    color: #212529;
    overflow: hidden;
}

.ima-mentor-card .card-body {
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
}

.ima-mentor-card .blockquote {
    font-size: 16px;
    font-style: italic;
}

.ima-mentor-card .blockquote .quote-source {
    font-style: normal;
}

.ima-mentor-card:hover {
    transform: translate(0px, -5px);
    box-shadow: 0 5px 15px rgb(0 0 0 / 30%);
    border-color: #393d7b;
}

/* Initials placeholder shown when a mentor has no photo: brand blue
   block, white initials, same footprint as the card photo
   (374x280 -> aspect-ratio keeps it responsive). Replaces the old
   site's gendered "coming soon" silhouettes (retired 3 Oct 2026). */
.ima-mentor-initials {
    aspect-ratio: 374 / 280;
    background-color: #393d7b;
}

.ima-mentor-initials-text {
    color: #ffffff;
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
}

/***************************/
/* Contact & Social Strip  */
/***************************/

.ima-contact-strip {
    padding: 12px 0;
}

.ima-contact-strip a {
    text-decoration: none;
}

.ima-contact-strip .ima-icon-link {
    display: inline-flex;
    margin: 0 6px;
}

.ima-phone-link {
    font-weight: bold;
    text-decoration: none;
    color: inherit;
}

/* Old site's strip phone link was btn btn-lg (20px text, 38px icon);
   the port lost the btn-lg sizing. Restore it. */
.ima-contact-strip .ima-phone-link {
    font-size: 20px;
}

.ima-contact-strip .ima-phone-link .ima-icon.inline {
    height: 38px;
    width: 38px;
}

.ima-phone-link:hover {
    color: inherit;
}
/*********************************************/
/* Full-bleed navy sections (old site port)  */
/*********************************************/

/* Old structure: <section class="ima-dark-theme opaque"> (full-bleed navy) > .container (1200px centered) > .row > cols
   CRX structure: .container(-fluid).crx-grid > .row[custom_css_class] > cols
   The custom class lands on the ROW. To replicate old behaviour with full-width rows:
   the container-fluid gets the navy (full-bleed), the row centres its content at 1200px. */
.container-fluid.crx-grid:has(> .row.ima-dark-theme.opaque) {
    background-color: #393d7b;
    color: white;
    padding-top: 60px;
    padding-bottom: 60px;
}

.container-fluid.crx-grid > .row.ima-dark-theme.opaque {
    background: none;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Navy bands with a full-bleed image column (old site: section py-0, image col
   p-0 with h-100 w-100 object-fit-cover, text col ima-section-padding). The
   band's 60px padding would shrink the image band - kill it and move the
   rhythm onto the text column, exactly like the old site. Image column is
   marked ima-shadow-parent p-0 (page content). */
.container-fluid.crx-grid:has(> .row.ima-dark-theme.opaque > .ima-shadow-parent.p-0) {
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
}

.container-fluid.crx-grid > .row.ima-dark-theme.opaque:has(> .ima-shadow-parent.p-0) > :not(.ima-shadow-parent) {
    /* text column: old ima-section-padding (60px 12px); CRX cols already carry
       the 12px horizontal, so only vertical is set here */
    padding-top: 60px;
    padding-bottom: 60px;
}

/* 'What we teach' 6-up card row: replicate old responsive ladder
   (old: col-6 col-sm-4 col-md-2 = 2-up phones, 3-up small tablets, 6-up desktop).
   CRX renders col-md-2; below md it stacks. These rules restore the old behaviour. */
@media (max-width: 575.98px) {
    .row.ima-cards-6up > [class*="col-"] {
        flex: 0 0 auto;
        width: 50%;
    }
}
@media (min-width: 576px) and (max-width: 767.98px) {
    .row.ima-cards-6up > [class*="col-"] {
        flex: 0 0 auto;
        width: 33.3333%;
    }
}

/* Nav clearance: CRX default is 76px, our nav is 86px (70px brand logo + padding,
   matching the old site's nav height). Old site used 86px (header margin-top). */
.-fixed-img-offset {
    margin-top: 86px;
    padding-top: 1px; /* prevents the title container's margin collapsing through */
}

/* Hero title INSIDE the hero (old site jumbotron look): the H1 now lives in
   the hero's cover-text block (page content) and the template's title
   container is hidden (d-none). The hero is the first thing after the
   spacer, landing naturally right below the nav at every viewport - no
   overlap geometry, no fixed pixel calibration (the previous -150/-169px
   overlap trick broke on zoom/title-wrap changes; removed 30 Sep 2026).
   Old mobile spacer: 66px (matching the old site's header margin). */
@media (max-width: 440px) {
    .-fixed-img-offset {
        margin-top: 66px;
    }
}

/***************************/
/* Intro Lesson form      */
/***************************/

/* Ported verbatim from the old site's /style/common.css (lines 695-724)
   so the hero form looks identical. White card on the hero's right. */

section.ima-jumbotron div.ima-first-free-form,
.hero-bg div.ima-first-free-form {
    margin-top: 60px;
    box-shadow: rgba(94, 89, 87, 0.56) 0px 12px 32px 0px;
    background: rgb(255, 255, 255);
}

@media (max-width: 767px) {
    section.ima-jumbotron div.ima-first-free-form,
    .hero-bg div.ima-first-free-form {
        margin-top: 30px;
    }
}

/* First free styles are split so it can be used outside of the jumbotron. */
div.ima-first-free-form {
    position: relative;
    padding: 24px;
    border: 1px solid #3b3f7f;
    /* The hero sets color: white for its overlay text; the card is a
       white background, so it must re-declare readable text. */
    color: #212529;
}

/* CRX base css sets body font-size 1.2em (19.2px); the old site ran at
   16px. Bootstrap's .form-text is em-based, so it inherits the inflated
   base (15.4px vs old 12.8px). Pin the card's fine print to the old
   size directly - rem, not em, so the body inflation cannot touch it. */
.ima-first-free-form .form-text {
    font-size: 0.8rem;
}

/* Used on the contact page, where the form is embedded. */
div.ima-first-free-form.embedded {
    position: relative;
    padding: 0px;
    border: none;
}

/* ReCAPTCHA v3 badge is hidden (per Google's FAQ the required text is
   shown in the form instead). */
.grecaptcha-badge {
    visibility: hidden;
    position: absolute;
    z-index: -1;
}
