/* geologica-regular - latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Geologica';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/geologica-v1-latin-regular.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}


* {
    padding: 0;
    margin: 0;
}

body {
    font-family: 'Geologica', Arial, Helvetica, sans-serif;
    color: rgb(64, 64, 64);
}



.container {
    width: 450px;
    max-width: 90%;
    margin: 20px auto;
    padding: 20px 10px;
    text-align: center;
}

@media (min-width: 769px) {
    .container {
        width: 90%;
    }
}


h1 {
    margin-top: 30px;
}

h2 {
    padding: 20px;
    margin: 10px;
    margin-bottom: 0;
    background-color: #1a73d9;
    border-radius: 10px;
}

ul {
    list-style-type: none;
}

li {
    font-size: 20px;
    padding: 20px;
    margin: 10px;
    border-radius: 10px;
    cursor: pointer;
}

.unit {
    font-size: 32px;
    padding: 20px;
    margin-top: 40px;
    background-color: #1a73d9;
    border-radius: 10px;
    color: rgb(248, 248, 248);
    font-weight: bold;
    cursor: default;
}

.grammar {
    background-color: #c2dfff;
}

.vocab {
    background-color: rgba(246, 236, 186, 0.751);
}

.test {
    background-color: rgba(246, 186, 186, 0.684);
}

.opened {
    background-color: rgba(222, 222, 222, 0.633);
    color: rgb(149, 148, 148);
}

.hierarchy {
    font-size: 12px;
    color: rgba(64, 64, 64, 0.491);
}


a {
    text-decoration: none;
    color: rgb(64, 64, 64);
    cursor: pointer;
}

.input-container {
    display: block;
    margin: 10px;
}

input {
    padding: 10px;
}

select {
    padding: 10px;
}

button {
    font-family: 'Geologica';
    /* Button padding */
    background-color: #1a73d9;
    /* Button background color */
    color: white;
    /* Text color */
    border: none;
    /* Remove default border */
    border-radius: 5px;
    /* Optional: rounded corners */
    cursor: pointer;
    /* Change cursor to pointer */
    font-size: 14px;


}

.corner-button {
    position: absolute;
    /* Makes the button float within the container */
    top: 10px;
    /* Distance from the top edge of the container */
    right: 10px;
    /* Distance from the right edge of the container */
    padding: 10px 20px;
}




#logo {
    max-height: 200px;
    width: auto;
    height: auto;
    max-width: 100%;
    margin-top: 30px;
    /* Ensure it doesn't exceed the container width */
}



#footer {
    font-size: 10px;
    margin-top: 30px;
    color: rgb(124, 124, 124);
    text-decoration: none;
    display: none;
}











.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    position: relative;
    width: 90%;
    max-width: 1024px;
    height: auto;
    max-height: 90%;
    padding: 50px 30px 30px 30px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

.overlay-content iframe {
    width: 100%;
    height: 600px;
    /* pick a good fixed height */
    border: none;
    box-sizing: border-box;
}



#close-overlay {
    position: absolute;
    margin: 8px;
    top: 5px;
    right: 10px;
    z-index: 1000;
    color: white;
    font-family: sans-serif;
    border: none;
    border-radius: 20px;
    padding: 8px 12px;
    cursor: pointer;
}



.loading-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #333;
    font-family: sans-serif;
    z-index: 10;
}




#loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #1a73d9;
    z-index: 500;
}





.h5p-columns {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}



.unit-column {
    flex: 0 0 320px;
    width: 320px;
    scroll-snap-align: start;
}



.unit-column h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: rgb(248, 248, 248);
}


.scroll-btn {
    position: fixed;
    top: 30%;
    transform: translateY(-50%);
    z-index: 1000;
    background-color: 1a73d9;
    border: none;
    color: white;
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.scroll-left {
    left: 10px;
}

.scroll-right {
    right: 10px;
}





/* Stack columns vertically on smaller screens */
@media (max-width: 768px) {
    .h5p-columns {
        flex-direction: column;
        align-items: center;
    }

    .unit-column {
        width: 100%;
        flex: 0 0 auto;
        /* allow height to follow content */
    }

    .scroll-btn {
        display: none;
    }

}


@media (min-width: 768px) {
    .corner-button {
        display: none;
    }

}