/* ==========================================================================
   1. VARIABILI GLOBALI E RESET
   ========================================================================== */
:root {
    --primary-color: rgb(70, 71, 70);
    --grigio-logo: rgb(144,146,149);
    --primary-dark: rgb(51, 51, 51);
    --accent-color: rgb(245, 95, 14);
    -prova: linear-gradient(to bottom, rgba(251, 142, 2), rgba(245, 95, 14));
    --c1: rgb(251, 142, 2);
    --c2: rgb(245, 95, 14);
    --accent-hover: #c53535;
    --bg-light: #f7fafc;
    --bg-card: rgb(255, 255, 255);
    --bg-overlay: rgba(255, 255, 255, 0.1);
    --bg-overlay-dark: rgba(119, 136, 153, 0.4);
    --text-main: #2d3748;
    --text-muted: #718096;
    --text-light: #e2e8f0;
    --border-color: #e2e8f0;
    --border-dark: #cbd5e0;
    --gold: #ffd700;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --transition-smooth: all 0.3s ease;
    font-size: medium;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent !important;
}

body {
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overscroll-behavior-y:none;
    position: relative;
}

/* ==========================================================================
   2. LAYOUT STRUTTURALE E MACRO-AREE
   ========================================================================== */
main {
    min-height: calc(100vh - 200px);
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 40px;
    border-bottom: 4px solid var(--accent-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
    transition-behavior: allow-discrete;
}

#retractheader{
    position: absolute;
    right: 20px;
    bottom: -50px;
}

#retractheader>div{
    transition: transform 0.4s ease;
    font-weight: 600;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 15px solid var(--bg-card);
}

header.closed{
    transform: translateY(-100%);
    #retractheader>div{
        transform: rotate(-180deg);
    }
}



#home,
#profilo,
#applicazioni,
#servizi,
#esempi,
#eventi,
#contatti iframe {
    width: 100%;
}

iframe {
    height: 100%;
}

.par {
    margin-bottom: 8vh;
    width: 100%;
    position: relative;
    z-index: 10;
    padding: 3vh 5vw;
    /*padding: 40px calc((100% - 2000px) / 2);*/
}

.parVariant {
    z-index: 9 !important;
}

footer {
    width: 100% !important;
    padding: 7vh 4vw;
    background-color: var(--primary-dark);
    color: var(--text-light);
    border-top: 4px solid var(--accent-color);
    z-index: 100;
    bottom: 0;
    position: absoluteW;
}

footer strong {
    color: var(--bg-card);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 12px;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

footer .grid {
    gap: 30px;
}

/* ==========================================================================
   3. GRID SYSTEM
   ========================================================================== */

/* ==========================================================================
   4. COMPONENTI UI INTERATTIVI (BOTTONI, DROPDOWN, CAROUSEL)
   ========================================================================== */
#logo {
    height: 10vh;
    max-height: 100px;
    object-fit: contain;
}

#logo:hover{
    cursor: pointer;
}

#buttoncontainer {
    width: fit-content;
}

#scroll-ind-c {
    width: fit-content;
    position: relative;
}

#scroll-ind-l {
    display: none;
    position: absolute;
    left: -20px;
    top: 15%;
    color: white;
}

#scroll-ind-r {
    display: none;
    position: absolute;
    right: -20px;
    top: 15%;
    color: white;
}

#divimg,
#divbtn {
    display: flex;
    align-items: center;
    gap: 50px;
}

#divimg {
    transition: max-height 0.3s ease-out;
    max-height: 20vh;
}

#divbtn {
    gap: 15px;
}

button {
    white-space: nowrap;
    padding: 8px 18px;
    font-family: var(--font-family);
    border-radius: 5px;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    background-color: var(--accent-color);
    color: var(--bg-card);
    transition: var(--transition-smooth);
    min-width: fit-content;
    min-width: fit-content;
    min-height: fit-content;
}

main button {
    height: 4vh;
    width: 60%;
}

button:hover {
    cursor: pointer;
    background-color: #b74304;
    border: 1px solid #7d7e7c;
}

.servizihome {
    width: 100%;
    height: 100%;
    padding: 8px 18px;
    min-width: fit-content;
    border: none;
    overflow: hidden;
    position: relative;
    display: block;
    text-overflow: ellipsis;
    white-space: normal;
}

.servizihome:hover {
    border: none;

    .servizihome-cover {
        transform: translateX(-15%) translateY(-30%) rotate(20deg);
    }
}

.servizihome-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    height: 1000px;
    width: 200%;
    min-width: 500px;
    background-color: var(--primary-color);
    top: -150%;
    left: 0;
    transform: translateX(100%) translateY(-30%) rotate(20deg);
    transition: transform 0.4s ease;
    z-index: 1;
}

.servizihome h4 {
    position: relative;
    z-index: 2;
}

#divbtn>button {
    background-color: transparent;
    font-weight: 600;
    font-size: 0.95rem;
}

#divbtn>button:hover {
    background-color: var(--bg-overlay);
    border-color: rgba(255, 255, 255, 0.3);
}

#divbtn>button.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--bg-card);
}

.simbol-character {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    color: var(--bg-card);
    background-color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

/* ==========================================================================
   6. ELEMENTI TIPOGRAFICI E TEXT STYLING
   ========================================================================== */
.titolo,
.sub-titolo {
    height: 100vh;
    background-color: var(--primary-color);
    color: var(--bg-card);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    background-attachment: scroll;
    background-position: center;
    box-shadow: 0px 3px 10px rgba(70, 71, 70, 0.8);
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

#myVideo {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
    z-index: 1;
}

.video-cover {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(to bottom, rgba(70, 71, 70, 0.8), rgba(70, 71, 70, 0.95));
    z-index: 2;
}

.title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5vh;
    z-index: 3;
}

.titolo h1,
.sub-titolo h2 {
    font-size: 3rem;
    letter-spacing: 1px;
}

.titolo p,
.sub-titolo p {
    max-width: 700px;
    color: var(--text-light);
    font-size: 1.1rem;
}



.text-center {
    text-align: center;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-left: 10%;
    padding-right: 10%;
}

.text-center h2,
.text-center h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 2rem;
}

#cookieContainer {
    position: sticky;
    bottom: 0vh;
    height: 100vh;
    width: 100%;
    margin-top: -100vh;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-color: rgb(26, 32, 44, 0.8);
}

.cookie-banner {
    z-index: 9999;
    width: 100%;
    min-width: fit-content;
    background-color: #f7fafc;
    padding: 1.5vh;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    font-size: 2vh !important;
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
}

.cookie-buttons {
    display: flex;
    gap: 1.5vw;
}

.cookie-btn {
    color: #f7fafc;
    background-color: #e25304;
    height: 5vh;
    width: fit-content;
    padding: 0;
    padding-left: 2vw;
    padding-right: 2vw;
    font-size: 2vh !important;
    transition: none !important;
    border-radius: 2vh;
}

.cookie-btn:hover {
    background-color: #b74304;
    color: #dadbdc;
}


/* Dropdown Menu e Lingua */
#language {
    appearance: none;
    width: fit-content;
    min-width: 100px;
    font-family: var(--font-family, sans-serif);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--bg-card);
    background-color: var(--primary-color);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#languageTxt {
    display: flex;
    justify-content: start;
    align-items: center;
}

#languageTxt img {
    height: 3vh;
    min-height: 25px;
    min-width: 40px;
    border-radius: 3px;
    border: none;
    overflow: hidden;
    object-fit: cover;
}

#language>.drop-menu {
    padding: 7%;
}

#language .drop-menu:hover,
#language .drop-menu:focus {
    background-color: var(--bg-overlay);
    border-color: rgba(255, 255, 255, 0.3);
}

#language .drop-content.open {
    display: flex;
    flex-direction: column;
    background-color: var(--primary-color);
}

#language .drop-content button {
    white-space: nowrap;
    padding: 8px 18px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--bg-card);
    background-color: transparent;
    border-radius: 5px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
}

#language .drop-content button:hover {
    background-color: var(--bg-overlay);
    border-color: rgba(255, 255, 255, 0.3);
}

.drop-container {
    position: relative;
}

.drop-menu {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    height: fit-content;
    border-radius: 8px;

    z-index: 20;
}

.drop-menu:hover,
.drop-menu:focus {
    background-color: var(--bg-overlay-dark) !important;
    cursor: pointer;
}

.drop-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 0;
    border-radius: 8px;
    border: none;
    background-color: var(--bg-card);
    z-index: inherit;
    transition: all 0.2s ease-in-out;
    display: none;
    overflow: hidden;
    transition-behavior: allow-discrete;
}

.drop-content.open {
    transition-behavior: allow-discrete;
    transition: display 0.2s, all 0.2s ease-in-out;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    height: fit-content;
    display: block;
    z-index: 999;
    animation: fadein 0.2s ease-out;
}

#contact-form,
#form-submit {
    display: flex;
    flex-direction: column;
    gap: 3.5vh;
}

#contact-form {
    padding-left: 5%;
    padding-right: 5%;
}

.checkbox {
    display: flex;
    gap: 1vw;
    align-items: center;
}

#contact-form .grid {
    padding: 0;
    margin: 0;
    width: 100%;
    gap: 3.5vh;
}

#form-grid {
    padding: 0;
    margin: 0;
    width: 100%;
}

.text-input {
    display: flex;
    flex-direction: column;
    gap: 2vh;
}


.span-2 {
    grid-column-end: span 2;
}

.text-form {
    padding: 10px;
    background-color: var(--bg-light);
    border: transparent solid 1px;
    border-bottom: var(--accent-color) solid 1px;
    color: var(--text-main);
    transition: all 0.2s ease-in;
    font-family: var(--font-family);
    font-size: medium;
}

.text-form:hover {
    background-color: var(--bg-card);
    transform: scale(1.01);
}

.text-form:focus,
.text-form:active {
    transform: scale(1.0);
    outline: none;
    transition: all 0.2s ease-in;
    background-color: var(--border-color);
    border: var(--border-color) solid 1px;
}

input[type="checkbox"] {
    accent-color: #3498db;
    /* Cambia il colore del quadratino quando è spuntato */
    transform: scale(1.5);
    /* Opzionale: per ingrandire la checkbox */
    cursor: pointer;
    align-self: center;
    /* or baseline */
}


form .grid.grid2 {
    height: 100%;
}

#message {
    resize: none;
    height: 300px;
}

#btn-form {
    transition: all 0.2s ease-in;
    width: fit-content;
    border-radius: 8px;
    padding: 10px;
    background-color: var(--accent-hover);
    border: none;
    color: var(--bg-card);
}

#btn-form:hover {
    background-color: var(--text-muted);
    transform: scale(1.02);
    cursor: pointer;
}

#btn-form:active {
    transition: all 0.1s ease-in;
    background-color: var(--border-dark);
}

.checkbox-text {
    line-height: 1;
}

.privacy-text {
    text-decoration: underline;
}

.privacy-text:hover {
    color: var(--text-muted);
    cursor: pointer;
}

.grid {
    width: 100%;
    display: grid;
    gap: 1.5vh;
}

@media (max-width: 768px) {
    #logo{
        max-height: 60px;
    }
    .grid2,
    .grid3,
    .grid4 {
        grid-template-columns: auto;
    }
}

@media (pointer:coarse) {
    #buttoncontainer {
        scrollbar-color: transparent transparent !important;
    }    
    html{
        overscroll-behavior-y: auto !important;
    }
}

@media (min-width: 768px) {

    .grid2,
    .grid3,
    .grid4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 425px) {

    :root,
    input,
    textarea,
    .servizihome {
        font-size: x-small !important;
    }
}

@media (min-width: 768px) {

    :root,
    input,
    textarea,
    .servizihome {
        font-size: small !important;
    }
}

@media (min-width: 1440px) {

    :root,
    input,
    textarea,
    .servizihome {
        font-size: large !important;
    }

    #language {
        width: 8vw;
        max-width: 150px;
    }
}

@media (min-width: 2000px) {

    :root,
    input,
    textarea,
    .servizihome {
        font-size: x-large !important;
    }

    header {
        padding: 1% 2%;
    }

    input[type="checkbox"] {
        transform: scale(2.5);
    }
}

@media (min-width: 2400px) {

    #Main,
    input,
    textarea,
    .servizihome {
        font-size: xx-large !important;
    }
}

@media (max-width: 768px) {
    #buttoncontainer {
        overflow: hidden;
        overflow-x: scroll;
        scrollbar-color: #888 transparent;
        scrollbar-width: thin;
        width: 100%;
    }

    #scroll-ind-c {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #scroll-ind-r {
        display: inline;
    }

    #scroll-ind-l {
        display: inline;
    }

    #buttoncontainer::-webkit-scrollbar:hover {
        cursor: pointer;
    }

    .pointed-text-double .pointer {
        display: none !important;
    }

    .pointed-text-double {
        display: flex !important;
        flex-direction: column !important;
        align-items: start !important;
    }

    .checkbox {
        gap: 8px;
    }
}

@media (max-width: 600px) {
    .no-img {
        display: none;
    }

    .span-2 {
        grid-column-end: span 1 !important;
    }
}

.card {
    background-color: var(--bg-card);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth) !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 10;
}

.card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.card p {
    color: var(--text-muted);
}

#map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    overflow: hidden;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    position: relative;
}

#map {
    height: 50vh;
}

#map:hover {
    cursor: pointer;

    .popup-box {
        display: block;
    }
}

.popup-box {
    display: none;
    position: absolute;
    bottom: 0;
    /* Places the popup above the text */
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 8px;
    border-radius: 5px;
    width: 150px;
    text-align: center;
}

.images {
    display: flex;
    width: 100%;
}

.par.imgs {
    padding: 0;
}

.img-card {
    background-color: var(--bg-card);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    z-index: 10;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(70, 71, 70, 0.8)),url("../img/placeholder.jpg");
    height: 50vh;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    /* Manteniamo questo fondamentale per il posizionamento dell'overlay */
    overflow: hidden;

    /* Applichiamo il colore del testo bianco per farlo risaltare sull'oscuramento */
    color: #ffffff;
}

/* 1. Creiamo il velo scuro inizialmente invisibile (opacity: 0) */
.img-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(51, 51, 51, 0.8);
    /* Colore nero con 60% di opacità */
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    /* Sopra lo sfondo, sotto il testo */
}

/* 2. Mostriamo il velo in modalità hover */
.img-card:hover::before {
    opacity: 1;
}

/* 3. Assicuriamoci che il contenitore del testo stia sopra il velo nero */
.img-card div {
    position: relative;
    z-index: 2;
    /* Superiore a z-index: 1 del velo */
    transform: translateY(calc(100% + 30px));
    transition: transform 0.4s ease;
}

.img-card:hover {
    & div {
        transform: translateY(0%);
    }
}

.img-card div>h4 {
    position: absolute;
    bottom: 110%;
    color: #ffffff;
    /* Colore del titolo sempre visibile e leggibile */
}

@media (max-width: 1100px) {
    header {
        flex-direction: column;
        gap: 10px;
        
    }

    #divimg {
        width: 100%;
        justify-content: space-between;
        gap: 0;
    }
}

/*
.circle-img{
    height: 400px;
    width: 400px;
    shape-outside: circle(50%);
    margin: 20px;
    border-radius: 50%;
    border: #b74304 1px solid;
    padding: 2px;
    box-shadow: 0 2px 10px 4px rgba(0, 0, 0,0.5);
}
*/

.image {
    width: 50%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

#cookie-privacy {
    display: none;
    height: 40vh;
    overflow-y: scroll;
    background-color: #dadbdc;
    border-radius: 1.5vh;
    border: none;
}

#cookie-privacy.show {
    display: block;
}

.invisible {
    display: none !important;
}

.results-box {
    padding: 1% 2%;
    margin-top: 0;
    width: 100%;
    background: var(--bg-light);
    color: var(--text-main);
    border-radius: 8px;
    position: relative;
    display: none;
    height: fit-content;
    overflow: hidden;
}

.results-box.open {
    display: flex;
    flex-direction: column;
    border-top: 2px solid var(--accent-color);
}

.description-h3 {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desc-card {
    padding: 0;
    gap: 0;
}

#ToMachine {
    background-color: var(--accent-color);
    border-radius: 5px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 7vh;
    width: 100%;
    max-width: 800px;
    min-width: fit-content;
    min-height: fit-content;
    padding: 10px;
    color: var(--bg-light);
    text-decoration: none;
    overflow: hidden;
    transition: background-color 0.4s ease;
}

#ToMachine:hover {
    cursor: pointer;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-dark);
}

.img-carousel {
    overflow-x: scroll;
    gap: 12px;
    display: flex;
}

.img-carousel img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}


#calendar {
    background-color: var(--bg-card);
    border-radius: 5px;
    border: none;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#calendar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#calendar-head>button {
    width: 3vw;
}

#calendar-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#calendar-carousel{
    display: flex;
    flex-direction: row;
    overflow: hidden;
    width: 100%;
}

.calendar-carousel-btn{
width: 3vw; max-width: 100px;
}

.calendar-carousel-btn:disabled{
    opacity: 0.5;
}

#calendar-carousel > div{
    transition: transform 0.4s ease;
}

#month {
    display: flex;
    align-items: center;
    justify-content: center;
}

#days {
    display: grid;
    grid-template-columns: auto auto auto auto auto auto auto;
}

#days div {
    padding: 5px;
    border: none;
}

/*---------------------------*/

/* Container to center and give depth */

/* Month Heading */
#calendar h3#month {
    text-align: center;
    margin: 0 0 20px 0;
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Grid Layout for Days */
#days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;

}

/* Style for all cells (headers and dates) */
#days>button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    width: auto;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-hover {
    display: none;
    position: absolute;
    bottom: 120%;
    /* Leggermente più alto per dare respiro */
    left: 50%;
    transform: translateX(-50%);
    /* Centra il popup rispetto all'elemento genitore */

    width: max-content;
    /* Si adatta al contenuto, max-width evita che strabordi dallo schermo */
    max-width: 250px;
    padding: 12px 16px;
    /* Spazio interno per far respirare il testo */

    background-color: var(--bg-card, #ffffff);
    color: #1a1a1a;
    /* Un nero morbido, meno aggressivo del black puro */

    border: 1px solid rgba(0, 0, 0, 0.12);
    /* Bordo sottile e moderno invece del nero netto */
    border-radius: 8px;
    /* Angoli leggermente più morbidi */

    /* Ombra elegante per dare profondità (effetto "floating") */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);

    z-index: 10;
    /* Assicura che rimanga sopra agli altri elementi */
}

#days>button:hover {
    .calendar-hover {
        display: block;
    }
}

#days>div {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    width: auto;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

#days>div:empty {
    background: transparent;
    pointer-events: none;
    background-color: #f7fafc;
}


/* Actual Date numbers (excluding empty spaces and headers) */
#days>button:not(:empty) {
    color: #4a5568;
    cursor: pointer;
    background-color: #f7fafc;
}

/* Hover effect for dates */
#days>button:not(:empty):hover {
    background-color: #e2e8f0;
    color: #1a202c;
    transform: translateY(-1px);
}

/* Special treatment for your red day (e.g., today or a holiday) */
#days>button[style*="color:red"] {
    color: #fff !important;
    /* Overriding inline color for a cleaner look */
    background-color: #e53e3e !important;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(229, 62, 62, 0.3);
}

#days>button[style*="color:red"]:hover {
    background-color: #c53030 !important;
}

/* Empty grid slots (padding days) */
#days>button:empty {
    background: transparent;
    pointer-events: none;
}

#days>button:focus {
    background-color: var(--accent-color) !important;
    color: var(--bg-light) !important;
}

#days-week {
    display: grid;
    grid-template-columns: auto auto auto auto auto auto auto;
    gap: 8px;
}

#days-week div {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 60px;
    font-size: 0.9rem;
    border-radius: 6px;
}

#days-container {
    overflow-x: scroll;
    display: flex;
    flex-direction: column;
    gap: 3px
}

#calendar-event>button {
    font-size: 2vh;
    width: 5vw;
    max-width: 150px;
}

.pointed-text,
.pointed-text-double {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 10px;
}

.pointed-text-double {
    display: grid;
    grid-template-columns: 35px auto;
}

.pointed-text-double .title {
    grid-row: 1 / 1;
    grid-column: 2 / 3;
}

.pointed-text-double .text {
    grid-row: 2 / 3;
    grid-column: 2 / 3;
}

.pointer {
    color: var(--bg-card);
    justify-self: start;
    align-self: center;
    background-color: var(--primary-color);
    height: 5px;
    width: 5px;
    min-height: 5px;
    min-width: 5px;
    border-radius: 5px;
    border: 0;
    grid-row: 1 / 2;
    grid-column: 1 / 1;
}

.pointer.num {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold !important;
    height: 3vh !important;
    width: 3vh !important;
    min-width: 15px;
    min-height: 15px;
    max-width: 35px;
    max-height: 35px;
    font-size: 2vh;
}

.pointed-text .pointer {
    /*color: var(--accent-color);*/
    font-weight: bold;
    font-size: 0.8rem;
    line-height: 1;
}

.pointed-text .text {
    display: flex;
    justify-content: start;
    /* Allinea a sinistra */
    align-items: center;
    min-height: 25px;
    /* Usa min-height invece di height fisso */
    line-height: 1.4;
    /* Dà respiro se il testo va a capo */
}

.pointed-text p {
    height: fit-content;
}

.hover:hover {
    transform: translateY(-5px) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}
.button-titolo {
    width: 80%;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: center; /* Centra il testo naturalmente */
    position: relative;      /* Fa da punto di riferimento per la freccia */
    cursor: pointer;
    padding: 10px 20px;     /* Evita che la freccia sia visibile fuori dal bottone prima dell'hover */
}

.button-titolo:hover {
    border: 1px solid transparent;
}

/* IL TESTO: Pulito, senza percentuali rigide, si centra da solo */
.testob-titolo {
    margin: 0;
    padding: 0;
    transition: transform 0.4s ease; /* Transizione fluida se vuoi che si sposti all'hover */
}

/* LA FRECCIA: Posizionata a destra, invisibile e spostata all'inizio */
.freccia-titolo {
    margin: 0;
    padding: 0;
    position: absolute;
    right: 30px;             /* Allineata al bordo destro del bottone */
    opacity: 0;
    transform: translateX(-20px); /* Spostata verso destra, fuori visuale */
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* --- EFFETTI ALL'HOVER --- */

/* La freccia compare e si sposta verso sinistra nella sua posizione */
.button-titolo:hover .freccia-titolo {
    opacity: 1;
    transform: translateX(0);
}

/* FACOLTATIVO: Sposta leggermente il testo a sinistra all'hover per non farlo coprire dalla freccia */
.button-titolo:hover .testob-titolo {
    transform: translateX(-5vw); 
}

/* --- MEDIA QUERY (Molto più semplice ora) --- */
@media (max-width: 424px) {
    .button-titolo {
        /* Se serve, puoi stringere il padding sui telefoni piccoli */
        padding: 10px 15px; 
    }
    .freccia-titolo {
        right: 10px; /* Avvicina la freccia al bordo sui display piccoli */
    }
}

.video-App {
    width: 100%;
    height: auto;
    object-fit: cover;
    border: none;
    border-radius: 8px;
    z-index: 1;
    aspect-ratio: 16 / 9;
    margin-top: 15px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

#efficenza {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(70, 71, 70, 0.8)), url("../img/efficenza.jpg");
}

#innovazione {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(70, 71, 70, 0.8)), url("../img/industria.jpg");
}

#isolePersonalizzate {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(70, 71, 70, 0.8)), url("../img/Isole.JPEG");
}

#servizi>.sub-titolo {
    background-image: linear-gradient(to bottom, rgba(70, 71, 70, 0.8), rgba(70, 71, 70, 0.95)), url("../img/serviziE2.png");
}

#contatti .sub-titolo {
    background-image: linear-gradient(to bottom, rgba(70, 71, 70, 0.8), rgba(70, 71, 70, 0.95)), url(../img/contattaci.png) !important;
}

#Revamping{
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(70, 71, 70, 0.8)), url("../img/revamping.jpg");
}

#Ricambi{
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(70, 71, 70, 0.8)), url("../img/ricambi.png");
}

#Manutenzione{
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(70, 71, 70, 0.8)), url("../img/Manutenzione.png");
}

#Certificazione{
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(70, 71, 70, 0.8)), url("../img/Certificazione.png");
}


html {
    /* Sintassi: <colore-barra> <colore-sfondo> */
    scrollbar-color: #888 transparent;
    /* Può essere: auto, thin (sottile), o none (nascondi) */
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    overscroll-behavior-y: none;
}

.img-card>div>p {
    /* Sintassi: <colore-barra> <colore-sfondo> */
    scrollbar-color: #888 transparent;
    /* Può essere: auto, thin (sottile), o none (nascondi) */
    scrollbar-width: thin;
    scrollbar-gutter: stable;
}

.results-box img {
    height: 50vh;
    width: 100%;
    object-fit: cover;
}

#eventi-imminenti{
    padding: 2%;
    max-width: 600px;
    max-height: 600px;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#eventi-imminenti > div{
    border: 1px solid var(--accent-color);
    border-radius: 50px;
    text-align: center;
    padding: 10px;
}

.card-cube{
    height: 50vh;
    width: 100%;
    overflow-y: scroll;
}

.results-box hr{
    margin-top: 2%;
    margin-bottom: 1%;
}

#totop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    height: 46px; /* Arrotondato leggermente per bilanciare l'ombra */
    width: 46px;
    min-width: 0;
    /* Usa la sfumatura arancione definita nelle tue variabili */
    background: var(--accent-color);
    
    /* Il testo/icona interno sarà chiaro per fare contrasto con l'arancione */
    color: var(--bg-card); 
    
    border: none;
    border-radius: 50%;
    z-index: 100;
    cursor: pointer;
    
    /* Ombra morbida basata sul colore scuro principale del tuo sito */
    box-shadow: 0 4px 14px rgba(51, 51, 51, 0.3);
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px); /* Parte leggermente più in basso per l'effetto comparsa */
    transition: var(--transition-smooth); /* Sfrutta la tua variabile per le transizioni */
    -webkit-tap-highlight-color: transparent;
}

#totop.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#totop:hover {
    /* Si sposta leggermente verso l'alto e l'ombra si fa più profonda */
    transform: translateY(-3px) scale(1.03); 
    box-shadow: 0 6px 20px rgba(51, 51, 51, 0.4);
    /* Rende il gradiente leggermente più luminoso al passaggio del mouse */
    filter: brightness(1.1); 
}

#loghi img{
    height: 10vh;
    max-height: 100px;
    object-fit: contain;
}