/* ==========================================================================
   ESTC institutional theme
   Layout and typography follow the Université Cadi Ayyad website (uca.ma):
   transparent header over a photo hero, white logo card, serif display
   headings (Playfair Display, standing in for UCA's Butler) with Inter body
   text, square buttons with an up-right arrow, generous 6rem sections.
   UCA's copper accent is replaced by the ESTC logo blue (#004b82).
   Loaded right after the legacy theme; page-specific CSS loads after it.
   ========================================================================== */

:root {
    --estc-primary: #004b82;          /* ESTC logo blue */
    --estc-primary-dark: #003a66;
    --estc-primary-deep: #002b4d;
    --estc-primary-light: #e8f0f6;
    --estc-secondary: #0b1f33;        /* dark navy, plays the role of UCA's dark brown */
    --estc-heading: #1d232b;
    --estc-text: #4f5661;
    --estc-muted: #737477;
    --estc-border: #d9d9d9;
    --estc-line: #eeeeee;
    --estc-soft: #f4f4f4;
    --estc-white: #ffffff;
    --estc-font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --estc-font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
    --estc-header-h: 104px;
    --estc-header-h-compact: 76px;
    --estc-topbar-h: 38px;            /* quick-links strip above the main bar */
    --estc-section-pad: 6rem;
    --estc-transition: all .4s ease;
    --estc-shadow: 0 10px 30px rgba(11, 31, 51, .10);
}

/* Keep the legacy colour variables in sync with the new palette */
html {
    --main-color: #004b82;
}

body {
    font-family: var(--estc-font-body);
    color: var(--estc-text);
    background: var(--estc-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--estc-font-heading);
    color: var(--estc-heading);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid #f2b705;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.estc-skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 3000;
    padding: 10px 16px;
    background: var(--estc-primary);
    color: #fff;
    font-weight: 600;
    transition: top .2s;
}

.estc-skip-link:focus {
    top: 8px;
    color: #fff;
}

.estc-container {
    width: 100%;
    max-width: 1344px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Inner pages sit below the solid header; the homepage hero runs underneath it */
.page {
    padding-top: calc(var(--estc-topbar-h) + var(--estc-header-h));
}

.template-home .page {
    padding-top: 0;
}

.page-content {
    padding-top: 0 !important;
}

/* ----------------------------------------------------------------------
   Header
   ---------------------------------------------------------------------- */

.estc-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--estc-secondary);
    transition: background-color .35s ease, box-shadow .35s ease;
}

/* Homepage: transparent over the hero until the page is scrolled */
.template-home .estc-header:not(.is-scrolled) {
    background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 100%);
}

.estc-header.is-scrolled {
    background: var(--estc-secondary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
}

.estc-header ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.estc-header__inner {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--estc-header-h);
    max-width: none;
    padding: 0 12px 0 12px;
    transition: height .35s ease;
}

.estc-header.is-scrolled .estc-header__inner {
    height: var(--estc-header-h-compact);
}

/* Top bar: same backdrop as the main bar (the hero photo shows through on the homepage),
   with pattern_05 drawn in faint white lines, quick links on the right */
.estc-topbar {
    position: relative;
    z-index: 2;
    height: var(--estc-topbar-h);
    overflow: hidden;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    transition: height .35s ease, visibility 0s linear 0s;
}

/* pattern_05 is dark lines on transparency, so it is used as a mask to paint the lines white */
.estc-topbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .22);
    -webkit-mask: url('../images/patterns/pattern_05.png') center / 76px repeat;
    mask: url('../images/patterns/pattern_05.png') center / 76px repeat;
    pointer-events: none;
}

.estc-topbar__inner {
    position: relative;
}

.estc-header.is-scrolled .estc-topbar {
    height: 0;
    border-bottom-width: 0;
    visibility: hidden;
    transition: height .35s ease, visibility 0s linear .35s;
}

.estc-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    max-width: none;
    padding: 0 28px;
}

/* Social icons: pinned to the left edge of the top bar, quick links stay on the right */
.estc-header .estc-social {          /* beats the `.estc-header ul { margin: 0 }` reset */
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
    margin-right: auto;
}

.estc-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 13px;
    color: rgba(255, 255, 255, .85);
    transition: color .2s, background-color .2s;
}

.estc-social a:hover,
.estc-social a:focus-visible {
    color: var(--estc-secondary);
    background: #fff;
}

.estc-quicklinks ul {
    display: flex;
    align-items: center;
    height: 100%;
}

.estc-quicklinks li {
    display: flex;
    align-items: center;
}

.estc-quicklinks li + li::before {
    content: '';
    width: 1px;
    height: 14px;
    margin: 0 18px;
    background: rgba(255, 255, 255, .3);
}

.estc-quicklinks a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--estc-font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .03em;
    color: rgba(255, 255, 255, .9);
    white-space: nowrap;
    transition: color .2s;
}

.estc-quicklinks a i {
    font-size: 13px;
    color: #f2b705;
}

.estc-quicklinks a:hover,
.estc-quicklinks a:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* White monochrome logo set directly on the dark header, no card behind it.
   A hairline divider separates it from the menu. */
.estc-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 168px;                     /* fixed: the full-size logo (78px tall) + padding, so the
                                         menu keeps its position when the logo shrinks on scroll */
    height: 100%;
    padding: 0 28px 0 12px;
    position: relative;
    --logo-h: 78px;                   /* logo height; the divider follows the logo's right edge */
}

.estc-header.is-scrolled .estc-logo {
    --logo-h: 54px;
}

.estc-logo::after {
    content: "";
    position: absolute;
    /* 12px left padding + logo width (height x 455/282 aspect) + 16px gap */
    left: calc(12px + var(--logo-h) * 1.613 + 16px);
    top: 22%;
    bottom: 22%;
    width: 1px;
    background: rgba(255, 255, 255, .28);
    transition: left .35s ease;
}

.estc-logo img {
    display: block;
    width: auto;
    height: var(--logo-h);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); /* stays legible over bright photo areas */
    transition: height .35s ease, opacity .25s ease;
}

.estc-logo:hover img {
    opacity: .85;
}

.estc-header.is-scrolled .estc-logo img {
    filter: none;
}

.estc-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    height: 100%;
    transition: opacity .3s ease, transform .3s ease, visibility 0s linear 0s;
}

/* Search open: the menu steps aside for the search field */
.estc-header.is-searching .estc-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}

.estc-menu > ul {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.estc-menu > ul > li {
    position: relative;
    display: flex;
}

.estc-menu > ul > li > a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    font-family: var(--estc-font-body);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.estc-menu > ul > li > a::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: calc(50% - 22px);
    height: 3px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.estc-menu > ul > li:hover > a,
.estc-menu > ul > li:focus-within > a,
.estc-menu > ul > li.active > a {
    color: #fff;
}

.estc-menu > ul > li:hover > a::after,
.estc-menu > ul > li:focus-within > a::after,
.estc-menu > ul > li.active > a::after {
    transform: scaleX(1);
}

/* Legacy markup: the caret span becomes a small chevron */
.estc-menu .caret {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 2px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: .8;
}

/* Dropdowns: opened by main.js on hover, and by :focus-within for keyboard users */
.estc-menu .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1002;
    min-width: 270px;
    width: max-content;
    max-width: 360px;
    padding: 10px 0;
    background: #fff;
    border-top: 3px solid var(--estc-primary);
    box-shadow: 0 18px 40px rgba(11, 31, 51, .18);
    visibility: visible;
    opacity: 1;
    text-align: left;
}

.estc-menu > ul > li:last-child .dropdown,
.estc-menu > ul > li:nth-last-child(2) .dropdown {
    left: auto;
    right: 0;
}

.estc-menu li.has-dropdown:focus-within > .dropdown {
    display: block !important;
}

.estc-menu .dropdown li {
    position: relative;
    display: block;
}

.estc-menu .dropdown a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 22px;
    font-family: var(--estc-font-body);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--estc-heading);
    white-space: normal;
    transition: color .2s, background-color .2s, padding .2s;
}

.estc-menu .dropdown a:hover,
.estc-menu .dropdown a:focus-visible,
.estc-menu .dropdown li.active > a {
    padding-left: 28px;
    background: var(--estc-primary-light);
    color: var(--estc-primary);
}

.estc-menu .dropdown .caret {
    transform: rotate(-45deg);
    margin: 0;
}

.estc-menu .dropdown .dropdown {
    top: -13px;
    left: 100%;
    right: auto;
}

.estc-menu > ul > li:last-child .dropdown .dropdown,
.estc-menu > ul > li:nth-last-child(2) .dropdown .dropdown {
    left: auto;
    right: 100%;
}

/* Header actions: search toggle + burger */
.estc-header__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.estc-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: opacity .2s;
}

.estc-search-toggle:hover {
    background: none;
    opacity: .75;
}

/* Desktop: the search field sits in the menu's slot (between logo and actions) */
.estc-search-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 196px;
    right: 90px;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}

.estc-header.is-searching .estc-search-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s ease .1s, transform .3s ease .1s, visibility 0s linear 0s;
}

.estc-search {
    display: flex;
    flex: 1;
    max-width: 760px;
    margin: 0 auto;
    border: 1px solid var(--estc-border);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.estc-search input {
    flex: 1;
    min-width: 0;
    height: 50px;
    padding: 0 18px;
    border: 0;
    font-size: 16px;
    color: var(--estc-heading);
    background: #fff;
}

.estc-search input:focus {
    outline: none;
}

.estc-search:focus-within {
    border-color: var(--estc-primary);
    box-shadow: 0 0 0 3px rgba(0, 75, 130, .18);
}

.estc-search button {
    flex: 0 0 auto;
    padding: 0 26px;
    border: 0;
    background: var(--estc-primary);
    font-family: var(--estc-font-heading);
    font-size: 16px;
    color: #fff;
    cursor: pointer;
}

/* Mobile toggle & off-canvas menu */
.estc-header .colorlib-nav-toggle {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    display: none;
    width: 56px;
    height: 56px;
    padding: 0;
    margin: 0;
    background: none;
}

.estc-header .colorlib-nav-toggle i {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -12.5px;
}

.estc-header .colorlib-nav-toggle i,
.estc-header .colorlib-nav-toggle i::before,
.estc-header .colorlib-nav-toggle i::after {
    background-color: #fff !important;
}

/* The panel opens below the header so the toggle (close button) stays visible */
#colorlib-offcanvas {
    position: fixed;
    top: calc(var(--estc-topbar-h) + var(--estc-header-h));
    padding: 24px 28px 32px;
    background: var(--estc-secondary);
    z-index: 990;
}

.estc-header.is-scrolled ~ #colorlib-offcanvas {
    top: var(--estc-header-h-compact);
}

#colorlib-offcanvas > ul {
    margin-top: 0;
}

#colorlib-offcanvas ul li a {
    display: block;
    padding: 7px 0;
    color: rgba(255, 255, 255, .88);
    font-family: var(--estc-font-body);
    font-size: 15px;
    font-weight: 500;
}

#colorlib-offcanvas ul li.offcanvas-has-dropdown > a:after {
    color: rgba(255, 255, 255, .85);
}

#colorlib-offcanvas ul li:hover > a {
    color: #fff;
}

#colorlib-offcanvas .caret {
    display: none;
}

#colorlib-offcanvas ul li > ul a {
    font-size: 14px;
    font-weight: 400;
}

@media (max-width: 1360px) {
    .estc-menu > ul {
        gap: 0;
    }

    .estc-menu > ul > li > a {
        padding: 0 10px;
        font-size: 15px;
    }

    .estc-menu > ul > li > a::after {
        left: 10px;
        right: 10px;
    }

    .estc-logo {
        width: 150px;
        --logo-h: 68px;
    }

    .estc-search-panel {
        left: 176px;
    }
}

@media (max-width: 1100px) {
    :root {
        --estc-header-h: 64px;
        --estc-header-h-compact: 52px;
    }

    :root {
        --estc-topbar-h: 34px;
    }

    .estc-menu {
        display: none;
    }

    .estc-topbar__inner {
        justify-content: center;
        padding: 0 16px;
    }

    .estc-quicklinks li + li::before {
        margin: 0 14px;
    }

    .estc-quicklinks a {
        font-size: 12.5px;
    }

    #colorlib-offcanvas {
        display: block;
    }

    .estc-header .colorlib-nav-toggle {
        display: block;
    }

    /* Mobile layout: search left, logo centred, burger right */
    .estc-header__actions {
        display: contents;
    }

    .estc-header .colorlib-nav-toggle {
        margin-left: auto;
    }

    .estc-logo {
        position: absolute;
        top: 0;
        left: 50%;
        z-index: 3;
        transform: translateX(-50%);
        width: auto;
        padding: 0;
    }

    /* Mobile: the search slides down under the bar, behind the hanging logo tab */
    .estc-search-panel {
        top: 100%;
        bottom: auto;
        left: 0;
        right: 0;
        z-index: 1;
        padding: 44px 16px 18px;
        background: #fff;
        box-shadow: 0 18px 40px rgba(11, 31, 51, .18);
        transform: translateY(-12px);
    }

    .estc-search {
        box-shadow: none;
    }

    .estc-logo::after {
        display: none;
    }

    .estc-logo img {
        height: 50px;
    }

    .estc-header.is-scrolled .estc-logo img {
        height: 42px;
    }

    .estc-search-toggle,
    .estc-header .colorlib-nav-toggle {
        width: 44px;
        height: 44px;
    }
}

/* Phones: not enough width for both groups; the footer keeps the social links.
   Quick links become four equal tap targets, icon stacked over a short label. */
@media (max-width: 600px) {
    :root {
        --estc-topbar-h: 50px;
    }

    .estc-header .estc-social {
        display: none;
    }

    .estc-topbar__inner {
        padding: 0;
    }

    .estc-quicklinks {
        width: 100%;
        height: 100%;
    }

    .estc-quicklinks ul {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }

    .estc-quicklinks li {
        position: relative;
        height: 100%;
    }

    .estc-quicklinks li + li::before {
        position: absolute;
        left: 0;
        top: 12px;
        height: auto;
        bottom: 12px;
        margin: 0;
        background: rgba(255, 255, 255, .2);
    }

    .estc-quicklinks a {
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 100%;
        height: 100%;
        font-size: 11px;
        letter-spacing: .02em;
    }

    .estc-quicklinks a i {
        font-size: 15px;
    }

    .estc-quicklinks a:active {
        background: rgba(255, 255, 255, .08);
    }

    .estc-quicklinks__extra {
        display: none;
    }
}

@media (max-width: 480px) {
    .estc-logo img {
        height: 44px;
    }

    .estc-header.is-scrolled .estc-logo img {
        height: 38px;
    }

    .estc-search button {
        padding: 0 16px;
    }
}

/* ----------------------------------------------------------------------
   Shared components
   ---------------------------------------------------------------------- */

.estc-section {
    position: relative;
    padding: var(--estc-section-pad) 0;
}

.estc-section--soft {
    background: var(--estc-soft);
}

.estc-title {
    margin: 0;
    font-family: var(--estc-font-heading);
    font-size: 52px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -.5px;
    color: var(--estc-heading);
}

.estc-title--light {
    color: #fff;
}

.estc-title--center {
    text-align: center;
}

/* Accent bar used above/below titles, as on uca.ma */
.estc-bar {
    display: block;
    width: 64px;
    height: 5px;
    background: var(--estc-primary);
}

.estc-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px 64px;
    margin-bottom: 40px;
}

.estc-section-head--ruled {
    padding-bottom: 32px;
    border-bottom: 1px solid var(--estc-border);
}

.estc-section-head p {
    max-width: 460px;
    margin: 0;
    font-size: 16px;
    line-height: 1.75;
    color: var(--estc-muted);
}

.estc-lead {
    max-width: 640px;
    margin: 18px auto 0;
    font-size: 16px;
    line-height: 1.85;
    text-align: center;
    color: var(--estc-muted);
}

/* Square button with up-right arrow (uca-btn) */
.estc-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 30px;
    border: 1px solid var(--estc-primary);
    border-radius: 0;
    background: var(--estc-primary);
    font-family: var(--estc-font-heading);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    transition: var(--estc-transition);
}

.estc-btn:hover,
.estc-btn:focus-visible {
    background: var(--estc-primary-dark);
    border-color: var(--estc-primary-dark);
    color: #fff;
}

.estc-btn--ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, .8);
    color: #fff;
}

.estc-btn--ghost:hover,
.estc-btn--ghost:focus-visible {
    background: #fff;
    border-color: #fff;
    color: var(--estc-primary);
}

.estc-btn--white {
    background: #fff;
    border-color: #fff;
    color: var(--estc-primary);
}

.estc-btn--white:hover,
.estc-btn--white:focus-visible {
    background: transparent;
    color: #fff;
}

.estc-arrow {
    display: inline-block;
    font-size: .85em;
    transform: rotate(-45deg);
    transition: transform .3s ease;
}

.estc-btn:hover .estc-arrow,
.estc-more:hover .estc-arrow {
    transform: rotate(0deg);
}

.estc-more {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--estc-font-heading);
    font-size: 18px;
    font-weight: 500;
    color: var(--estc-primary);
}

.estc-more:hover,
.estc-more:focus-visible {
    color: var(--estc-primary-dark);
}

.estc-more--light,
.estc-more--light:hover {
    color: #fff;
}

.estc-section-footer {
    margin-top: 48px;
    text-align: center;
}

.estc-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--estc-font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--estc-primary);
}

.estc-date i {
    font-size: .95em;
}

@media (max-width: 991px) {
    :root {
        --estc-section-pad: 4.5rem;
    }

    .estc-title {
        font-size: 42px;
    }
}

@media (max-width: 575px) {
    :root {
        --estc-section-pad: 3.5rem;
    }

    .estc-container {
        padding: 0 16px;
    }

    .estc-title {
        font-size: 34px;
    }

    .estc-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
}

/* ----------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------- */

.estc-footer {
    position: relative;
    margin-top: 110px;
    background: var(--estc-secondary);
    color: rgba(255, 255, 255, .72);
    font-size: 15.5px;
}

.estc-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/patterns/pattern_05.png') repeat;
    background-size: 120px;
    opacity: .035;
    pointer-events: none;
}

/* Banner card straddling the top edge of the footer */
.estc-footer__banner {
    position: relative;
    top: -78px;
    margin-bottom: -40px;
    padding: 40px 24px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--estc-primary);
    text-align: center;
}

.estc-footer__banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/estc_campus.jpg') center 40% / cover no-repeat;
    opacity: .14;
}

.estc-footer__banner > * {
    position: relative;
}

.estc-footer .estc-footer__banner h2 {
    padding: 0;
    margin: 0 0 8px;
    font-size: 34px;
    font-weight: 500;
    color: #fff;
}

.estc-footer .estc-footer__banner h2::after {
    content: none;
}

.estc-footer__banner p {
    margin: 0;
    font-size: 17px;
    color: rgba(255, 255, 255, .92);
}

.estc-footer__main {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1.6fr 1fr 1fr;
    gap: 48px;
    padding: 24px 24px 56px;
}

.estc-footer__brand {
    text-align: center;
}

.estc-footer__logo {
    display: inline-block;
    margin-bottom: 18px;
    padding: 14px 18px;
    background: #fff;
    border-radius: 10px;
}

.estc-footer__logo img {
    display: block;
    width: 170px;
    height: auto;
}

.estc-footer__brand p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #fff;
}

.estc-footer__brand p[lang="ar"] {
    margin-top: 4px;
    font-size: 17px;
}

.estc-footer h2 {
    position: relative;
    margin: 0 0 34px;
    padding-bottom: 18px;
    font-size: 26px;
    font-weight: 500;
    color: #fff;
}

.estc-footer h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: #4f9be0;
}

.estc-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.estc-footer li {
    margin-bottom: 14px;
    line-height: 1.6;
}

.estc-footer a {
    color: rgba(255, 255, 255, .72);
    transition: color .2s;
}

.estc-footer a:hover,
.estc-footer a:focus-visible {
    color: #fff;
}

.estc-footer__contact li {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.estc-footer__contact .estc-footer__icon {
    flex: 0 0 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.estc-footer__bottom {
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 24px 0 30px;
    text-align: center;
    font-size: 15px;
}

.estc-footer__bottom p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
}

@media (max-width: 1100px) {
    .estc-footer__main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .estc-footer__main {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .estc-footer__banner h2 {
        font-size: 26px;
    }
}

/* Back to top */
.estc-footer ~ .back-to-top-container .button.back-to-top__button,
.estc-footer ~ .back-to-top-container .button.back-to-top__button:hover {
    background: var(--estc-primary);
    color: #fff;
    border-radius: 0;
}

/* ----------------------------------------------------------------------
   Raw HTML (embed) blocks
   A page whose content is an embedded HTML document should span the full
   width, like a designed landing page, instead of sitting inside the
   1170px Bootstrap container with side gutters and a 20px strip under the title.
   ---------------------------------------------------------------------- */

.main-content.container:has(> .blocks > .embed-block:only-child) {
    width: 100%;            /* Bootstrap 3 fixes .container at 1170px, not just a max-width */
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.page-title:has(+ .main-content.container > .blocks > .embed-block:only-child) {
    margin-bottom: 0;
}

.embed-block {
    overflow-x: clip;       /* a stray wide element in pasted HTML must not add a page scrollbar */
}
