:root {
    --blue:#1c4587;
	--black: #111;
    --max-width:1100px;
}

*{margin:0;padding:0;box-sizing:border-box;}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Comfortaa',sans-serif;
    background:#fff;
    color:#111;
}

/* NAVBAR */
.navbar{
    position:sticky;
    top:0;
    height:55px;
    backdrop-filter:blur(15px);
    background:rgba(255,255,255,0.85);
    display:flex;
    align-items:center;
    justify-content: center; /* centra il logo */
    border-bottom:1px solid #eee;
    z-index:1000;
	padding: 0 20px; /* un po’ di spazio laterale */
}

.nav-logo {
    height: 35px;
    position: relative;
    z-index: 1;
}

/* CONTAINER */
.app-container{
    max-width:var(--max-width);
    margin:auto;
    padding:0 20px 100px;
}

/* HERO */
.hero{
    display:flex;
    align-items:center;
    gap:40px;
    padding:60px 0;
}

.hero-left{flex:1;}
.hero-right{flex:1;text-align:center;}
.hero-right img{max-width:80%;}

.hero-title{
    font-family:'Oswald';
    font-weight:400;
    font-size:42px;
    /*white-space:nowrap;*/
}

/*
.hero-sub{
    font-family:'Oswald';
    font-weight:400;
    font-size:42px;
}
*/

.hero-blue{
    color:var(--blue);
    font-size:18px;
    margin-bottom:20px;
}

.hero-quote{
    font-family:'Pacifico';
    font-size:18px;
    color:var(--blue);
}

.hero-text{
    font-family:'Comfortaa', sans-serif;
    font-weight:300;   /* QUESTO è il light */
    font-size:18px;
    text-align:justify;
	line-height:1.45;
    color:var(--black);
}

.hero-text-mini{
    font-family:'Oswald';
    font-size:10px;
	text-align:justify;
    color:var(--black);
}

/* MAPPA */
.map-section{
    padding:40px 0;
    text-align:center;
}

iframe{
    width:100%;
    height:500px;
    border:none;
    border-radius:20px;
}

.locale-map iframe{
    width:100%;
    height:160px;
    border:none;
    border-radius:15px;
}

.select-title{
    font-family:'Oswald';
    font-size:20px;
    margin:25px 0 15px;
}

/* DIVISIONE */
.divider-fancy {
    height: 4px;
    width: 80%;
    max-width: 600px;
    margin: 10px auto; /* centra e distanzia */
    border-radius: 2px;
    background: linear-gradient(90deg, #007BFF, #00D4FF);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.divider-fancy::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
    animation: slide 2s infinite;
}

@keyframes slide {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* BOTTONI */
.categorie{
    display:flex;
    justify-content:center;
    gap:20px;
}

.btn-circle{
    width:65px;
    height:65px;
    border-radius:50%;
    border:none;
    background:var(--blue);
    font-size:26px;
    color:white;
    cursor:pointer;
    box-shadow:0 8px 20px rgba(0,0,0,0.2);
    transition:0.25s;
}

.btn-circle:hover{
    transform:translateY(-4px) scale(1.08);
}

.btn-circle.active{
    transform:scale(1.15);
    box-shadow:0 15px 35px rgba(28,69,135,0.5);
}

/* SEZIONE DINAMICA */
#dynamic-section{
    margin-top:30px;
    transition:0.4s;
}

.dynamic-active{
    padding:30px;
    border:2px solid var(--blue);
    border-radius:20px;
    background:rgba(28,69,135,0.05);
}

.locale-tile{
    display:flex;
    gap:30px;
    padding:40px;
    margin-bottom:40px;
    border-radius:20px;
    background:white;
    box-shadow:0 15px 40px rgba(0,0,0,0.08);
    transition:0.3s ease;
}

.locale-tile:hover{
    transform:translateY(-5px);
}

.locale-text{flex:2;}
.locale-carousel{flex:1;}

.carousel{
    width:100%;
    aspect-ratio:1/1;
    overflow:hidden;
    border-radius:20px;
    position:relative;
}

.carousel img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:0.4s;
}

/* BOTTOM NAV */
.bottom-nav{
    position:fixed;
    bottom:0;
    width:100%;
    height:60px;
    background:white;
    border-top:1px solid #ddd;
    display:none;
    justify-content:space-around;
    align-items:center;
}

.bottom-nav button{
    border:none;
    background:none;
    font-family:'Oswald';
    font-size:14px;
}

/* TELEGRAM */
.telegram-section {
    padding:100px 0;
    text-align:center;
    background:#f4f6fb;
}

.telegram-btn {
    display:inline-block;
    margin-top:20px;
    padding:12px 35px;
    background:var(--blue);
    color:white;
    border-radius:30px;
    text-decoration:none;
}

/* SOCIAL */
.social {
    padding:80px 0;
    text-align:center;
}

.social-links {
    margin-top:25px;
    display:flex;
    justify-content:center;
    gap:20px;
}

.social-circle {
    width:50px;
    height:50px;
    border-radius:50%;
    background:var(--blue);
    display:flex;
    align-items:center;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    font-size:20px;
    color:white;
}

.social-circle:hover { transform:scale(1.1); }

.social-circle svg { width:22px; }

.carousel{
    position:relative;
}

.carousel-btn{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:35px;
    height:35px;
    border-radius:50%;
    border:none;
    background:rgba(0,0,0,0.5);
    color:white;
    font-size:20px;
    cursor:pointer;
    z-index:10;
}

.prev{ left:10px; }
.next{ right:10px; }

.carousel-btn:hover{
    background:rgba(0,0,0,0.8);
}

/* ANIMAZIONI */
.reveal{
    opacity:0;
    transform:translateY(30px);
    transition:0.6s ease;
}

.reveal.active{
    opacity:1;
    transform:translateY(0);
}

/* MOBILE */
@media(max-width:900px){

.hero{
    flex-direction:column;
    text-align:center;
}

.hero-title{
    white-space:normal;
}

.bottom-nav{
    display:flex;
}

.app-container{
    padding-bottom:120px;
}

}

/* =========================
   MOBILE OPTIMIZATION
========================= */

@media(max-width:900px){

/* HERO */
.hero{
    flex-direction:column;
    text-align:center;
    gap:25px;
}

.hero-right img{
    max-width:65%;
}

/* MAPPA */
iframe{
    height:400px;
}

/* LOCALE CARD MOBILE */
.locale-tile{
    flex-direction:column;
    padding:25px;
}

.locale-carousel{
    order:-1; /* immagine sopra */
    width:100%;
}

.carousel{
    width:100%;
}

.locale-text{
    width:100%;
}

.locale-text h2{
    font-size:20px !important;
}

.locale-text p{
    font-size:14px !important;
	font-weight:300;
}

/* più separazione tra card */
.locale-tile + .locale-tile{
    margin-top:30px;
}

}

.locale-tile:nth-child(even){
    background:#f7f9ff;
}

/* Bottone nella navbar */
.save-app-btn {
    position: absolute;
    right: 20px;      /* distanza dal bordo destro */
    top: 50%;
    transform: translateY(-50%); /* centra verticalmente */
    background: var(--blue);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.save-app-btn:hover {
    transform: translateY(-50%) scale(1.05);
}

/* Modale dialog */
.save-app-dialog{
    display:none; /* nascosta inizialmente */
    position:fixed;
    top:0; left:0;
    width:100%; height:100%;
    background:rgba(0,0,0,0.6);
    z-index:2000;
    align-items:center;
    justify-content:center;
}

.dialog-content{
    background:white;
    padding:25px 30px;
    border-radius:15px;
    max-width:500px;
    width:90%;
    box-shadow:0 10px 25px rgba(0,0,0,0.3);
    text-align:left;
    position:relative;
}

.dialog-content h2{
    margin-bottom:15px;
    font-size:20px;
}

.dialog-content ol{
    padding-left:20px;
    margin-bottom:15px;
}

.dialog-content .note{
    font-size:14px;
    font-weight:600;
    color:var(--blue);
}

.close-dialog{
    position:absolute;
    top:10px;
    right:15px;
    font-size:22px;
    cursor:pointer;
    color:#333;
}