/* Assistant Font */
@font-face {
    font-family: 'Assistant';
    src: url('./fonts/Assistant.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Open Sans Font */
@font-face {
    font-family: 'Open Sans';
    src: url('./fonts/OpenSans.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #363636;
    --secondary-color: black;
    --strong-color: #086073;
    --form-color: #05454f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', 'Assistant', sans-serif;
}

h1 {
    font-weight: 700;
    font-size: clamp(1.5rem, 5vw, 2.7rem);
    line-height: 1.2;
    color: var(--primary-color);
}

h2 {
    font-weight: 500;
    font-size: 2rem;
    line-height: 0.9;
    color: white;
}

h3 {
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    line-height: 1.2;
    color: var(--primary-color);
}

h4 {
    /* padding: 1rem; */
    font-weight: 700;
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    line-height: 1.2;
    color: var(--primary-color);
}

.p-1 {
    padding: 1rem;
}

main {
    display: flex;
    flex-direction: column;
    margin: auto;
    position: relative;
}

header {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.hero {
    width: 100vw;
}

article {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
}

section {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
}

.text {
    font-size: clamp(1.3rem, 2vw, 1.5rem);
    color: var(--primary-color);
}

ul {
    padding: 1rem;
}

strong {
    color: var(--strong-color);
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem;
    background-color: var(--form-color);
    color: white;
    border-radius: 1rem;
}

form input {
    width: 100%;
    font-weight: 400;
    padding: 0.3em;
    border-radius: 0.5rem;
    border: none;
    font-size: 1.2rem;
    font-family: 'Open Sans';
    text-align: right;
    color: var(--form-color);
}

form input::placeholder {
    color: var(--form-color);
}

form select {
    width: 100%;
    padding: 0.3em;
    border-radius: 0.5rem;
    border: none;
    font-size: 1.2rem;
    font-family: 'Open Sans';
    color: var(--form-color);
}

form select::placeholder {
    color: var(--form-color);
}

form button {
    padding: 0.1em 1em;
    border-radius: 0.8rem;
    border: none;
    font-size: 1.5rem;
    background-color: white;
    color: var(--form-color);
    font-family: 'Open Sans';
    font-weight: 600;
    cursor: pointer;
}

.terms {
    font-size: clamp(0.6rem, 2vw, 0.7rem);
    text-align: right;
}

.join-jump {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: var(--strong-color);
    color: white;
    padding: 0.7rem;
    text-align: center;
    border: none;
    font-size: clamp(1.3rem, 2vw, 1.5rem);
    font-weight: 400;
    font-family: 'Open Sans';
    text-decoration: none;
}

/* Loading Spinner */
.button-loading {
    color: transparent !important;
    position: relative;
    pointer-events: none;
}

.button-loading::after {
    content: "\f110";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s infinite linear;
    color: var(--form-color);
    font-size: 1.5rem;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

input.error,
select.error {
    border: 2px solid red;
    background-color: #ffdada;
    color: #a00;
}

form input,
form select {
    transition: all 0.3s ease;
}

.thanks-message {
    line-height: 1.2;
}

@media (min-width: 768px) {
    main {
        max-width: 50%;
    }

    .hero {
        width: 100%;
    }

    .form-container {
        position: fixed;
        left: 2%;
        top: 3%;
        width: 21%;
        max-height: 90svh;
        overflow: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .form-container::-webkit-scrollbar {
        display: none;
    }

    form {
        padding: 1.5rem;
    }

    .join-jump {
        display: none;
    }
}

/* City Autocomplete Styles */
.city-autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.city-dropdown-list {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: 200px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid var(--form-color);
    border-radius: 0.5rem;
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin-top: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}

.city-dropdown-list[hidden] {
    display: none;
}

.city-dropdown-list:not([hidden]) {
    display: block;
}

.city-dropdown-list li {
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--form-color);
    border-bottom: 1px solid #eee;
    text-align: right;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
}

.city-dropdown-list li:last-child {
    border-bottom: none;
}

.city-dropdown-list li:hover,
.city-dropdown-list li.focused {
    background-color: #f0f0f0;
}