/* Importazione di un carattere non formale e gradevole da Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f4;
    color: #333;
}

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

/* HEADER & NAVBAR */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 15px;
}

.nav-item {
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-item.active {
    background-color: #1e7e43;
    color: #fff;
}

.nav-item:hover:not(.active) {
    background-color: #eef5f0;
}

.nav-item strong {
    display: block;
    font-size: 0.95rem;
}

.nav-item span {
    font-size: 0.75rem;
    color: #666;
}

.nav-item.active span {
    color: #d0edd8;
}

/* HERO CONTAINER PROPORZIONALE SENZA TAGLI */
.hero-container {
    position: relative;
    width: 100%;
    background-color: #1a4d2e; /* Colore di sfondo coordinato nel caso di bande laterali */
}

.hero-image {
    width: 100%;
    height: auto; /* Mantiene l'immagine perfettamente proporzionata senza tagliare nulla */
    display: block;
}

/* SCRITTA IN ALTO A SINISTRA */
.hero-text-top-left {
    position: absolute;
    top: 6%;
    left: 5%;
    color: white;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.8);
    max-width: 450px;
    z-index: 10;
}

.hero-text-top-left h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.hero-text-top-left p {
    font-size: 1.1rem;
    font-weight: 400;
}

/* SCRITTA IN ALTO A DESTRA (Non formale) */
.hero-title-top-right {
    position: absolute;
    top: 6%;
    right: 5%;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    max-width: 450px;
    text-align: right;
    z-index: 10;
}

.hero-title-top-right h2 {
    font-family: 'Caveat', cursive, sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.1;
}

/* BARRA DI RICERCA SOVRAPPOSTA */
.hero-search-overlay {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    z-index: 10;
}

/* RESPONSIVE PER SCHERMI PIÙ PICCOLI */
@media (max-width: 768px) {
    .hero-title-top-right h2 {
        font-size: 1.5rem;
    }
    .hero-text-top-left h1 {
        font-size: 1.3rem;
    }
    .hero-text-top-left p {
        font-size: 0.85rem;
    }
    .hero-title-top-right,
    .hero-text-top-left {
        top: 4%;
        max-width: 220px;
    }
}

.search-box {
    display: flex;
    background: #fff;
    border-radius: 30px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.search-box input {
    border: none;
    outline: none;
    padding: 10px 20px;
    width: 100%;
    border-radius: 30px;
    font-size: 1rem;
}

.search-box button {
    background: #1e7e43;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
}

/* MAIN CONTAINER */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

/* CATEGORIES GRID */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.cat-card {
    position: relative;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 15px;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.cat-card:hover {
    transform: translateY(-3px);
}

.cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.cat-content {
    position: relative;
    z-index: 1;
}

.cat-content h3 {
    font-size: 1.1rem;
}

.cat-content p {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* SECTION GRID (Sentieri, Scoperte, Mappa) */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 300px;
    gap: 20px;
    margin-bottom: 25px;
    align-items: stretch;
}

@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.card-box {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card-header {
    background: #1e7e43;
    color: white;
    padding: 12px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.card-header a {
    font-size: 1.0rem;
    font-weight: bold;

}

.card-header2 {
    background: #1e7e43;
    color: white;
    padding: 12px 5px;
    display: block;
    font-weight: bold;
    text-align: center;
    line-height: 1.5;
}

.card-header2 a {
    display: inline;
    white-space: nowrap;
    font-size: 1.0rem;
    font-weight: bold;
    color: white;
    text-decoration: underline;
}

.card-header2 a:hover {
    color: red;
}


.card-body {
    padding: 15px;
    display: flex;
    gap: 15px;
    flex-grow: 1;
    align-items: center;
}

.card-body img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.card-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #1e7e43;
}

.card-info p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.card-meta {
    font-size: 0.8rem;
    color: #444;
}

/* SIDEBAR ESPLORA */
.sidebar-links {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-btn {
    background: #f0f4f1;
    padding: 10px 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    font-size: 0.9rem;
}

/* FOOTER BANNER */
.footer-banner {
    background: #e2ede4;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* STILE PER IL CONTENITORE DELL'IFRAME DELLA MAPPA */
.map-card-box {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-bottom: 25px;
    text-align: center;
}

.map-iframe {
    width: 100%;
    height: 550px;
    border: none;
    display: block;
}

.footer-nav {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    text-align: center;
}

/* Riquadro che contiene bandierine e widget Google */
.flags-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    align-items: center;
}

.flags-container {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.flag-icon {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.flag-icon:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.google-translate-widget {
    margin-top: 3px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Posizionamento del blocco bandierine in basso a destra sull'immagine hero */
.hero-flags-bottom-right {
    position: absolute;
    bottom: 15px;
    right: 20px;
    z-index: 10;
}

/* Adattamento per dispositivi mobili */
@media (max-width: 992px) {
    .hero-flags-bottom-right {
        position: relative;
        bottom: auto;
        right: auto;
        margin: 10px auto;
        display: flex;
        justify-content: center;
        padding: 0 10px;
    }
    .flags-block {
        width: 100%;
        max-width: 420px;
    }
    .flags-container {
        flex-wrap: wrap;
    }
.stats-icon {
    color: #1b5e20;
    margin-left: 3px;
    margin-right: 2px;
    font-size: 1.05rem;
}

.hero-stats-line a {
    color: #1b5e20;
    text-decoration: none;
    font-weight: 600;
}

.hero-stats-line a:hover {
    color: #e65100;
    text-decoration: underline;
}