/* @import "/bootstrap-icons/font/bootstrap-icons.css"; */

/* utils */

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

ul {
    list-style: none;
    margin: 0;
}

.custom-container {
    width: 98%;
    margin: 0 auto;
}

.custom-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.image-h-100 {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: center;
}

.image-h-80 {
    width: 100%;
    height: 50vh;
    object-fit: cover;
    object-position: center;

    @media(min-width:768px) {
        height: 80vh;
    }
}

.tag {
    border-radius: 50px;
    font-weight: bold;
    padding: 0.5rem 1rem;
    font-size: 0.7rem;

    @media(min-width:1200px) {
        font-size: 1rem;
    }
}

.external-link {
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

p {
    font-size: 1.125rem;
}

.mobile-none {
    @media(max-width:720px) {
        display: none;
    }
}

#backToTopBtn {
    position: fixed;
    transform: translateX(-50%);
    left: 93%;
    top: 93%;
    font-size: 3rem;

    @media(min-width:1140px) {
        left: 97%;
    }
}

.importantLink:hover {
    scale: 1.1;
    transition: ease-in 200ms;
}

.filters-border {
    border-bottom: 1px solid black;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;

    @media(min-width:768px) {
        border-bottom: none;
        border-right: 1px solid black;
        padding-bottom: 0;
        margin-bottom: 0;
    }
}

summary::marker {
    font-size: 0rem;
}

details[open] summary .arrow-details {
    transform: rotate(90deg);
}

.arrow-details-container {
    background-color: #157768;
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: auto;
}

.arrow-details {
    display: inline-block;
    font-size: 2rem;
    transition: transform 0.2s ease;
}



/*header*/

header {
    display: flex;
    position: fixed;
    z-index: 500;
    right: 0;
    left: 0;
    margin: 1rem auto;
    border-radius: 50px;
    height: 50px;
    width: 98%;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;

    img {
        height: 35px;
    }

    #nav-xl {
        display: none;
    }

    @media(min-width:1400px) {
        height: 75px;
        padding: 0rem 3rem;

        img {
            height: 75px;
        }

        #nav-xl {
            display: flex;
        }

        #expand-navbar {
            display: none;
        }

        #nav-sm {
            display: none;
        }
    }
}

.importantLink {
    border-radius: 50px;
    padding: 0.5rem;
    margin: auto auto;
    font-size: 0.8rem;

    @media(min-width: 1400px) {
        margin: auto auto;
        font-size: 1.25rem;
    }
}

#nav-sm {
    position: absolute;
    width: 0;
    height: 100vh;
    border-bottom-right-radius: 50px;
    border-top-right-radius: 50px;
    top: -1rem;
    left: -1.2rem;
    z-index: 2000;
    overflow: hidden;
    overflow-y: hidden;
    transition: width 320ms ease;
}

#nav-sm.open {
    width: 95%;

    @media(min-width:768px) {
        width: 50%;
    }
}

#nav-sm-wrap {
    width: 100vw;
    height: 100vh;
    top: -1rem;
    position: absolute;
    background-color: #000;
    opacity: 0;
    visibility: hidden;
    z-index: 1999;
    transition: opacity 320ms ease, visibility 0s linear 320ms;
}

#nav-sm-wrap.open {
    opacity: 0.7;
    visibility: visible;
    transition-delay: 0s;
}


.collapse-navbar {
    position: absolute;
    top: 3%;
    left: 85%;
    background-color: transparent;
    outline: none;
    border: none;
}

.expand-navbar {
    background-color: transparent;
    outline: none;
    border: none;
}

/*hero section*/
.hero-section-seo-friendly {
    position: absolute;
    top: 25%;
    left: 0%;
    font-size: 3rem;
    padding: 2rem;
    border-radius: 50px;

    .hero-big-text {
        @media(min-width:768px) {
            font-size: 4rem;
        }

        @media(min-width:1200px) {
            font-size: 4rem;
        }

        @media(min-width: 1400px) {
            font-size: 6rem;
        }
    }


    @media(min-width:768px) {
        top: 35%;
        left: 5%;
        font-size: 4rem;
    }

    @media(min-width:1200px) {
        font-size: 4rem;
    }

    @media(min-width: 1400px) {
        top: 30%;
        font-size: 6rem;
    }

    div[hugo-ref=links] {
        &:hover {
            scale: 1.1;
            transition: ease-in 200ms;
        }
    }
}

.hero-text {
    position: absolute;
    top: 25%;
    left: 0%;
    font-size: 3rem;
    padding: 2rem;
    border-radius: 50px;
    max-width: 90%;

    @media(min-width:768px) {
        top: 35%;
        left: 5%;
        font-size: 4rem;
    }

    @media(min-width:1200px) {
        font-size: 4rem;
    }

    @media(min-width: 1400px) {
        top: 30%;
        max-width: 50vw;
        font-size: 6rem;
    }

    div[hugo-ref=links] {
        &:hover {
            scale: 1.1;
            transition: ease-in 200ms;
        }
    }
}

.hero-text-video {
    position: absolute;
    top: 85%;
    left: 5%;
    font-size: 1.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;

    @media(min-width:768px) {
        font-size: 2rem;
    }

    @media(min-width:1200px) {
        font-size: 2.5rem;
    }

    @media(min-width: 1400px) {
        top: 85%;
        max-width: 40vw;
        font-size: 3rem;
    }
}

.boldline {
    font-weight: 600;
}

.hero-carousel {
    display: none;
}

.hero-carousel.active {
    display: inline-block;
}


/* PHOTOGALLERY */

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 450px;
    gap: 16px;
    grid-auto-flow: dense;
}

.tile {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-card {
    height: 50vh;
    cursor: pointer;

    div {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        height: 100%;
        border-radius: 50px;
        color: #ffffff;
        background-color: #157768;

        h2 {
            padding-bottom: 1rem;
        }

        img {
            object-fit: cover;
            border-radius: 50px;
            border-bottom-left-radius: 0px;
            border-bottom-right-radius: 0px;
            height: 85%;
        }
    }

    &:hover {
        scale: 1.001;
        filter: brightness(75%);
        transition: ease-in 200ms;
    }
}

@media (max-width: 1000px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 300px;
    }
}

@media (max-width: 650px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
    }
}

#photogalleryBg {
    background-color: #000000;
    opacity: 95%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999999;
}

#photogalleryImg {
    position: absolute;
    z-index: 9999999999;
    transform: translate(-50%, -50%);
    left: 50%;
    top: 50%;
    border-radius: 50px;
    max-width: 80vw;
    max-height: 90vh;
}

#photogalleryCloseBtn {
    position: absolute;
    z-index: 9999999999;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2.5rem;
    top: 20%;
    left: 90%;
    cursor: pointer;

    @media(min-width: 992px) {
        left: 95%;
        top: 10%;
        font-size: 3.5rem;
    }
}

#photogalleryNextBtn,
#photogalleryPrevBtn {
    position: absolute;
    z-index: 9999999999;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2.5rem;
    cursor: pointer;

    @media(min-width: 992px) {
        font-size: 3.5rem;
    }
}

#photogalleryPrevBtn {
    left: 5%;
    top: 50%;
}

#photogalleryNextBtn {
    left: 95%;
    top: 50%;
}

/*CARDS*/

.custom-card {
    padding: 1rem;
    border-radius: 50px;
    width: 375px;
    height: 475px;

    @media(min-width: 1200px) {
        height: 625px;
        width: 560px;
    }

    .custom-card-header {
        text-align: center;
        height: 60%;

        img {
            width: 100%;
            height: 100%;
            border-radius: 50px;
            object-fit: cover;
        }
    }

    .custom-card-body {
        max-height: 125px;

        span {
            font-weight: bold;
            padding: 0.5rem 1rem;
            font-size: 0.7rem;

            @media(min-width:1200px) {
                font-size: 1rem;
            }
        }

        .tags {
            span {
                border-radius: 50px;
            }
        }

        p {
            max-height: fit-content;
            font-size: 1.6rem;
            font-weight: bold;

            @media(min-width:1200px) {
                font-size: 1.8rem;
            }
        }
    }

    .custom-card-footer {
        margin-top: auto;

        a:hover {
            scale: 1.2;
            transition: ease-in 200ms;
        }
    }
}

/* NEWSLETTER */
#newsletter {
    #newsletter-logo {
        padding: 1rem 0;
        width: 50%;
    }

    form {

        input[type=text],
        select,
        textarea {
            padding: 1.5rem;
            border-radius: 25px;
            border: none;
            background-color: #deefec;
            width: 100%;
        }

        .select-wrapper {
            position: relative;
            display: inline-block;

            select {
                padding-right: 2.5rem;
                -webkit-appearance: none;
                -moz-appearance: none;
                appearance: none;
            }

            .bi-chevron-down {
                position: absolute;
                right: 1rem;
                top: 50%;
                transform: translateY(-50%);
                pointer-events: none;
                font-size: 1.2rem;
                display: none;
            }
        }

        p {
            font-size: 0.8rem;
            margin: 0;
        }

        button[type=submit] {
            margin: 1rem 0 3rem 0;
            padding: 1rem 2.5rem;
            font-weight: bold;
            border-radius: 50px;
            background-color: #157768;
            color: white;
            border: none;
            font-size: 1.2rem;

            @media(min-width: 992px) {
                font-size: 1.4rem;
            }
        }
    }
}

/*FOOTER*/

footer {
    background-color: #f3f3f3;
    padding: 3rem 0 0 0;

    .upper-footer {
        background-color: #fff;
        margin: 0 2.5rem;
        padding: 2rem;
        border-radius: 50px;
        height: auto;

        .footer-col-header {
            margin-bottom: 3rem;

            @media(min-width:1140px) {
                text-align: center;

            }

            h3 {
                margin-top: 0.8rem;
            }

            .logo {
                max-height: 80px;
                max-width: 100%;
                text-align: start;
            }
        }

        p {
            margin-bottom: 0.3rem;
        }
    }
}

/*ARTICOLO*/
#articolo {
    margin-top: 5rem;
    padding-top: 5rem;
}

#post-content p {
    @media(min-width: 992px) {
        font-size: 1.3rem;
    }
}

.post-img-container {
    width: 100%;

    img {
        @media (min-width: 1400px) {
            max-height: 100vh;
            width: auto;
            min-width: 50%;
            object-fit: contain;
        }
    }
}

/* INFO BOX */
.info-box-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.left-box {
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;

    @media(min-width:768px) {
        border-top-right-radius: 0px;
        border-bottom-right-radius: 0px;
        border-bottom-left-radius: 50px;
    }
}

.left-box.image {
    height: 300px;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 50px;
    border-bottom-left-radius: 50px;

    @media(min-width:768px) {
        border-top-right-radius: 0px;
        border-bottom-right-radius: 0px;
        border-top-left-radius: 50px;
        border-top-right-radius: 0px;
        height: 450px;
    }
}

.right-box {
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;

    @media(min-width:768px) {
        border-top-right-radius: 50px;
        border-bottom-right-radius: 50px;
        border-top-left-radius: 0px;
        border-bottom-left-radius: 0px;
    }
}

.right-box.image {
    height: 300px;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 50px;
    border-bottom-left-radius: 50px;

    @media(min-width:768px) {
        height: 450px;
        border-top-right-radius: 50px;
        border-bottom-right-radius: 50px;
        border-top-left-radius: 0px;
        border-bottom-left-radius: 0px;
    }
}


/* INFO BOX LARGE */
.infobox-large-img-container,
.infobox-large-text-container {
    min-height: 70vh;

    @media(min-width:992px) {
        height: 80vh;
    }
}

.infobox-large-text-container {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;

    @media(min-width:992px) {
        border-top-right-radius: 50px;
        border-bottom-right-radius: 50px;
        border-top-left-radius: 0px;
    }
}

.infobox-large-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-bottom-right-radius: 50px;
    border-bottom-left-radius: 50px;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;

    @media(min-width:992px) {
        border-top-left-radius: 50px;
        border-bottom-left-radius: 50px
    }
}

.infobox-large-img-container {
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;

    @media(min-width:992px) {
        border-top-left-radius: 50px;
        border-bottom-right-radius: 0px;
    }
}

/* SPLIT PAGE */

#split-wrap {
    min-height: 100vh;
}

.img-split {
    position: sticky;
    top: 0;
    overflow: hidden;

    img {
        height: 25vh;

        @media(min-width:768px) {
            height: 100vh;
        }
    }
}

.text-split {
    height: 100%;

    @media(min-width:768px) {
        max-height: 100vh;
        overflow-y: auto;
    }
}

.text-split::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.split-heading {
    position: absolute;
    top: 40%;
    left: 25%;
    font-weight: bold;
}

.split-text-wrap {
    padding: 1rem;
    border-radius: 50px;
}


/*Documents*/

.documents-section {
    padding-bottom: 3rem;
    min-height: 100vh;
}

.doc-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Sidebar Folders */
.doc-folders ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.doc-folder-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    text-align: left;
    transition: all 0.3s ease;
    width: 100%;
}

.doc-folder-btn:hover {
    background: #e9ecef;
    border-color: #157768;
    transform: translateX(4px);
}

.doc-folder-btn.active {
    background: #157768;
    color: #fff;
    border-color: #157768;
}

/* Subfolder buttons */
.subfolder-btn {
    background: #fff;
    border: 1px solid #dee2e6;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.subfolder-btn:hover {
    background: #f8f9fa;
}

.subfolder-btn.active {
    background: #157768;
    color: #fff;
}

/* Main content area */
.doc-files {
    display: flex;
    flex-direction: column;
}

.doc-file-list {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.doc-file-list.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.doc-file-list h3 {
    font-size: 1.5rem;
    color: #157768;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #157768;
    padding-bottom: 0.75rem;
}

.subfolder-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.folder-files {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.folder-files>div {
    padding: 1rem;
    background: #f8f9fa;
    border-left: 4px solid #157768;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.folder-files>div:hover {
    background: #e8f4f1;
    transform: translateX(4px);
}

.folder-files a {
    color: #157768;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.folder-files a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .doc-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .doc-folders ul {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .doc-folder-btn {
        flex: 1;
        min-width: 150px;
    }

    .doc-file-list h3 {
        font-size: 1.25rem;
    }

    .subfolder-list {
        flex-direction: column;
    }

    .subfolder-btn {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .doc-folder-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .folder-files>div {
        padding: 0.75rem;
    }

    .doc-file-list h3 {
        font-size: 1.1rem;
    }
}

/* Documents search UI enhancements */
.documents-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.document-back-btn {
    background: #157768;
    color: #fff;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.document-back-btn:hover {
    background: #125c53;
}

#document-search {
    padding: 0.6rem 0.75rem;
    border: 1px solid #e3e6e8;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: box-shadow .15s ease, border-color .15s ease;
}

#document-search:focus {
    outline: none;
    border-color: #157768;
    box-shadow: 0 0 0 3px rgba(21, 119, 104, 0.08);
}

#document-search-clear {
    background: #fff;
    border: 1px solid #e3e6e8;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

#document-search-clear:hover {
    background: #f6f8f7;
}

.doc-file-item {
    padding: 0.9rem;
    background: #ffffff;
    border-left: 4px solid transparent;
    border-radius: 6px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.doc-file-item a {
    color: #0f6b5f;
}

.doc-file-item:hover {
    transform: translateX(6px);
    box-shadow: 0 6px 18px rgba(19, 45, 33, 0.06);
    border-left-color: #157768;
}

.no-results-message {
    color: #666;
    font-style: italic;
    padding: 0.75rem;
}

@media (max-width: 768px) {
    .documents-search {
        flex-direction: column;
        align-items: stretch;
    }

    #document-search-clear {
        width: 40px;
        align-self: flex-end;
    }
}

.reset {
    background-color: red;
    color: white;
    border: none;

    &:hover {
        background-color: darkred;
        color: white;
        transition: ease-in 200ms;
    }
}