/* Global variables */

:root {
    --les-logo-turquoise: rgb(27, 164, 186);
    --les-logo-turquoise-rgb: 27, 164, 186;
    --les-logo-dark-turquoise: rgb(26, 152, 180);
    --les-logo-dark-turquoise-rgb: 26, 152, 180;
    --les-logo-dark-teal: rgb(7, 76, 100);
    --les-logo-dark-teal-rgb: 7, 76, 100;

    --les-aqua: rgb(51, 149, 168);
    --les-aqua-rgb: 51, 149, 168;
    --les-light-aqua: rgb(106, 194, 212);
    --les-light-aqua-rgb: 106, 194, 212;
    --les-dark-blue: rgb(30, 108, 142);
    --les-dark-blue-rgb: 30, 108, 142;
    --les-dark-teal: rgb(4, 94, 128);
    --les-dark-teal-rgb: 4, 94, 128;

    --les-black: rgb(0, 0, 0);
    --les-black-rgb: 0, 0, 0;
    --les-white: rgb(255, 255, 255);
    --les-white-rgb: 255, 255, 255;
    --les-dark-gray: rgb(96, 96, 96);
    --les-dark-gray-rgb: 96, 96, 96;

    --les-variant-lightest-aqua: rgb(232, 244, 249);
    --les-variant-lightest-aqua-rgb: 232, 244, 249;
    --les-variant-light-aqua: rgb(200, 226, 232);
    --les-variant-light-aqua-rgb: 200, 226, 232;
    --les-variant-turquoise: rgb(0, 147, 207);
    --les-variant-turquoise-rgb: 0, 147, 207;
    --les-variant-orange: rgb(247, 103, 27);
    --les-variant-orange-rgb: 247, 103, 27;

    --bs-body-line-height: 1.25;
}

/* Fonts */

@font-face {
    font-family: 'Letters for Learners';
    src: url('/assets/fonts/Letters for Learners.ttf');
}

/* General styles */

body {
    font-family: 'Letters for Learners', sans-serif;

    &.waiting * {
        cursor: progress !important;
    }
}

main {
    .main-background {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('/assets/images/fondo-collage.png') center/cover;
        filter: opacity(10%);
        z-index: -1;
    }
}

/* Navbar */

header.navbar {
    .inline-navbar {
        height: 150px;
        padding: 0;
        justify-content: space-between;
        transition: all .6s ease 0s;
    }

    .navbar-background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(var(--les-white-rgb), 0.85);
        border-bottom: solid 10px var(--les-dark-blue);
        opacity: 0;
        transition: all .6s ease 0s;
    }

    .navbar-logo {
        display: flex;
        position: relative;
        top: 10vh;
        width: 100%;
        align-self: start;
        justify-content: center;
        transition: all .6s ease 0s;
    }

    .logo-link {
        display: block;
        width: min(60vmin, 380px);
        transition: all .6s ease 0s;
    }

    .logo-img {
        width: 100%;
    }

    .navbar-menu {
        position: absolute;
        top: 35px;
        right: 22px;
        z-index: 2000;
        transition: all .6s ease 0s;
    }

    .menu-button {
        border-style: none;

        &:focus {
            box-shadow: none;
        }
    }

    .menu-icon {
        display: inline-flex;
        position: relative;
        height: 30px;
        width: 30px;
        overflow: hidden;
        vertical-align: middle;
    }

    .icon-open {
        position: absolute;
        height: 100%;
        width: 100%;

        i {
            height: 2px;
            position: absolute;
            left: 0;
            background: var(--les-aqua);
            transition: all .5s ease 0s;
        }

        i:nth-of-type(1) {
            top: 6px;
            width: 30px;
        }

        i:nth-of-type(2) {
            top: 14px;
            width: 23px;
        }

        i:nth-of-type(3) {
            top: 22px;
            width: 30px;
        }
    }

    .navbar-menu.is-open {
        .icon-open {
            i:nth-of-type(1) {
                top: 14px;
                rotate: 45deg;
            }

            i:nth-of-type(2) {
                width: 0 !important;
            }

            i:nth-of-type(3) {
                top: 14px;
                rotate: -45deg;
            }
        }
    }

    .offcanvas {
        width: 200px;
        height: 100vh;
    }

    .offcanvas-header {
        height: 70px;
        padding: 0px;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: end;
        text-align: right;
    }

    .nav-item {
        display: flex;
        flex-direction: row;

        a {
            margin: 5px 20px 0 20px !important;
            padding: 0 !important;
            color: var(--les-aqua);
            font-size: 2rem;
            font-weight: 600;
        }

        .active {
            border-bottom: 2px solid var(--les-dark-blue);
            color: var(--les-dark-blue);
        }
    }

    @media (min-width: 576px) {
        .navbar-menu {
            top: calc(10.886vh - 15px);
            right: 31px;
        }

        .offcanvas {
            width: 220px;
        }

        .offcanvas-body {
            padding: 1rem 25px;
        }
    }

    @media (min-width: 768px) {
        .navbar-logo {
            top: 5vh;
            left: 3vw;
            width: 40vh;
        }

        .logo-link {
            width: 100%;
        }
    }

    @media (min-width: 1200px) {
         .offcanvas {
            position: relative;
            top: 0;
            right: 15px;
            flex: 0;
            align-self: center;
            transition: right .6s, flex .6s ease 0s
        }

        .navbar-nav {
            flex-direction: row;
            justify-content: end;
            transition: all .6s ease 0s;
        }

        .nav-item a {
            text-wrap: nowrap;
            transition: all .6s ease 0s;
        }

        .nav-item:not(:last-child)::after {
            content: "";
            width: 3px;
            background-color: var(--les-aqua);
        }
    }

    &.has-scrolled {
        .inline-navbar {
            padding: 0 22px;
            backdrop-filter: blur(20px);
        }

        .navbar-background {
            opacity: 1;
        }

        .navbar-logo {
            top: 0;
            width: 150px;
            align-self: center;
        }

        .logo-link {
            width: 150px;
        }

        .navbar-menu {
            top: 35px;
            right: 22px;
        }

        @media (min-width: 576px) {
            .inline-navbar {
                padding: 0 31px;
            }

            .navbar-logo {
                width: 100%;
            }

            .navbar-menu {
                top: 35px;
                right: 31px;
            }
        }

        @media (min-width: 1200px) {
            .inline-navbar {
                padding: 0 5vw;
            }

            .navbar-logo {
                top: 0;
                left: 0;
                width: 250px;
                align-self: center;
            }

            .logo-link {
                width: 100%;
            }

            .offcanvas {
                top: 0;
                right: 0;
                flex: 1;
                align-self: center;
            }

            .navbar-nav {
                flex-direction: row;
                justify-content: center;
            }

            .nav-item a {
                text-shadow: none;
            }
        }
    }
}

/* Sections */

.site-section {
    position: relative;
    width: 100%;
    padding: 50px 0 50px;
    font-size: 1.25rem;

    .section-banner {
        position: absolute;
        width: 100%;
        height: 400px;

        +div {
            padding-top: 150px;
        }
    }

    .section-container {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
        width: 100%;
        max-width: 1488px;
        margin: auto;
        padding: 0 1.5rem;
    }

    .section-title h1,
    .section-title h2,
    .section-title h3,
    .section-title h4,
    .section-title h5,
    .section-title h6 {
        font-size: calc(5.5vw + 0.875rem);
        font-weight: 400;
        color: var(--les-aqua);
        text-align: center;
        letter-spacing: -0.125rem;
        margin: 0;

        span {
            font-weight: 700;
            color: var(--les-dark-blue);
        }

        &::before, &::after {
            content: "";
        }

        @media (min-width: 1200px) {
            font-size: 5rem;
        }
    }

    .section-title:has(.title-banner) {
        display: flex;
        flex-direction: column;
        position: relative;
        align-items: center;
    }

    p {
        margin: 0.5rem 0;
        text-align: justify;
        color: var(--les-dark-gray);

        span {
            font-weight: 700;
        }
    }

    .section-img {
        overflow: hidden;
        aspect-ratio: 1 / 1;
    }

    .section-img img,
    .section-img video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .section-map {
        aspect-ratio: 1 / 1;
    }

    .section-map iframe {
        width: 100%;
        height: 100%;
    }
}

/* Grid */

.grid {
    display: grid;
    grid-template-rows: auto;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-columns: 1fr;
    row-gap: 1.25rem;
    column-gap: 1.25rem;
    align-items: center;
    width: 100%;

    @media (min-width: 992px) {
        row-gap: 0;
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Group */

.section-group,
.grid-group {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Section quote */

.section-quote {
    display: flex;
    align-items: center;
    justify-content: center;

    p {
        width: max-content;
        position: relative;
        font-size: 2.5rem;
        font-weight: 700;
        line-height: 1;
        text-align: center;
        color: var(--les-variant-orange);

        &::before, &::after {
            color: var(--les-variant-orange);
            font-family: Garamond, serif;
            font-size: 2em;
            position: absolute;
            display: inline-block;
        }

        &::before {
            content: "“";
            top: -0.25em;
            left: -0.625em;
        }

        &::after {
            content: "”";
            bottom: -0.25em;
            right: -0.375em;
        }
    }
}

/* Button */

.btn-primary {
    --bs-btn-font-weight: 600;
    --bs-btn-color: var(--les-white);
    --bs-btn-bg: var(--les-dark-blue);
    --bs-btn-border-color: var(--les-dark-blue);
    --bs-btn-hover-color: var(--les-dark-blue);
    --bs-btn-hover-bg: var(--les-white);
    --bs-btn-hover-border-color: var(--les-white);
    --bs-btn-focus-shadow-rgb: rgb(var(--les-dark-blue));
    --bs-btn-active-color: var(--les-dark-blue);
    --bs-btn-active-bg: var(--les-white);
    --bs-btn-active-border-color: var(--les-white);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(var(--les-black-rgb), 0.125);
    --bs-btn-disabled-color: var(--les-white);
    --bs-btn-disabled-bg: var(--les-dark-gray);
    --bs-btn-disabled-border-color: var(--les-dark-gray);
}

/* Hero */

.hero {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;

    .hero-background {
        position: absolute;
        top: 0%;
        left: 0%;
        height: 100%;
        width: 100%;
    }

    .hero-content {
        position: relative;
        height: 100%;
        width: 100%;
        color: var(--les-dark-gray);
        vertical-align: middle;
    }

    .hero-main {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-evenly;
        position: relative;
        width: 100%;
        height: 100vh;
    }
}

/* Hero arrow */

.hero-arrow {
    position: absolute;
    left: 50%;
    /* sqrt(2)*20 [from animation] + (sqrt(2)-1)/2 [from 45° rotation] + actual desired spacing */
    bottom: calc(28.28px + 0.21em + 10px);
    transform: translateX(-50%);
    font-size: 0.825em;

    span {
        display: block;
        width: 1em;
        height: 1em;
        border-bottom: 0.3em solid white;
        border-right: 0.3em solid white;
        transform: rotate(45deg);
        margin-top: -10px;
        animation: home-arrow-down 2s infinite;

        &:nth-child(2) {
            animation-delay: -0.2s;
        }

        &:nth-child(3) {
            animation-delay: -0.4s;
        }
    }

    /* &:hover span {
        animation-play-state: paused;
    } */

    @media (min-width: 768px) {
        bottom: calc(28.28px + 0.21em + 20px);
        font-size: 1.25em;
    }
}

@keyframes home-arrow-down {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-20px, -20px);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: rotate(45deg) translate(20px, 20px);
    }
}

/* Card body */

.section-card {
    .card-img {
        overflow: hidden;
        aspect-ratio: 1 / 1;
    }

    .card-img img,
    .card-img video {
        width: 100%;
        height: 100%;
        padding: 0.75rem;
        object-fit: cover;
    }

    .card-title {
        display: flex;
        flex-direction: row;
        column-gap: 1.5rem;
        align-items: center;
        justify-content: center;
        margin: 0;

        .card-title-icon {
            width: 3.5rem;
        }

        h1,
        h2,
        h3,
        h4,
        h5,
        h6 {
            margin: 0;
            color: var(--les-dark-gray);
            line-height: 1;
        }

        .card-title-icon ~ h1,
        .card-title-icon ~ h2,
        .card-title-icon ~ h3,
        .card-title-icon ~ h4,
        .card-title-icon ~ h5,
        .card-title-icon ~ h6 {
            width: min-content;
        }
    }

    .card-body {
        padding: 2rem;
    }

    .card-text p { 
        font-size: 1.5rem;
        text-align: center;
    }

    ul {
        margin: 0;
        list-style-type: '\2B25';
    }

    li {
        padding-left: 1em;
    }
}

/* Animations */

[data-aos^=fade][data-aos^=fade] {
    transition-property: opacity, translate;
}

[data-aos^=fade][data-aos^=fade].aos-animate {
    translate: 0;
}

[data-aos=fade-up] {
    translate: 0 100px;
}

[data-aos=fade-down] {
    translate: 0 -100px;
}

[data-aos=fade-right] {
    translate: -100px;
}

[data-aos=fade-left] {
    translate: 100px;
}

[data-aos=fade-up-md-left] {
    translate: 0 100px;

    @media (min-width: 768px) {
        translate: 100px;
    }
}

[data-aos=fade-up-md-right] {
    translate: 0 100px;

    @media (min-width: 768px) {
        translate: -100px;
    }
}

[data-aos=fade-up-lg-left] {
    translate: 0 100px;

    @media (min-width: 992px) {
        translate: 100px;
    }
}

[data-aos=fade-up-lg-right] {
    translate: 0 100px;

    @media (min-width: 992px) {
        translate: -100px;
    }
}