/* Definizione dei colori principali */
:root {
    --color-primary: rgba(225, 247, 245, 1);
    /* Colore principale chiaro */
    --color-secondary: rgba(154, 200, 205, 1);
    /* Colore secondario medio */
    --color-accent: rgba(30, 3, 66, 1);
    /* Colore accent scuro */
    --color-hover: rgba(14, 70, 163, 1);
    /* Colore hover */
}

/* Reset and General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    background-color: var(--color-primary);
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
    user-select: none;
}

/* Header Styles */
header {
    width: 100%;
    background: linear-gradient(to right bottom, var(--color-hover), var(--color-accent));
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 1rem;
    z-index: 1000;
    height: 300px;
    overflow: hidden;
}

header img {
    height: 200px;
}

header h5 {
    color: var(--color-primary);
    text-align: center;
    font-size: 1rem;
}

/* Main Content Styles */
main {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: 2rem;
    text-align: center;
    font-weight: 700;
    margin: 1rem 0;
    color: var(--color-accent);
}

/* Gallery Styles */
.parent {
    max-width: 750px;
    display: grid;
    grid-template-columns: repeat(4, .4fr);
    grid-template-rows: repeat(3, .4fr);
    border-radius: 2rem;
    overflow: hidden;
    margin: 1rem;
}

.parent div {
    border: .1rem solid var(--color-primary);
    overflow: hidden;
}

.div1 {
    grid-area: 1 / 1 / 3 / 5;
}

.div1 img {
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    object-position: right;
}

.div2 {
    grid-area: 1 / 1 / 2 / 2;
}

.div3 {
    grid-area: 2 / 1 / 3 / 2;
}

.div4 {
    grid-area: 3 / 1 / 4 / 2;
}

.div5 {
    grid-area: 3 / 2 / 4 / 3;
}

.div6 {
    grid-area: 3 / 3 / 4 / 4;
}

.div7 {
    grid-area: 3 / 4 / 4 / 5;
    position: relative;
}

.div2 img,
.div3 img,
.div4 img,
.div5 img,
.div6 img,
.div7 img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.altro {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    position: absolute;
    top: 0;
    display: grid;
    place-content: center;
    width: 100%;
    height: 100%;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: background 0.3s ease;
    cursor: pointer;
}

.altro:hover {
    background: rgba(0, 0, 0, 0.6);
}

.fullscreen-gallery {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-accent);
    z-index: 2000;
    overflow: auto;
    padding: 2rem;
}

.fullscreen-gallery .close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: var(--color-primary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all .3s ease;
}

.fullscreen-gallery .close:hover {
    color: var(--color-secondary);
    transform: rotate(90deg);
}

.gallery-content {
    width: 80%;
    margin: auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 33%;
}

.column img {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    object-fit: cover;
}

/* Pricing Section Styles */
.prezzi {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.card {
    width: 350px;
    background: linear-gradient(to bottom, var(--color-primary) 0%, var(--color-primary) 70%, var(--color-secondary) 100%);
    background-size: 100% 130%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin: 20px;
    position: relative;
    transition: all 0.3s;
}

.card:hover {
    background-position: 100%;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to bottom, rgba(225, 247, 245, 0) 0%, rgba(225, 247, 255, 0) 50%, rgba(225, 247, 245, 1) 100%);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 24px;
    margin: 0 0 10px 0;
}

.card-price {
    font-size: 20px;
    color: var(--color-accent);
    margin: 0 0 1rem 0;
}

.card-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.card-features li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.card-features li .material-icons {
    margin-right: 10px;
    color: var(--color-hover);
}

/* Distanze */

.distanze {
    margin: auto;
    max-width: 750px;
    background: linear-gradient(to bottom, var(--color-primary) 0%, var(--color-primary) 50%, var(--color-secondary) 100%);
    background-size: 100% 130%;
    border-radius: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    font-size: 1rem;
    color: var(--color-hover);
    font-family: 'Montserrat';
    font-weight: 500;
    padding: 1rem;
    margin: 1rem;
}

/* Contact Section Styles */
.contact-section {
    display: flex;
    width: 100%;
    max-width: 750px;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-around;
    align-items: center;
    padding: 1rem;
    margin: 1rem;
    background: linear-gradient(to bottom, var(--color-primary) 0%, var(--color-primary) 50%, var(--color-secondary) 100%);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.map-container {
    flex: 1;
}

.map-container iframe {
    width: 100%;
    min-width: 200px;
}

.contact-info {
    flex: 1;
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--color-accent);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item .material-icons {
    color: var(--color-hover);
    font-size: 36px;
    margin-right: 20px;
}

.contact-section button {
    text-align: left;
    font-size: 18px;
    color: var(--color-accent);
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    position: relative;
    border: none;
    background: none;
    text-transform: uppercase;
    transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
    transition-duration: 500ms;
    transition-property: color;
}

.contact-section button:focus,
.contact-section button:hover {
    color: var(--color-hover);
}

.contact-section button:focus:after,
.contact-section button:hover:after {
    width: 100%;
    left: 0%;
}

.contact-section button:after {
    content: "";
    pointer-events: none;
    bottom: -3px;
    left: 0;
    position: absolute;
    width: 0%;
    height: 3px;
    background-color: var(--color-hover);
    transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
    transition-duration: 500ms;
    transition-property: width, left;
}

/* Footer Styles */
.footer {
    width: 100%;
    background-color: var(--color-hover);
    text-align: center;
    padding: 20px 0;
    position: relative;
    bottom: 0;
    left: 0;
    font-family: Arial, sans-serif;
}

.footer p {
    margin: 0;
    font-size: 14px;
    color: var(--color-primary);
    line-height: 1.5;
}

.footer p a {
    color: var(--color-hover);
    text-decoration: none;
}

.footer p a:hover {
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    header {
        height: 250px;
    }

    header img {
        height: 180px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .card {
        width: 45%;
    }

    .contact-item .contact-details {
        margin-left: 0;
    }
}

@media (max-width: 768px) {

    .carousel-images img,
    .carousel-thumbnails img {
        width: 100%;
    }

    .carousel-thumbnails {
        display: none;
    }

    header {
        height: 250px;
    }

    header img {
        height: 150px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .card {
        width: 100%;
        max-width: 400px;
    }

    .gallery-content {
        flex-direction: column;
        width: 100%;
        padding-top: 3rem;
    }

    .column {
        width: 100%;
    }
}

@media (max-width: 480px) {

    .carousel-images img,
    .carousel-thumbnails img {
        width: 100%;
    }

    .carousel-thumbnails {
        display: none;
    }

    header {
        height: 200px;
    }

    header img {
        height: 100px;
    }

    h1 {
        font-size: 1.2rem;
    }

    .card {
        width: 100%;
        max-width: 350px;
        margin: 10px;
    }

    .card-title {
        font-size: 20px;
    }

    .card-price {
        font-size: 18px;
    }

    .card-content {
        padding: 15px;
    }
}