@import url('https://fonts.googleapis.com/css2?family=Teko:wght@300..700&display=swap');

:root {
    --colore: #ffa757;
}

/*ffa757*/
/*fecd3e*/

/*link fluidi*/
html {
    scroll-behavior: smooth;
}

/*link di ritorno*/
svg.bi-chevron-up {
    width: 60%;
    height: 60%;
    stroke: currentColor;
    stroke-width: 1.5px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ritorno {
    position: fixed;
    bottom: 1%;
    right: 1%;
    width: 3%;
    aspect-ratio: 1;
    cursor: pointer;
    z-index: 1999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #EAEAEA;
    background-color: var(--colore);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.ritorno:hover {
    background-color: #EAEAEA;
    color: var(--colore);
}

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

body {
    font-family: 'Helvetica Neue', sans-serif;
    color: #EAEAEA;
    background: #121212;
    line-height: 1.6;
}

h2,
h3 {
    font-family: 'Teko', sans-serif;
    font-weight: 600;
}

p,
a,
input,
textarea,
button {
    font-family: 'Teko', sans-serif;
    font-weight: 400;
}

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

span {
    color: var(--colore);
}

/*testi "speciali"*/
.keyword {
    color: var(--colore);
    font-size: 1.5rem;
}

.hide {
    color: rgba(255, 255, 255, 0.0);
}

.desideri {
    color: var(--colore);
}

del {
    color: #EAEAEA;
    text-decoration-color: var(--colore);
    text-underline-offset: 10px;
}

/*end general style*/


/*header*/
header {
    position: fixed;
    width: 100%;
    background: rgba(26, 26, 26, 0.8);
    color: #EAEAEA;
    padding: 1rem 2rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: var(--colore);
}

/*nav style*/
nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: #EAEAEA;
    font-weight: 500;
    font-size: 1.6rem;
    transition: 0.3s;
}

nav a:hover {
    color: var(--colore);
}

/*end nav style*/

/*end header style*/

/*logo style*/
#logo_sg {
    /*stato iniziale*/
    width: 20%;
    transition: width 0.4s ease;
}

#logo_sg.ridotto {
    /*stato finale quando l'utente scorre la pagina*/
    width: 10%;
}

/*end logo style*/

/*hamburger styles*/
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    position: absolute;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-right: 1rem;
}

.hamburger span {
    display: block;
    height: 3px;
    background: #EAEAEA;
    border-radius: 2px;
    transition: all 0.4s ease;
}

/*permettono la trasformazione da hamburger a X*/
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/*end hamburger style*/

/*hero style*/
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #FAF9F6;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    /* La magia per avere un'immagine fissa su mobile senza bug iOS: 
       clip-path confina il background ::before (che è fixed) all'interno di questa sezione */
    clip-path: inset(0);
}

/* Livello per l'immagine fissa (risolve al 100% il bug di iOS Safari) */
.hero::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../images/hero_background_SCURA.JPG') center/cover no-repeat;
    z-index: -1;
    pointer-events: none;
}

.hero h2 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 2);
    animation: scorriInAlto 1s ease-out forwards;
}

.hero .sottotitolo {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    animation: scorriInAlto 1s ease-out 0.3s both;
}

.hero a {
    display: inline-block;
    animation: scorriInAlto 1s ease-out 0.6s both;
}

@keyframes scorriInAlto {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*end hero style*/

/*btn style*/
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    background: var(--colore);
    color: #FAF9F6;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
}

.btn:hover {
    background: #FAF9F6;
    color: #121212;
    box-shadow: 0 0 15px rgba(255, 167, 87, 0.6);
    /*106,13,173*/
}

/*end btn style*/

/*all section style*/
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: auto;
}

/*all section title style*/
h2.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--colore);
}

/*end all section title style*/

/*end all section style*/

/*about p style*/
.about p {
    max-width: 800px;
    margin: auto;
    font-size: 1.4rem;
    text-align: left;
    color: #EAEAEA;
}

/*end about p style*/

/*portfolio style*/

.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.portfolio-item {
    position: relative;
    border-radius: 10px;
    /* overflow is visible by default to allow box-shadow expansion */
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    max-height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    transition: all 0.4s ease;
    cursor: pointer;
}

.portfolio-overlay {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(26, 26, 26, 0.85);
    color: var(--colore);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    border: 1px solid var(--colore);
    pointer-events: none;
    /* Allows hover and click events to pass to the image */
}

/* Original JS class-based animation restored */
.events.selected {
    transform: scale(1.05);
    filter: brightness(0.4);
    box-shadow: 0 0 10px 6px rgba(255, 167, 87, 0.6);
}

/* Make overlay react when the JS class is added to the image */
.events.selected+.portfolio-overlay {
    background: var(--colore);
    color: #121212;
    transform: scale(1.05);
}



/*popup style (when it is requested)*/
.popup[hidden] {
    display: none !important;
    transition: all 3s ease;
    opacity: 0;
}


.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    display: flex;
    background-color: #1A1A1A;
    border-radius: 16px;
    width: 80%;
    height: 70%;
    box-shadow: 0 0 10px rgba(255, 167, 87, 0.5), 0 0 0 100vmax rgba(0, 0, 0, 0.8);
}


/*close icon style*/
.close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close span {
    display: block;
    height: 3px;
    width: 100%;
    background: #EAEAEA;
    border-radius: 2px;
    position: absolute;
    transition: all 0.3s ease;
}

.close span:nth-child(1) {
    transform: rotate(45deg);
}

.close span:nth-child(2) {
    transform: rotate(-45deg);
}

.close:hover span {
    background: var(--colore);
}

/*end close icon style*/

/* Popup Content Layout */
#popup_content {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.popup-left {
    width: 60%;
    height: 100%;
    background: #000;
    border-radius: 16px 0 0 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px 0 0 16px;
}

.popup-right {
    width: 40%;
    height: 100%;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.popup-right h2 {
    color: var(--colore);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.popup-right p {
    font-size: 1.4rem;
}

/*end popup content layout*/

/* Carousel Styles */
.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    width: 100%;
    height: 100%;
    border-radius: 16px 0 0 16px;
    object-fit: cover;
    display: none;
}

.carousel-slide.active {
    display: block;
    animation: fade 0.5s;
}

@keyframes fade {
    from {
        opacity: .4
    }

    to {
        opacity: 1
    }
}

.carousel-prev,
.carousel-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 16px 16px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
}

.carousel-next {
    right: 0;
    border-radius: 16px 0 0 16px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--colore);
}

/*end carousel style*/

/*end popup style*/

/*end style for events selected*/

/*end portfolio style*/

/*services style*/
.services {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    /*cambiare in center se si vuole centrare*/
    gap: 2rem;
    align-items: start;
}

.service-card {
    flex: 1 1 400px;
    max-width: calc(50% - 1rem);
    background: #1E1E1E;
    border: 1px solid #2A2A2A;
    border-radius: 15px;
    color: #EAEAEA;
    text-align: left;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.service-card.selected {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 6px 25px rgba(255, 167, 87, 0.4);
}

.service-card h3 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--colore);
}

.service-card p {
    font-size: 1.3rem;
}

/*services accordion style*/
.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.service-title-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.service-icon {
    color: var(--colore);
}

.service-header h3 {
    text-align: left;
}

.service-header .chevron {
    color: var(--colore);
    transition: transform 0.4s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.service-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, margin-top 0.5s ease-in-out;
}

.service-card.open .service-content {
    max-height: 2000px;
    opacity: 1;
    margin-top: 1.5rem;
}

.service-card.open .service-header .chevron {
    transform: rotate(180deg);
}

/*end services accordion style*/

/*end services style*/

/*form style*/
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: auto;
}

input,
textarea {
    padding: 1rem;
    border: 1px solid #2A2A2A;
    border-radius: 10px;
    background: #121212;
    color: #EAEAEA;
    transition: border 0.3s;
    resize: none;
}

input:focus,
textarea:focus {
    border: 1px solid var(--colore);
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #777;
}

input,
textarea {
    font-size: 1.4rem;
}

form button {
    align-self: flex-start;
}

.messages {
    width: 100%;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    font-size: 1.4rem;
    background-color: #2A2A2A;
}

.information {
    border: 1px solid #fcba03;
}

.alert {
    border: 1px solid #fa0c0c;
}

.success {
    border: 1px solid #00ff11b2;
}

/*end form style*/

/*footer style*/
.icon {
    margin-left: 5px;
    margin-right: 5px;
}

footer {
    background: #1A1A1A;
    color: #EAEAEA;
    text-align: left;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid #2A2A2A;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

footer p {
    margin: 0.3rem 0;
    font-size: 1.3rem;
}

footer p span {
    color: var(--colore);
}

footer div span a svg {
    color: #EAEAEA;
    transition: fill 0.3s;
}

footer div span a svg:hover {
    color: var(--colore);
}

/*end footer style*/

/*responsive design for mobile devices*/

@media (max-width:768px) {
    .ritorno {
        bottom: 3%;
        right: 3%;
        width: 13%;
        aspect-ratio: 1;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    }


    header {
        position: fixed;
        width: 100%;
        background: rgba(26, 26, 26, 0.8);
        color: #EAEAEA;
        padding: 1rem 2rem;
        z-index: 1000;
        display: flex;
        align-items: center;
    }

    header img {
        margin: auto;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        text-align: center;
        position: absolute;
        left: 0;
        right: 0;
        background: rgba(26, 26, 26, 0.8);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }

    nav ul.show {
        max-height: 500px;
    }

    .hamburger {
        display: flex;
    }

    #logo_sg {
        width: 40%;
        transition: width 0.4s ease;
    }

    #logo_sg.ridotto {
        width: 30%;
    }

    .hero p {
        font-size: 1.6rem;
    }

    .about p {
        font-size: 1.3rem;
    }

    .popup {
        width: 90%;
        height: 90%;
    }

    #popup_content {
        flex-direction: column;
    }

    .popup-left {
        width: 100%;
        height: 40%;
        background: #000;
        border-radius: 16px 16px 0 0;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .popup-left img {
        border-radius: 16px 16px 0 0;
    }

    .popup-right {
        width: 100%;
        height: 60%;
        padding: 20px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        border-radius: 0 0 16px 16px;
    }

    .carousel-slide {
        border-radius: 16px 16px 0 0;
    }

    .carousel-prev {
        border-radius: 0 16px 16px 0;
    }

    .carousel-next {
        border-radius: 16px 0 0 16px;
    }

    .services {
        flex-direction: column;
    }

    .service-card {
        max-width: 100%;
        flex: 0 0 auto;
    }

    .service-card h3 {
        font-size: 1.4rem;
    }

    .service-card p {
        font-size: 1.2rem;
    }

    input,
    textarea {
        font-size: 1.2rem;
    }

    .btn {
        font-size: 1.1rem;
    }

    footer {
        display: flex;
        flex-direction: column;
        gap: 3rem;
    }
}

@media (max-width:768px) and (orientation: landscape) {
    .ritorno {
        bottom: 3%;
        right: 3%;
        width: 7%;
        aspect-ratio: 1;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    }

    #popup_content {
        flex-direction: row;
    }

    .popup-left {
        width: 50%;
        height: 100%;
        border-radius: 16px 0 0 16px;
    }

    .popup-right {
        width: 50%;
        height: 100%;
        border-radius: 0 16px 16px 0;
    }

    .popup-left img {
        border-radius: 16px 0 0 16px;
    }

    .close {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 20px;
        height: 20px;
        cursor: pointer;
        z-index: 2001;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .carousel-slide {
        border-radius: 16px 0 0 16px;
    }
}

@media (min-width:768px) and (orientation: portrait) {

    .ritorno {
        bottom: 3%;
        right: 3%;
        width: 6%;
        aspect-ratio: 1;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    }

    .popup {
        height: 40%;
    }

    #popup_content {
        flex-direction: column;
    }

    .popup-left {
        width: 100%;
        height: 40%;
        background: #000;
        border-radius: 16px 16px 0 0;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .popup-left img {
        border-radius: 16px 16px 0 0;
    }

    .popup-right {
        width: 100%;
        height: 60%;
        padding: 20px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        border-radius: 0 0 16px 16px;
    }

    .carousel-slide {
        border-radius: 16px 16px 0 0;
    }

    .carousel-prev {
        border-radius: 0 16px 16px 0;
    }

    .carousel-next {
        border-radius: 16px 0 0 16px;
    }



}