/* 600px and down */
/* Globális változók */
:root {
    --nav-text-color: #a99387;
    --nav-hover-text-color: #8d7a70;

    --light-background-color: #efe1d9;
    --dark-background-color: #6e6967;

    --primary-title-text-color: #8b7979;
    --secondary-title-text-color: #afaca8;

    --primary-text-color: #8b7979;
    --secondary-text-color: #c8bdb7;

    --btn-background-color: #6e6967;
    --btn-hover-background-color: #88817e;
    --btn-text-color: #c2adad;
    --btn-hover-text-color: #c7c0c0;
}

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

body {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    background-color: var(--light-background-color);
    display: grid;
    grid-template-areas: 
        "nav" 
        "header" 
        "main" 
        "footer" 
    ;
    grid-template-columns: 1fr;
    grid-template-rows: 0px auto 1fr auto;
    min-height: 100vh;
    height: 100%;
}

/* Navigation általános beállítások */
nav {
    grid-area: nav;
    background-color:transparent;
    position: fixed;
    z-index: 100;
    top: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: end;
    justify-content: center;
    width: 100%;
    height: 60px;
}

nav.transparent {
    background-color: transparent;
}

nav.solid {
    background-color: rgba(0, 0, 0, 0.61); 
}

nav .logo-container {
    width: 5.5em;
    height: 5.5em;
}

nav .logo-container img {
    width: 100%;
    height: 100%;
}

/* Normál menü mobil nézetben */
.navbar {
    display: none;
}

/* Mobil menü */
.hamburger {
    display: block;
    position: relative;
    padding: 20px;
}

.dropdown-menu {
    background-color: transparent;
    backdrop-filter: blur(30px);
    width: 100%;
    height: 0;
    position: absolute;
    top: 100%;
    right: 0;
    overflow: hidden;
    list-style: none;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, height 0.3s ease-in-out;
}

.dropdown-menu.open {
    height: auto; 
    opacity: 1;
    visibility: visible;
    padding: 10px;
}

.toggle-btn {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--nav-text-color);
}

.dropdown-menu li {
    padding: 15px;
    position: relative;
    
}

.dropdown-menu li a {
    text-decoration: none;
    color: var(--nav-text-color);
    display: block;
    font-size: 22px;
}

.dropdown-menu > li:hover > a  {
    color: var(--nav-hover-text-color);
}

/* Header */
header {
    grid-area: header;
    background-color: var(--dark-background-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 60px;
    height: 60px;
}

h1 {
    padding-left: 20px;
    justify-self: center;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 30px;
    color: var(--secondary-title-text-color)
}

/* Main */
main {
    background-color: var(--light-background-color);
    grid-area: main;
    display: grid;
    grid-template-rows: auto;
    min-height: 60vh;
    padding: 40px 0;
}

#login {
    justify-self: center;
    align-self: center;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 20px;
    width: 250px;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    margin: 20px 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.form-check {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
}

input {
    line-height: 1.5;
    padding: 10px;
    border: none;
    border-radius: 8px;
}

#login button {
    padding: 8px;
    border-radius: 8px;
    border: none;
    background-color: var(--btn-background-color);
    color: var(--nav-text-color);
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
}

#login button:hover {
    cursor: pointer;
    background-color: var(--btn-hover-background-color);
    color: var(--btn-hover-text-color);
}

/* Footer */
footer {
    grid-area: footer;
    background-color: var(--dark-background-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 20px 0;
    margin-top: auto;
}

footer .footer-nav {
    padding: 20px 0;
}

footer .footer-nav ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

footer .footer-nav a {
    color: var(--secondary-text-color);
    text-decoration: none;
}

footer .footer-nav a:hover {
    color: var(--btn-hover-text-color);
}

footer .social-media {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    gap: 20px;
}

.social-media li i {
    color: var(--secondary-text-color);
    font-size: 32px;
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}

.social-media li i:hover {
    cursor: pointer;
    color: var(--btn-hover-text-color);
    transform: scale(1.2);
}

#top {
    position: fixed;
    bottom: 30px; 
    right: 30px;  
    padding: 10px;
    cursor: pointer;
    display: none; 
    z-index: 1000; 
}   

#top button i {
    color: rgb(38, 36, 31);
    font-size: 32px;
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}

#top button:hover i {
    cursor: pointer;
    color: var(--btn-hover-text-color);
    transform: scale(1.2);
    border-radius: 50%;
    border: 3px solid var(--btn-hover-text-color);
}

/* 600px and up */
@media only screen and (min-width: 600px) {
    body {
        font-size: 16px;
        display: grid;
        grid-template-areas: 
            "nav" 
            "header" 
            "main" 
            "footer" 
        ;
        grid-template-columns: 1fr;
        grid-template-rows: 0px auto 1fr auto;
        min-height: 100vh;
        height: 100%;
    }

    /* Navigation */
    nav {
        grid-area: nav;
    }

    /* Header */
    header {
        grid-area: header;
    }

    /* Main */
    main {
        grid-area: main;
    }

    /* Footer */
    footer {
        grid-area: footer;
    }
}

/* 768px and up */
@media only screen and (min-width: 768px) {
    body {
        font-size: 18px;
        display: grid;
        grid-template-areas: 
            "nav" 
            "header" 
            "main" 
            "footer" 
        ;
        grid-template-columns: 1fr;
        grid-template-rows: 0px auto 1fr auto;
        min-height: 100vh;
        height: 100%;
    }

    /* Navigation */
    nav {
        grid-area: nav;
    }

    /* Header */
    header {
        grid-area: header;
    }

    /* Main */
    main {
        grid-area: main;
    }

    /* Footer */
    footer {
        grid-area: footer;
    }
}

/* (992px and up) */
@media only screen and (min-width: 992px) {
    body {
        font-size: 16px;
        display: grid;
        grid-template-rows: 0px auto 1fr auto;
        min-height: 100vh;
        height: 100%;
    }

    /* Navigation */
    .hamburger {
        display: none;
    }

    .toggle-btn {
        display: none;
    }

    nav {
        grid-area: nav;
        display: flex;
        flex-direction: row;
        justify-content: center;
        height: 88px;
    }

    nav a {
        font-size: 20px;
        padding: 20px;
    }

    .navbar {
        display: flex;
    }

    .main-menu {
        display: flex;
        list-style: none;
        gap: 2em;
        justify-content: space-around;
        align-items: center;
    }

    .main-menu > li {
        position: relative;
    }

    .main-menu li a {
        text-decoration: none;
        color: var(--nav-text-color);
        font-size: 20px;
        padding: 10px;
        display: block;
    }

    .main-menu > li:hover > a {
        color: var(--nav-hover-text-color);
    }

    .main-menu li:focus-within > .sub-menu,
    .main-menu li:hover > .sub-menu {
        display: initial;
    }

    nav a {
        text-decoration: none;
        color: var(--primary-color);
        display: block;
        padding: 20px;
        font-size: 20px;
    }

    .sub-menu {
        display: none;
        position: absolute;
        z-index: 1000;
        top: 51px;
        left: 0;
        background-color: var(--background-color);
        border-radius: 14px;
        box-shadow: 2px 2px 25px rgba(0, 0, 0, 0.2);
        list-style: none;
        padding: 0;
        min-width: 200px;
    }

    .sub-menu > li {
        width: 100%;
        padding: 10px;
    }

    .sub-menu a {
        text-decoration: none;
        color: var(--primary-color);
    }

    .sub-menu >li:hover > a {
        color: var(--hover-text-color);
    }

    /* Header */
    header {
        grid-area: header;
        margin-top: 88px;
    }

    /* Main */
    main {
        grid-area: main;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    form#login { 
        margin: 20px 0;
    }

    .d-nav {
        height: 100%;
    }

    .d-nav ul {
        flex-direction: column;
        justify-content: center;
    } 

    /* Footer */
    footer {
        grid-area: footer;
    }
}

/* 1200px and up) */
@media only screen and (min-width: 1200px) {
    body {
        display: grid;
        grid-template-areas: 
                "nav" 
                "header" 
                "main" 
                "footer";
            grid-template-columns: 1fr;
            grid-template-rows: 0px auto 1fr auto; 
            min-height: 100vh;
    }

    /* Navigation */
    nav {
        grid-area: nav;
    }

    /* Header */
    header {
        grid-area: header;
    }
    
    /* Main */
    main {
        grid-area: main;
        padding: 100px 0;
        min-height: 60vh;
    }

    form#login {
        margin: 20px 0;
    }

    /* Footer */
    footer {
        grid-area: footer;
    }
}