.local-gate-homepage #page-header {
    display: none;
}
.local-gate-homepage #page {
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}
.local-gate-homepage #region-main {
    padding: 0;
    border: 0;
}
.gate-home {
    --gate-accent: #2f6f50;
    --gate-soft: #e7f1e9;
    --gate-card-bg: #fff;
    --gate-card-gap-x: 32px;
    --gate-card-gap-y: 32px;
    --gate-icon-title-gap: 24px;
    --gate-title-content-gap: 40px;
    --gate-section-spacing: 48px;
}

.gate-language-selector {
    display: flex;
    justify-content: flex-end;
}
.gate-language-selector__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .75rem;
}
.gate-language-selector__link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .8rem;
    border: 2px solid transparent;
    border-radius: 999px;
    color: var(--bs-body-color, #1d2125);
    background: rgba(255, 255, 255, .82);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 .125rem .4rem rgba(0, 0, 0, .08);
}
.gate-language-selector__link:hover {
    color: var(--gate-accent);
    text-decoration: none;
    background: #fff;
}
.gate-language-selector__link.is-current {
    border-color: var(--gate-accent);
    color: var(--gate-accent);
    background: #fff;
}
.gate-language-selector__flag {
    font-size: 1.2rem;
    line-height: 1;
}
.gate-language-selector__name {
    line-height: 1.2;
}

.gate-hero {
    background: linear-gradient(135deg, #eef6f1 0%, #fff 65%);
}
.gate-section-alt {
    background: var(--gate-soft);
}
.gate-content-section {
    padding-top: var(--gate-section-spacing);
    padding-bottom: var(--gate-section-spacing);
}
.gate-logo-panel {
    min-height: 180px;
    justify-content: center;
}
.gate-partner-logo {
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.gate-richtext > :last-child {
    margin-bottom: 0;
}
.gate-home .card {
    width: 100%;
    border-radius: 1rem;
    background-color: var(--gate-card-bg);
}
.gate-home .card-body {
    padding: 2rem;
}
.gate-card-grid,
.gate-partner-grid {
    --bs-gutter-x: var(--gate-card-gap-x);
    --bs-gutter-y: 0;
    row-gap: var(--gate-card-gap-y);
}
.gate-card-grid > *,
.gate-partner-grid > * {
    margin-top: 0;
}
.gate-card-column {
    display: flex;
}
.gate-section-heading {
    min-height: 3.5rem;
    column-gap: var(--gate-icon-title-gap);
    margin-bottom: var(--gate-title-content-gap);
}
.gate-section-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    color: var(--gate-accent);
    background: #fff;
    box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .08);
}
.gate-section-icon .gate-section-icon-image {
    width: 1.75rem;
    height: 1.75rem;
    margin: 0;
}
.gate-home .btn:focus-visible,
.gate-home a:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}
@media (max-width: 767.98px) {
    .gate-language-selector,
    .gate-language-selector__list {
        justify-content: flex-start;
    }
    .gate-language-selector__list {
        gap: .5rem;
    }
    .gate-language-selector__link {
        padding: .5rem .7rem;
    }
    .gate-home .display-4 {
        font-size: 2.25rem;
    }
    .gate-home .card-body {
        padding: 1.5rem;
    }
    .gate-card-grid,
    .gate-partner-grid {
        --bs-gutter-x: min(var(--gate-card-gap-x), 24px);
        row-gap: min(var(--gate-card-gap-y), 24px);
    }
    .gate-section-heading {
        column-gap: min(var(--gate-icon-title-gap), 16px);
        margin-bottom: min(var(--gate-title-content-gap), 32px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .gate-home *,
    .gate-home *::before,
    .gate-home *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* Visual icon selector used in the plugin administration. */
.local-gate-icon-selector__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: .75rem;
    max-width: 56rem;
}
.local-gate-icon-selector__option {
    display: flex;
    min-height: 5.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem;
    border: 2px solid var(--bs-border-color, #dee2e6);
    border-radius: .75rem;
    color: inherit;
    background: var(--bs-body-bg, #fff);
    text-align: center;
    cursor: pointer;
}
.local-gate-icon-selector__option:hover {
    border-color: var(--bs-primary, #0f6cbf);
}
.local-gate-icon-selector__option.is-selected {
    border-color: var(--bs-primary, #0f6cbf);
    box-shadow: 0 0 0 .2rem rgba(15, 108, 191, .18);
}
.local-gate-icon-selector__option:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}
.local-gate-icon-selector__preview {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
}
.local-gate-icon-selector__icon {
    width: 2rem;
    height: 2rem;
    margin: 0;
}
.local-gate-icon-selector__empty {
    font-size: 2rem;
    line-height: 1;
}
.local-gate-icon-selector__label {
    font-size: .875rem;
    font-weight: 600;
}

/* Self-contained SVG icons used by the selector and homepage sections. */
.local-gate-inline-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    flex: 0 0 auto;
}

.gate-card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
}
.gate-card-icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: .875rem;
    color: var(--gate-accent);
    background: var(--gate-soft);
}
.gate-card-icon .gate-card-icon-image {
    width: 1.6rem;
    height: 1.6rem;
    margin: 0;
}


/* Construction mode: public users only see the GATE landing page. */
.local-gate-construction-mode .navbar,
.local-gate-construction-mode .secondary-navigation,
.local-gate-construction-mode .drawer,
.local-gate-construction-mode .drawer-toggles,
.local-gate-construction-mode .breadcrumb,
.local-gate-construction-mode #page-footer {
    display: none !important;
}
.local-gate-construction-mode #page {
    margin-top: 0 !important;
}

/* Hero logo hierarchy: GATE above the title, Erasmus+ logos below the subtitle. */
.gate-hero-content {
    max-width: 72rem;
}
.gate-project-logo-wrap {
    margin-bottom: 1.5rem;
}
.gate-project-logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.gate-hero-subtitle {
    margin-bottom: 1.5rem;
}
.gate-erasmus-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.gate-erasmus-logo {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
}
.gate-erasmus-logo--1 {
    max-width: 100%;
}
.gate-erasmus-logo--2 {
    max-width: 100%;
}

@media (max-width: 767.98px) {
    .gate-project-logo-wrap {
        margin-bottom: 1.25rem;
    }
    .gate-project-logo {
        max-width: 100%;
    }
    .gate-erasmus-logos {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    .gate-erasmus-logo--1 {
        max-width: 100%;
    }
    .gate-erasmus-logo--2 {
        max-width: 100%;
    }
}

/* GATE 1.1 visual refresh. All selectors remain scoped to the GATE homepage. */
.gate-home .gate-hero { background: var(--gate-hero-bg, #fff5d1); }
.gate-home .gate-introduction { background: var(--gate-introduction-bg, #e7f1e9); }
.gate-home .gate-objectives { background: var(--gate-objectives-bg, #e7f1e9); }
.gate-home .gate-resources { background: var(--gate-resources-bg, #fff8e3); }
.gate-home .gate-partners { background: var(--gate-partners-bg, #e7f1e9); }
/* Consultation buttons inherit Boost's btn-primary appearance. */
.gate-home .gate-consult-button {
    font-weight: 600;
    border-radius: .65rem;
}
.gate-home .gate-partner-column { display: flex; align-items: stretch; justify-content: center; }
.gate-home .gate-partner-column > a,
.gate-home .gate-partner-column > img {
    background: #fff;
    border-radius: .9rem;
    padding: 1rem;
    min-height: 8rem;
}
.gate-home .gate-partner-column > a { display: flex; align-items: center; justify-content: center; width: 100%; }
.gate-home .gate-partner-column > a > img { max-width: 100%; }

/* 1.1.0-beta2: white separators, Erasmus band, partner cards and newsletter palette. */
.gate-home { background: #fff; }
.gate-home > section { margin-bottom: 32px; }
.gate-home > section:last-child { margin-bottom: 0; }
.gate-home .gate-hero { border-radius: 20px; overflow: hidden; }
.gate-home .gate-erasmus-logos {
    background: #fff;
    justify-content: center;
    padding: 12px 20px;
    margin: 1.5rem -12px 0;
    gap: 1.5rem;
}
.gate-home .gate-partner-column { display: flex; align-items: stretch; }
.gate-home .gate-partner-card {
    display: flex; flex-direction: column; width: 100%; min-height: 205px;
    background: #fff; border: 1px solid #dce5df; border-radius: 18px;
    padding: 20px; text-align: left;
}
.gate-home .gate-partner-name { font-size: 1rem; font-weight: 600; margin: 0 0 16px; }
.gate-home .gate-partner-logo-wrap { display: flex; flex: 1; align-items: center; justify-content: center; }
.gate-home .gate-partner-logo { display: block !important; max-width: 100%; object-fit: contain; }
.gate-home .gate-partner-visit { align-self: flex-end; margin-top: 16px; }
.gate-home .gate-newsletters { background: var(--gate-newsletters-bg, #ffecd8); border-radius: 18px; }

.gate-home .gate-newsletter-all { text-align: center; margin: 16px 0 0; }
.gate-home .gate-newsletter-all a { color: #176545; font-weight: 600; }
@media (max-width: 991.98px) { .gate-home > section { margin-bottom: 24px; } }
@media (max-width: 575.98px) { .gate-home > section { margin-bottom: 16px; } }

/* 1.1.0-beta3: compact centred layout, section breathing room, full-width Erasmus strip. */
.local-gate-homepage .gate-home {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 12px;
}
.local-gate-homepage .gate-home > section:not(.gate-hero) {
    border-radius: 18px;
}
.local-gate-homepage .gate-home > section > .container {
    width: 100%;
    max-width: none;
    padding-inline: clamp(24px, 3.2vw, 44px);
}
.local-gate-homepage .gate-home .gate-hero > .container {
    max-width: none;
    padding-inline: clamp(24px, 3.2vw, 44px);
}
.local-gate-homepage .gate-home .gate-erasmus-logos {
    width: 100%;
    margin: 0 0 24px;
    padding: 14px 24px;
    background: #fff;
    box-sizing: border-box;
    justify-content: center;
}
.local-gate-homepage .gate-home .gate-hero-content { max-width: none; }
.local-gate-homepage .gate-home .card-body { padding: 1.35rem; }
.local-gate-homepage .gate-home .gate-card-grid,
.local-gate-homepage .gate-home .gate-partner-grid {
    --bs-gutter-x: 24px;
    row-gap: 24px;
}
.local-gate-homepage .gate-home .gate-partner-card { min-height: 170px; padding: 18px; }
@media (max-width: 767.98px) {
    .local-gate-homepage .gate-home { padding-inline: 8px; }
    .local-gate-homepage .gate-home > section > .container,
    .local-gate-homepage .gate-home .gate-hero > .container { padding-inline: 20px; }
    .local-gate-homepage .gate-home .card-body { padding: 1.15rem; }
    .local-gate-homepage .gate-home .gate-erasmus-logos { gap: 12px; padding: 12px; }
}

/* Optional independent GATE logo in the native Moodle navbar. */
.navbar.fixed-top .gate-navbar-logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-inline-end: 1rem;
    border-radius: 4px;
}
.navbar.fixed-top .gate-navbar-logo {
    display: block;
    max-width: min(180px, 28vw);
    max-height: 46px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.navbar.fixed-top .gate-navbar-logo-link:focus-visible {
    outline: 3px solid #e0a800;
    outline-offset: 3px;
}
@media (max-width: 767.98px) {
    .navbar.fixed-top .gate-navbar-logo { max-width: 96px; max-height: 34px; }
    .navbar.fixed-top .gate-navbar-logo-link { margin-inline-end: .5rem; }
}
/* Compact logo-first hero, while preserving text fallback. */
.local-gate-homepage .gate-home .gate-hero > .container { padding-top: 24px !important; padding-bottom: 16px !important; }
.local-gate-homepage .gate-home .gate-project-logo-wrap { margin-bottom: 0; }
.local-gate-homepage .gate-home .gate-project-logo { max-width: 100%; }
.local-gate-homepage .gate-home .gate-hero-text-fallback[hidden] { display: none !important; }

/* 1.1.0-beta6: match the published-edition cards from local_newsletterbuilder. */
.local-gate-homepage .gate-home .gate-newsletters {
    max-width: 100%;
    padding-block: clamp(22px, 3vw, 36px);
}
.local-gate-homepage .gate-home .gate-newsletters .gate-section-heading { min-height: 0; }
.local-gate-homepage .gate-home .gate-newsletters .gate-section-heading + p { margin: 8px 0 20px; }
.local-gate-homepage .gate-home .gate-newsletter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: 850px;
    margin: 0 auto;
}
.local-gate-homepage .gate-home .gate-newsletter-card {
    min-width: 0;
    min-height: 195px;
    border: 1px solid #d6e1e4;
    border-radius: 12px;
    background: #fff;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}
.local-gate-homepage .gate-home .gate-newsletter-logo {
    display: block;
    max-width: 120px;
    width: auto;
    height: 72px;
    object-fit: contain;
}
.local-gate-homepage .gate-home .gate-newsletter-number {
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 750;
    color: #194c57;
    margin: 0;
}
.local-gate-homepage .gate-home .gate-newsletter-language { margin: 0; font-size: .85rem; }
.local-gate-homepage .gate-home .gate-newsletter-view {
    display: inline-block;
    min-width: 125px;
    background-color: #276c7a;
    border-color: #276c7a;
    color: #fff;
    font-weight: 600;
    text-align: center;
}
.local-gate-homepage .gate-home .gate-newsletter-view:hover,
.local-gate-homepage .gate-home .gate-newsletter-view:focus-visible {
    background-color: #194c57;
    border-color: #194c57;
    color: #fff;
}
.local-gate-homepage .gate-home .gate-newsletter-view:focus-visible { outline: 3px solid #e0a800; outline-offset: 3px; }
.local-gate-homepage .gate-home .gate-newsletter-all { margin-top: 16px; }
@media (max-width: 720px) {
    .local-gate-homepage .gate-home .gate-newsletter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .local-gate-homepage .gate-home .gate-newsletter-grid { grid-template-columns: 1fr; }
}

/* 1.1.0-beta7: compact the newsletter SECTION vertically; keep its width and cards. */
.local-gate-homepage .gate-home .gate-newsletters {
    padding-top: 20px;
    padding-bottom: 20px;
}
.local-gate-homepage .gate-home .gate-newsletters .gate-section-heading {
    margin-bottom: 4px;
    min-height: 0;
}
.local-gate-homepage .gate-home .gate-newsletters .gate-section-heading h2 {
    margin-block: 0;
}
.local-gate-homepage .gate-home .gate-newsletters .gate-section-heading + p {
    margin: 4px 0 12px;
}
.local-gate-homepage .gate-home .gate-newsletters .gate-newsletter-all {
    margin: 12px 0 0;
}
.local-gate-homepage .gate-home .gate-newsletter-date {
    margin: 0;
    color: #52666b;
    font-size: .9rem;
    line-height: 1.35;
    text-align: center;
}
@media (max-width: 575.98px) {
    .local-gate-homepage .gate-home .gate-newsletters {
        padding-top: 16px;
        padding-bottom: 16px;
    }
}

/* Introductory announcement immediately below the deliverables heading. */
.gate-home .gate-resources-intro {
    margin: 0 0 1.5rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
