html,
body {
    width: 100%;
    overflow-x: hidden;
    /* Prevent horizontal scrollbar. */
}

* {
    box-sizing: border-box;
    /* Prevent padding/margin from breaking elements. */
}

body {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 100vh;
    margin: 0;
    background-color: #f8f9fa;
}

.mobile-header-bar {
    display: none;
}

.main-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15rem 1rem 1rem 1rem;
}

.welcome-container {
    align-self: center;
    justify-self: center;
    padding: 2rem;
    background-color: rgb(122, 151, 198);
    border-radius: 15px;
    box-shadow: 0 0 20px rgb(122, 151, 198);
    position: relative;
    overflow: hidden;
    text-align: center;
    max-width: 90%;
    width: 600px;
    margin: 0 auto;
}

#welcome-title {
    margin-top: 30px;
    color: white;
    font-size: 2.5rem;
    font-weight: 500;
}

#welcome-text {
    color: #ffffff;
    padding: 0 50px;
    margin-top: 20px;
    margin-bottom: 30px;
    font-size: 1.1rem;
    min-height: 3rem;
}

#start-btn {
    background-color: rgb(82, 156, 114);
    border-color: rgb(82, 156, 114);
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 0.5rem 1.5rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

#start-btn:hover {
    background-color: rgb(62, 126, 94);
    border-color: rgb(62, 126, 94);
    transform: translateY(-2px);
}

/* Modal. */
.modal-content {
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    background-color: #ffffff;
    border: none;
}

.modal-title {
    font-weight: 500;
    font-size: 1.5rem;
    color: #333;
}

.modal-header .btn-close {
    filter: invert(60%);
}

.modal-body {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    padding-top: 1rem;
    padding-bottom: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body-link {
    color: rgb(0, 0, 0);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgb(150, 150, 150);
    text-underline-offset: 4px;
}

.modal .btn {
    transition: background-color 0.2s ease;
}

/* Footer section in desktop. */
.footer-section {
    text-align: center;
    width: 100%;
    position: relative;
    margin-top: 280px;
    padding-bottom: 30px;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 60px;
    padding: 0 20px;
}

.footer-link-column {
    flex: 1;
    min-width: 200px;
    margin: 0 10px;
    text-align: center;
}

.footer-link-column-title {
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: rgb(94, 94, 94);
    letter-spacing: 0.1em;
}

.footer-link-column-links {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    gap: 5px;
    color: rgb(94, 94, 94);
    font-weight: 400;
    letter-spacing: 0.05em;
}

.footer-link-column-links a {
    color: rgb(94, 94, 94);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link-column-links a:hover {
    color: rgb(94, 94, 94);
}

.footer-copyright {
    font-size: 0.8rem;
    font-weight: 300;
    color: rgb(150, 150, 150);
    text-align: center;
    padding-left: 1rem;
}

/* Hamburger menu in mobile or small screens. */
.hamburger-menu {
    display: none;
}

.hamburger-menu-icon {
    position: fixed;
    top: 15px;
    right: 20px;
    font-size: 30px;
    z-index: 1001;
}

@keyframes rotate720 {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(720deg);
    }
}

.rotate-once {
    animation: rotate720 0.5s ease;
}

.hamburger-menu-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 60%;
    background-color: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 10px 12px 20px 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.hamburger-menu-sidebar.open {
    transform: translateX(0);
}

.hamburger-menu-sidebar-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hamburger-menu-sidebar-links a {
    display: inline-block;
    margin: 8px 0;
    font-size: 18px;
    text-decoration: none;
    color: #333;
}

.hamburger-menu-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.hamburger-menu-sidebar-close {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
    width: 100%;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
}

.hamburger-menu-sidebar-close i {
    font-size: 2rem;
}

.hamburger-menu-divider {
    border: none;
    border-top: 1px solid rgb(130, 130, 130);
    margin: 10px 0;
    width: 100%;
}

/* For small tablet screens. E.g. iPad Air and Mini 768px. */
@media (max-width: 1000px) {

    .mobile-header-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background-color: #f8f9fa;
        z-index: 1000;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 10px 20px 10px 20px;
    }

    .hamburger-menu-icon {
        position: fixed;
        top: 15px;
        right: 20px;
        font-size: 28px;
        z-index: 9999;
    }

    .welcome-container {
        width: 90%;
    }

    #welcome-title {
        font-size: 2.2rem;
    }

    #welcome-text {
        font-size: 1.1rem;
        padding: 0 10px;
    }

    #start-btn {
        font-size: 1rem;
    }

    .footer-section {
        min-height: 120px;
    }

    .footer-links {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }
}

/* For mobile phone screens. E.g. iPhone 12 Pro 390px. */
@media (max-width: 450px) {

    .main-section {
        height: 100vh;
        padding: 2rem 0 2rem 0;
    }

    .welcome-container {
        width: 90%;
        padding: 1.5rem 1.2rem 1.5rem 1.2rem;
        margin: 0;
    }

    #welcome-title {
        font-size: 1.8rem;
        margin-top: 15px;
    }

    #welcome-text {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    #start-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem 0.5rem 1rem;
        margin-top: 3px;
        margin-bottom: 4px;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .footer-links {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }
}