/* GENERAL */
:root {
    --background: #F7F7F7;
    --background-header: #113A74;
    --background-card: #f9f9f9;
    --primary: #1652A7;
    --primary-dark: #103C75;
    --secondary-dark: #f3f8ff;
    --shadow-card: #556A86;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--background);
    font-family: "Raleway", sans-serif;
}

main {
    flex: 1;
}

main.homepage {
    flex: 1;
    display: flex;
}

.container {
    max-width: 90%;
    margin: 0 auto;
    width: 100%;
}

img {
    max-width: 100%;
    object-fit: cover;
}

/* HEADER */
header {
    width: 100%;
    background: var(--background-header);
    display: flex;
    align-items: center;
    position: relative;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 0;
}

h1 {
    font-family: "Dancing Script", cursive;
    font-size: 2.5rem;
    color: var(--background);
}

h1 a {
    color: inherit;
    text-decoration: none;
}

/* NAV */
.header__hamburger {
    display: none;
    width: 32px;
    height: 32px;
    background-image: url(../public/assets/icons/menu.svg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    cursor: pointer;
}

.header__hamburger.active {
    background-image: url(../public/assets/icons/close.svg);
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 3rem;
}

nav a {
    font-weight: 450;
    font-size: 1.125rem;
    text-decoration: none;
    color: var(--background);
    transition: 0.3s ease-in-out;
}

nav a::after {
    display: block;
    content: "";
    width: 0;
    height: 3px;
    margin: 0 auto;
    background-color: #ebebeb;
    border-radius: 5px;
    transition: 0.3s ease-in-out;
}

nav a:hover::after {
    width: 35px;
}

/* POST */
#posts {
    width: 90%;
    max-width: 50rem;
    margin: 100px auto;
    display: flex;
    flex-direction: column;
    gap: 1.875rem;
}

.post {
    background-color: var(--background-card);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-card);
    width: 100%;
    max-width: 50rem;
    margin: 0 auto;
}

.post h2 {
    font-size: 1.8rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.post small {
    font-size: 0.85rem;
    color: #777;
}

.post p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* HERO */
.hero {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 2rem;
}

.hero>* {
    flex: 1 1 25em;
}

.hero-text {
    font-family: "Raleway", sans-serif;
}

.hero-text h2 {
    font-size: 4.4rem;
    line-height: 1.06;
    margin-bottom: 2.2rem;
    font-weight: 500;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2.8rem;
    line-height: 1.5;
    color: #545454;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-height: 70vh;
    width: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1.25rem 2.5rem;
    font-size: 1.25rem;
    font-weight: 580;
    border-radius: 40px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: 0.25s ease;
}

.btn.primary {
    background: var(--primary);
    color: var(--background);
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn.secondary {
    background: var(--background);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn.secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

/* LOG IN & REGISTER */
h3 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.login-container,
.reg-container {
    width: 90%;
    font-family: "Raleway", sans-serif;
    max-width: 32rem;
    margin: 0 auto;
    margin-top: 6.25rem;
    padding: 3.125rem 2.5rem;
    background-color: var(--background-card);
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-input {
    padding: 0.7rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 1.25rem;
}

.form-input:focus {
    border-color: #007BFF;
}

#loginForm,
#registerForm {
    display: flex;
    flex-direction: column;
}

.login-container label,
.reg-container label {
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.login-container button,
.reg-container button {
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
    background: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 0.3rem;
    margin-top: 0.9rem;
}

.login-container button:hover,
.reg-container button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.inline-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.inline-link:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* FOOTER */
footer {
    text-align: center;
    padding-bottom: 3rem;
    font-size: 0.9rem;
    color: #545454;
}

/* MEDIA QUERIES */
@media (max-width: 1300px) {
    .hero-text h2 {
        font-size: 3.5rem;
    }
}

@media (max-width: 900px) {
    .hero {
        display: flex;
        flex-direction: column;
        gap: 0rem;
    }

    .hero-text {
        margin-top: 4rem;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-text p {
        font-size: 1rem;
        margin-bottom: 1.9rem;
    }

    .btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .hero-text h2 {
        margin-bottom: 1.6rem;
    }

    .hero>* {
        flex: none;
    }

    h1 {
        font-size: 2rem;
    }

    nav a {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .header__nav-list {
        display: none;
        flex-direction: column;
        gap: 1.5rem;
        background-color: var(--background-header);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1.5rem 2rem;
    }

    .header__nav-list.active {
        display: flex;
    }

    nav a::after {
        margin: 0;
    }

    .header__hamburger {
        display: block;
    }

    .login-container,
    .reg-container,
    #posts {
        margin-top: 3.125rem;
    }

    footer {
        margin-top: 1.25rem;
    }
}