@font-face {
    font-family: 'RobotoSlab';
    src: url('../font/RobotoSlab.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
}

/* Personalizzazione colore */
*::selection{
    color: white;
    background-color: #a00000;
}

html, body {
    max-width: 100%;
    background: linear-gradient(90deg, rgb(255, 0, 0), #760000);
    background-color: #ca0000;
}

body{
    margin: 0 auto;
    padding: 0;
    /*background-image: url("../img/background.jpg");
    background-repeat: repeat;
    background-size: 85pt;
    */
    font-family: 'RobotoSlab', sans-serif;
}

button, a{
    cursor: pointer;
}

#titolo{
    color: white;
    margin: 20pt 0 20pt 35pt;
    font-size: 50pt;
}

#header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20pt 20pt;
    height: 120pt;
    width: 100%;
    color: white;
    position:sticky;
    z-index: 100;
    top: 0;
    left: 0;
}

#header.scrolled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.9), rgba(118, 0, 0, 0.9));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1; /* Manda lo sfondo sfocato dietro al contenuto dell'header */
}

#logo_container{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    text-decoration: none;
    color: white;
    margin-top: 10pt;
}

#logo_container h1{
    font-family: Arial;
    font-size: 24pt;
    margin: 0;
}

#logo_container img{
    height: 70pt;
    width: auto;
    margin-right: 10pt;

}

#flag-button_container{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20pt;
}

#lang_toggle{
    height: auto;
    width: 25pt;
    cursor: pointer;
    transition: all 0.3s ease;
}

#lang_toggle:hover{
    transform: scale(1.1);
}

#lang_toggle:active{
    transform: scale(0.95);
}

#menu_toggle {
    display: none;
    font-size: 24pt;
    cursor: pointer;
    display: block;
}

#button_container_top{
    display: flex;
    flex-direction: column;
    gap: 15pt;
    margin-bottom: 30pt;
}

#button_container button{
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: white;
    width: 100%;
    height: 35pt;
    border: none;
    padding: 10pt 20pt;
    border-radius: 15px;
    font-size: 14pt;
    border: solid 2px rgba(0, 0, 0, 0);
    box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, .5);
    transition: all 0.3s ease;
}

#button_container button:hover{
    background-color: rgb(187, 0, 0);
    color: white;
    border: solid 2px #ffffff;
    transform: scale(1.1);
    border-radius: 25px;
    box-shadow: 1px 1px 15px 1px rgba(255, 255, 255, 0.5);
}

#login-btn{
    width: 50% !important;
}

#button_container #login-btn{
    border: none;
    margin: 20pt 0;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: none;
    color: white;
    margin-bottom: 40pt;
    height: 20pt;
}

#button_container #login-btn:hover{
    color: #a50000;
    background-color: white;
    box-shadow: 1px 1px 10px 1px rgba(255, 255, 255, 0.5);
}

#button_container #here{
    color: #a50000;
    font-weight: 600;
    background-color: rgba(255, 255, 255);
    box-shadow: 1px 1px 15px 1px rgba(255, 255, 255, 0.5);
}

#button_container #here:hover{
    background-color: #a50000;
    color: white;
}








#footer{
    color: white;
    text-align: left;
    padding: 15pt;
}

#footer a{
    color: white;
}

#footer_content{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
}

#contatti a{
    color: white;
}

#social_media{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    align-self: flex-end;
}

#social_media img{
    height: 23pt;
    width: 23pt;
    margin-right: 10pt;
    border-radius: 30px;
    transition: all 0.2s ease;
}

#instagram{
    background-image: url("../img/social/instagram.jpg");
    background-size: cover;
    background-position: center;
}

#facebook{
    background-image: url("../img/social/facebook.jpg");
    background-size: cover;
    background-position: center;
}

#instagram:hover, #facebook:hover{
    transform: scale(1.04);
    box-shadow: 1px 1px 15px 5px rgba(0, 0, 0, .5);
    
}

#instagram:hover{
    background-image: url("../img/social/instagram_hover.jpg");
}

#facebook:hover{
    background-image: url("../img/social/facebook_hover.jpg");
}



#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 5;
}

#overlay.active {
    display: block;
}

#button_container {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 250pt;
    background: #ffffff;
    flex-direction: column;
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding-top: 60pt;
    gap: 25pt;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: all 0.3s ease;
}

#button_container.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0);
    background-image: url("../img/background.jpg");
    background-repeat: no-repeat;
    background-size: 800pt;
    background-position: 20% 40%;
}

button:active{
    transform: scale(1) !important;
}

@media screen and (max-width: 1000px) {
/* ===================== MOBILE ===================== */

    #header {
        flex-direction: row;
        height: auto;
        min-height: 200pt;
        gap: 15pt;
        text-align: center;
        padding: 15pt;
    }

    #logo_container {
        flex-direction: row;
        gap: 10pt;
    }

    #logo_container img {
        height: 50pt;
        margin-right: 0;
    }

    #logo_container h1 {
        font-size: 18pt;
    }

    #button_container{
        width: min(76vw, 260px);
        max-width: 260px;
        padding: 20pt;
        padding-top: 50pt;
        gap: 20pt;
    }

    #button_container_top{
        display: flex;
        flex-direction: column;
        gap: 5pt;
        margin-bottom: 30pt;
    }

    #button_container button {
        width: 100%;
        max-width: 280pt;
        height: 35pt;
        font-size: 12pt;
    }

    #button_container button:hover {
        transform: none;
    }

    #menu_toggle {
        display: block;
        font-size: 24pt;
        cursor: pointer;
        color: white;
    }

    #footer_content {
        flex-direction: column;
        gap: 10pt;
        text-align: center;
    }

    #social_media {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        margin-top: 10pt;
        align-self: center;
    }

    #footer{
        text-align: center;
    }
}

@media screen and (max-width: 768px) {
    html,
    body {
        width: 100%;
        overflow-x: clip;
    }

    #header {
        min-height: 88px;
        height: auto;
        padding: 12px 14px;
        gap: 8px;
    }

    #logo_container {
        min-width: 0;
        justify-content: flex-start;
        gap: 8px;
    }

    #logo_container img {
        flex: 0 0 auto;
        height: clamp(36px, 11vw, 48px);
    }

    #logo_container h1 {
        max-width: 44vw;
        font-size: clamp(15px, 3.2vw, 18px);
        line-height: 1.15;
        text-align: left;
    }

    #flag-button_container {
        flex: 0 0 auto;
        gap: 10px;
    }

    #lang_toggle {
        width: 24px;
        min-width: 24px;
    }

    #menu_toggle {
        display: grid;
        width: 44px;
        height: 44px;
        place-items: center;
        font-size: 25px;
        line-height: 1;
    }

    #button_container {
        width: min(76vw, 270px);
        max-width: 270px;
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: max(64px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
        gap: 20px;
        justify-content: flex-start;
    }

    #button_container_top {
        width: 100%;
        gap: 8px;
        margin-bottom: 0;
    }

    #button_container button {
        min-height: 44px;
        height: auto;
        padding: 10px 12px;
        font-size: 15px;
        line-height: 1.25;
    }

    #button_container #login-btn {
        margin: auto 0 0;
        flex: 0 0 auto;
    }

    #main {
        max-width: 100%;
        margin-top: 16px;
    }

    #titolo {
        margin: 18px 16px;
        font-size: clamp(28px, 8vw, 42px);
        line-height: 1.12;
        text-align: center;
        overflow-wrap: anywhere;
    }

    #footer {
        padding: 22px 16px max(22px, env(safe-area-inset-bottom));
        font-size: 14px;
        line-height: 1.5;
    }

    #footer p {
        margin: 5px 0;
        overflow-wrap: anywhere;
    }

    #footer_content {
        gap: 16px;
    }

    #social_media {
        gap: 14px;
    }

    #social_media img {
        width: 32px;
        height: 32px;
        margin: 0;
    }
}

@media screen and (min-width: 769px) and (max-width: 1000px) {
    #header {
        min-height: 112px;
        padding: 18px 24px;
    }

    #button_container {
        width: min(42vw, 320px);
        max-width: 320px;
        justify-content: flex-start;
    }

    #button_container #login-btn {
        margin: auto 0 12px;
        flex: 0 0 auto;
    }
}
