/* ==========================================================================
   E-learningMais Landing Page
   ========================================================================== */

.elm-landing {
    --elm-primary: #0647ff;
    --elm-primary-hover: #003bd6;
    --elm-accent: #ff003c;

    --elm-dark: #020719;
    --elm-surface: #ffffff;
    --elm-surface-soft: #f5f7fb;

    --elm-text: #111827;
    --elm-text-muted: #667085;
    --elm-text-on-dark: #ffffff;

    --elm-border: #e5e9f2;

    --elm-container-width: 1200px;

    --elm-space-xs: 0.5rem;
    --elm-space-sm: 1rem;
    --elm-space-md: 2rem;
    --elm-space-lg: 4rem;
    --elm-space-xl: 6rem;

    --elm-radius-sm: 8px;
    --elm-radius-md: 12px;
    --elm-radius-lg: 18px;

    --elm-shadow-sm:
        0 4px 16px rgba(2, 7, 25, 0.08);

    --elm-shadow-md:
        0 18px 45px rgba(2, 7, 25, 0.14);

    position: relative;

    width: 100vw;
    max-width: 100vw;

    margin: 0;
    margin-left: calc(50% - 50vw);

    color: var(--elm-text);
    background: var(--elm-surface);
}

.elm-landing,
.elm-landing * {
    box-sizing: border-box;
}

body#page-local-elearningmaislanding-index {
    overflow-x: hidden;
}


/* ==========================================================================
   Ajustes ao layout Moodle/Trema

   Estas regras estão limitadas apenas à página deste plugin.
   ========================================================================== */

body#page-local-elearningmaislanding-index #page-header {
    display: none !important;
}

body#page-local-elearningmaislanding-index #topofscroll.main-inner {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;
}

body#page-local-elearningmaislanding-index #page-content,
body#page-local-elearningmaislanding-index #region-main-box,
body#page-local-elearningmaislanding-index #region-main {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    background: transparent !important;
}

body#page-local-elearningmaislanding-index #region-main {
    overflow: visible;
}

body#page-local-elearningmaislanding-index .drawer-toggles {
    display: none !important;
}


/* ==========================================================================
   Layout
   ========================================================================== */

.elm-container {
    width: min(
        calc(100% - (2 * var(--elm-space-md))),
        var(--elm-container-width)
    );

    margin-right: auto;
    margin-left: auto;
}

.elm-section {
    padding-top: var(--elm-space-xl);
    padding-bottom: var(--elm-space-xl);
}

.elm-grid {
    display: grid;
    gap: 1.5rem;
}


/* ==========================================================================
   Hero
   ========================================================================== */

.elm-hero {
    position: relative;

    display: flex;
    align-items: center;

    min-height: calc(100vh - 64px);

    overflow: hidden;

    color: var(--elm-text-on-dark);
    background: var(--elm-dark);
}

.elm-hero__media,
.elm-hero__overlay {
    position: absolute;
    inset: 0;
}

.elm-hero__media {
    z-index: 0;
}

.elm-hero__image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}

.elm-hero__overlay {
    z-index: 1;

    background:
        linear-gradient(
            90deg,
            rgba(2, 7, 25, 0.98) 0%,
            rgba(2, 7, 25, 0.92) 30%,
            rgba(2, 7, 25, 0.68) 50%,
            rgba(2, 7, 25, 0.20) 72%,
            rgba(2, 7, 25, 0.04) 100%
        );

    pointer-events: none;
}

.elm-hero__content {
    position: relative;
    z-index: 2;
 transform: translateY(-40px);
    width: min(100%, 1200px);

    margin-left: 5%;
    margin-right: auto;

    padding-top: var(--elm-space-lg);
    padding-bottom: var(--elm-space-lg);
}

.elm-hero__eyebrow {
    display: inline-block;

    margin-bottom: 1.5rem;

    color: var(--elm-primary);

    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.elm-hero__eyebrow::after {
    display: block;

    width: 58px;
    height: 4px;

    margin-top: 1rem;

    background: var(--elm-accent);

    content: "";
}

.elm-landing .elm-hero .elm-hero__title {
    max-width: 760px;

    margin: 0 0 1.75rem;

    color: #ffffff !important;

    font-size: clamp(3.2rem, 5.4vw, 5.4rem);
    font-weight: 800;
    line-height: 1.04 !important;
    letter-spacing: -0.045em;

    text-wrap: balance;
}

.elm-landing .elm-hero .elm-hero__description {
    max-width: 630px;

    margin: 0 0 2.25rem;

    color: rgba(255, 255, 255, 0.84) !important;

    font-size: 1.15rem;
    line-height: 1.75;
}


/* ==========================================================================
   Botões
   ========================================================================== */

.elm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 54px;

    padding: 0 2rem;

    border: 0;
    border-radius: var(--elm-radius-md);

    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;

    transition:
        background-color 180ms ease,
        color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.elm-button--primary,
.elm-button--primary:visited {
    color: #ffffff !important;
    background: var(--elm-primary);

    box-shadow:
        0 12px 30px rgba(6, 71, 255, 0.32);
}

.elm-button--primary:hover,
.elm-button--primary:focus {
    color: #ffffff !important;
    background: var(--elm-primary-hover);

    transform: translateY(-2px);

    box-shadow:
        0 17px 38px rgba(6, 71, 255, 0.42);
}

.elm-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 4px;
}


/* ==========================================================================
   Cabeçalhos das secções
   ========================================================================== */

.elm-section__header {
    max-width: 740px;

    margin: 0 auto 3.25rem;

    text-align: center;
}

.elm-section__eyebrow {
    display: inline-block;

    margin-bottom: 0.9rem;

    color: var(--elm-primary);

    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.elm-landing .elm-section__title {
    margin: 0 0 1rem;

    color: var(--elm-text) !important;

    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.elm-section__description {
    margin: 0;

    color: var(--elm-text-muted);

    font-size: 1.08rem;
    line-height: 1.7;
}


/* ==========================================================================
   Serviços
   ========================================================================== */

.elm-services {
    position: relative;
    background: var(--elm-surface);

    padding-top: 3.5rem;
    padding-bottom: 4rem;
}

.elm-services::before {
    position: absolute;
    top: 0;
    left: 50%;

    width: min(
        calc(100% - (2 * var(--elm-space-md))),
        var(--elm-container-width)
    );

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--elm-border),
            transparent
        );

    content: "";
    transform: translateX(-50%);
}

.elm-grid--services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.elm-card {
    position: relative;

    min-height: 220px;

    padding: 1.8rem;

    overflow: hidden;

    background: var(--elm-surface);

    border: 1px solid var(--elm-border);
    border-radius: var(--elm-radius-lg);

    box-shadow: var(--elm-shadow-sm);

    text-align: center;

    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease;
}

.elm-card::before {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background:
        linear-gradient(
            90deg,
            var(--elm-primary),
            #18a0fb
        );

    content: "";

    opacity: 0;

    transform: scaleX(0);
    transform-origin: left;

    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.elm-card:hover {
    border-color: rgba(6, 71, 255, 0.26);

    transform: translateY(-6px);

    box-shadow: var(--elm-shadow-md);
}

.elm-card:hover::before {
    opacity: 1;

    transform: scaleX(1);
}

.elm-landing .elm-card__title {
    margin: 0 auto 1rem;

    font-size: 1.35rem;

    font-weight: 750;

    line-height: 1.3;

    text-align: center;
}

.elm-card__description {
    margin: 0 auto;

    max-width: 280px;

    text-align: center;

    color: var(--elm-text-muted);

    font-size: 1rem;

    line-height: 1.7;
}

/* Reduz o espaço branco da secção de aprendizagem. */

.elm-services {
    min-height: auto;
    padding-top: 3rem;
    padding-bottom: 5rem;
}


/* ==========================================================================
   Chamada final
   ========================================================================== */

.elm-cta {
    padding-top: var(--elm-space-lg);
    padding-bottom: var(--elm-space-lg);

    color: var(--elm-text-on-dark);
    background: var(--elm-dark);
}

.elm-cta__content {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 2rem;
}

.elm-landing .elm-cta__title {
    margin: 0 0 0.75rem;

    color: #ffffff !important;

    font-size: clamp(1.8rem, 3vw, 2.7rem);
    font-weight: 800;
    line-height: 1.2;
}

.elm-cta__description {
    margin: 0;

    color: rgba(255, 255, 255, 0.72);

    font-size: 1.05rem;
}


/* ==========================================================================
   Responsividade
   ========================================================================== */

@media (max-width: 991px) {

    .elm-grid--services {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .elm-hero {
        min-height: 620px;
    }

    .elm-landing .elm-hero .elm-hero__title {
        max-width: 650px;
    }
}

@media (max-width: 700px) {

    .elm-container {
        width: calc(100% - 2rem);
    }

    .elm-section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .elm-hero {
        min-height: 560px;
    }

    .elm-hero__image {
        object-position: 62% center;
    }

    .elm-hero__overlay {
        background:
            linear-gradient(
                90deg,
                rgba(2, 7, 25, 0.97) 0%,
                rgba(2, 7, 25, 0.90) 68%,
                rgba(2, 7, 25, 0.72) 100%
            );
    }

    .elm-landing .elm-hero .elm-hero__title {
        font-size: clamp(2.7rem, 12vw, 4rem);
        line-height: 1.06 !important;
    }

    .elm-landing .elm-hero .elm-hero__description {
        font-size: 1rem;
    }

    .elm-grid--services,
    .elm-grid--features {
        grid-template-columns: 1fr;
    }

    .elm-card {
        min-height: auto;
    }

    .elm-cta__content {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Remove apenas as margens laterais exteriores da landing page. */

    body#page-local-elearningmaislanding-index #page.drawers #topofscroll.main-inner {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ==========================================================================
   Logótipo do Hero
   ========================================================================== */

.elm-hero__eyebrow--logo {
    display: inline-block;
   margin-bottom: 1rem;
}


.elm-landing .elm-hero__eyebrow--logo .elm-hero__logo {
    display: block;

    width: 220px !important;
    max-width: none !important;
    height: auto !important;

    margin-left: -15px;
    margin-bottom: -55px;

    filter: brightness(0) invert(1);
}
.elm-hero__eyebrow--logo::after {
    width: 200px;
}