/* GLOBAL COLORS */
:root {
    --blue: #4a90e2;
    --text-black: #000;
    --light-green: #00cc66;
    --dark-green: #008040;
}
/* BODY */
body {
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
            background: url(../Images/Background.png);
            background-repeat: no-repeat;
            background-attachment: fixed;
            color: #333;
        }

    
.main-body {
            margin: 0;
            background: url('../Images/Home4.jpg') center/cover no-repeat;
        }
    .main-page {
            height: 100vh;
            display: flex;
            flex-direction: column;
            margin: auto;
            align-items: center;
            padding: 0 5%;
            color: #007038;
            letter-spacing: 3px;

            
    }
    .main-page-open {
            height: 100vh;
            display: flex;
            flex-direction: column;
            margin: auto;
            align-items: center;
            padding: 0 5%;
            color: transparent;
            letter-spacing: 3px;
    }        
        

        .main-page h1, .main-page-open h1 {
            font-size: 2.7rem;
            text-transform: uppercase;
	        font-family: verdana;
            font-weight: bold;
            margin: 5px;
        }


        .main-page p, .main-page-open p {
            font-size: 1.1rem;
	        font-family: fantasy;
            max-width: 500px;
            margin: 0px 0; 
        }

        @media (max-width: 600px) {

            .main-page p {
                margin-right: 120px;
            }
            
        }
@media (min-width: 600px) {

            .main-page-open {
                color: #007038;
            }
            
        }

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    color: var(--dark-green);
    cursor: pointer;
}


/* MENU BAR */
.menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;

    background: linear-gradient(
        to bottom,
        var(--light-green),
        var(--dark-green)
    );

    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

/* LINKS */
.menu a {
    position: relative;
    text-decoration: none;
    color: white;
    font-size: 1.05rem;
    font-family: "Segoe UI", Verdana, sans-serif;
    font-weight: 600;
    padding: 0.6rem 0.5rem;
    transition: all 0.3s ease;
}

/* UNDERLINE ANIMATION */
.menu a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: -4px;
    background: white;
    transition: width 0.3s ease;
}

/* HOVER EFFECT */
.menu a:hover::after {
    width: 100%;
}

.menu a:hover {
    transform: translateY(-2px);
}


/* MENU MOBILE */

@media (max-width: 600px) {

    .menu-toggle {
        display: block;
        margin: 0.5rem;
    }

    .menu {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
        padding: 1rem 0;
        background: none;
        box-shadow: none;
    }

    .menu.open {
        display: flex;
    }

    .menu a {
        width: 90%;
        text-align: center;
        padding: 0.9rem;
        border-radius: 8px;

        background: linear-gradient(
            to bottom right,
            var(--light-green),
            var(--dark-green)
        );

        box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    }

    .menu a:hover {
        transform: scale(1.03);

        background: linear-gradient(
            to bottom right,
            #33ff99,
            #00cc66
        );
    }

    .menu a::after {
        display: none;
    }
} 

.bodyContent {
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index:2;
    height:100%;
    display:flex;
    flex-direction:column;
    color:white;
    height:450px;
    background:linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2),
        rgba(0,0,0,0.65)
    );
            
}

.bodyContent h1 {

    margin: 20px;
    font-family: verdana;
    font-size:3.2rem;
    letter-spacing:1px;
    
}
.bodyContent p {
    margin: 20px;
    font-family: 'Segoe UI', sans-serif;
    font-size:1.25rem;
    text-align: left;
    max-width:600px;
    
}

.bodyContent button {
            background-color: #049b4f;   /* Button background color */
            color: white;                /* Text color */
            padding: 12px 24px;          /* Space inside button */
            border: none;                /* Remove border */
            border-radius: 8px;          /* Rounded corners */
            font-size: 16px;             /* Text size */
            cursor: pointer;             /* Pointer on hover */
            align-content: center;
        }

.bodyContent button :hover {
            background-color: #00cc66;   /* Darker color on hover */
        }

.About {
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index:2;
    height:100%;
    display:flex;
    flex-direction:column;
    color:#3d3d3d;
    height:450px;         
}

.About h1 {

    margin: 20px;
    font-family: verdana;
    font-size:3.2rem;
    letter-spacing:1px;
    
}
.About p {
    margin: 20px;
    font-family: 'Segoe UI', sans-serif;
    font-size:1.25rem;
    max-width:600px;
    
}

.About ul {
    list-style: none;
    margin: 20px;
    font-family: 'Segoe UI', sans-serif;
    font-size:1.25rem;
    text-align: left;
}

.About strong {
    color: #01783d;
}

.Sestieri {
    justify-content: center;
    align-items: center;
    text-align: left;
    height:100%;
    display:flex;
    flex-direction:column;
    color:#3d3d3d;       
}

.Sestieri h1 {

    margin: 20px;
    font-family: verdana;
    font-size:3.2rem;
    letter-spacing:1px;
    
}
.Sestieri p {
    margin: 20px;
    font-family: 'Segoe UI', sans-serif;
    font-size:1.25rem;
    max-width:900px; 
}

.Sestieri ul {
    list-style: none;
    margin: 20px;
    font-family: 'Segoe UI', sans-serif;
    font-size:1.25rem;
    text-align: left;
    margin-bottom: 40px;
}

.Sestieri strong {
    color: #01783d;
}


/* ====== CARD-CONTAINER ====== */

.cards-container {
    width: 100%;
    max-width: 1200px;
    margin: 50px auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 0 20px;
}


/* ====== CARD ====== */

.card {
    display: flex;
    flex-direction: row;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e4e4e4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

/* Effetto hover elegante */
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}


/* ====== IMMAGINI ====== */
.card img {
    width: 35%;
    height: 220px;
    object-fit: cover;
    border-right: 1px solid #ddd;
    flex-shrink: 0;
}



/* ====== CONTENUTO ====== */

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 25px 30px;
    width: 65%;
    min-width: 0; /* fondamentale per evitare testo tagliato nei flexbox */
    word-break: break-word;
}

.card-content h3 {
    margin: 0;
    font-size: 1.6rem;
    color: #1f1f1f;
    font-weight: 600;
    font-family: Verdana;
}

.card-content p {
    margin-top: 10px;
    font-size: 1rem;
    line-height: 1.5;
    color: #3d3d3d;
    font-family: 'Segoe UI', sans-serif;
    overflow-wrap: break-word;
}

a:link {
    text-decoration: none;
}


/* ====== RESPONSIVE ====== */

@media (max-width: 900px) {

    .card {
        flex-direction: column;
    }

    .card img {
        width: 100%;
        height: 220px;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .card-content {
        width: 100%;
        padding: 20px;
    }
}


@media (max-width: 500px) {

    .cards-container {
        margin: 30px auto;
        padding: 0 12px;
        gap: 18px;
    }

    .card {
        border-radius: 14px;
    }

    .card img {
        height: 170px;
    }

    .card-content {
        padding: 16px;
    }

    .card-content h3 {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .card-content p {
        font-size: 0.95rem;
        margin-top: 8px;
        line-height: 1.65;
    }

}

#map{
height: 100vh;
}

#routeBtn, #clearBtn{
position: fixed;
bottom: 20px;
padding: 12px 18px;
font-size: 15px;
border: none;
border-radius: 8px;
cursor: pointer;
z-index: 1000;
}

#routeBtn{
left: 40%;
background-color: #0078ff;
color: white;
}

#clearBtn{
left: 55%;
background-color: #e74c3c;
color: white;
}

#routeBtn:hover{
background-color:#005fcc;
}

#clearBtn:hover{
background-color:#c0392b;
}

#map{
height:100vh;
}

/* pannello controlli */

#mapControls{

position: fixed;
bottom:20px;
left:50%;
transform:translateX(-50%);

display:flex;
gap:10px;
align-items:center;
flex-wrap:wrap;

background:white;
padding:10px 14px;
border-radius:10px;

box-shadow:0 4px 10px rgba(0,0,0,0.2);

z-index:1000;

}

/* counter */

#placeCounter{
font-size:14px;
font-weight:600;
}

/* bottoni */

#mapControls button{

padding:8px 14px;
border:none;
border-radius:6px;
cursor:pointer;
font-size:14px;

}

#mapControls button:first-of-type{
background:#0078ff;
color:white;
}

#mapControls button:last-of-type{
background:#e74c3c;
color:white;
}

#mapControls button:hover{
opacity:0.9;
}

/* mobile */

@media (max-width:600px){

#mapControls{

flex-direction:column;
align-items:stretch;
width:90%;

}

#mapControls button{
width:100%;
}

}

/* Section Layout - MOBILE FIRST */
.content {
    display: flex;
    flex-direction: column;   /* Text on top, image bottom */
    padding: 2rem;
    gap: 2rem;
}

/* Text */
.text h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-family: verdana;
}

.text p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-family: 'Segoe UI', sans-serif;
}

.my-button {
            background-color: #049b4f;   /* Button background color */
            color: white;                /* Text color */
            padding: 12px 24px;          /* Space inside button */
            border: none;                /* Remove border */
            border-radius: 8px;          /* Rounded corners */
            font-size: 16px;             /* Text size */
            cursor: pointer;             /* Pointer on hover */
        }

        .my-button:hover {
            background-color: #00cc66;   /* Darker color on hover */
        }
        
/* Image */
.image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Desktop Layout */
@media (min-width: 768px) {
    .content {
        flex-direction: row;   /* Side by side on desktop */
        align-items: center;
        padding: 4rem 10%;
    }

    .text, .image {
        flex: 1;
    }

    .text h1 {
        font-size: 3rem;
    }
}
