/* ==========================================================
   GLOBAL STYLES – IMBOSCHIAMOCI APP
   ========================================================== */

body {
    background-color: #f8f9fa;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    padding-top: 80px;
    padding-bottom: 90px; /* spazio footer */
    margin: 0;
	max-width: 430px;
}

.app-wrapper {
    max-width: 430px;        /* come un iPhone 14 Pro Max */
    margin: 0 auto;
    width: 100%;
    position: relative;
}

/* ==========================================================
   NAVBAR MOBILE
   ========================================================== */

.navbar-mobile {
    position: fixed;
	max-width: 430px;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: #0A7F2E;
    color: white;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.navbar-mobile,
.footer-mobile {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.navbar-mobile {
    animation: fadeInUp 0.3s ease;
}
.footer-mobile {
    animation: fadeInUp 0.3s ease;
    animation-delay: 0.1s;
}



.navbar-logo-img {
    height: 38px;
}

.notif-badge {
    font-size: 11px;
    padding: 0.25rem 0.35rem;
    transform: translate(10px, -10px);
}


/* ==========================================================
   FOOTER MENU MOBILE (NUOVA VERSIONE)
   ========================================================== */

.footer-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
	max-width: 430px;
    width: 100%;
    height: 72px;
    background: #0A7F2E;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.15);
    z-index: 1000;
}

.footer-item {
    text-decoration: none;
    color: white;
    text-align: center;
    font-size: 12px;
}

.footer-item i {
    font-size: 22px;
    display: block;
    margin-bottom: 2px;
}

.footer-item span {
    display: block;
    font-size: 11px;
}

.footer-item.active i,
.footer-item.active span {
    color: #AFFFAC;
}


/* ==========================================================
   DASHBOARD – ICON GRID
   ========================================================== */

.icon-wrap {
    background: white;
    border-radius: 20px;
    padding: 16px 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

/* Hover (per chi usa da desktop) */
.icon-wrap:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

/* Tap feedback mobile */
.icon-wrap:active {
    transform: scale(0.96) translateY(1px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    background-color: #f3fff6;
}


.icon-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #22C55E;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

/* Quando la card è attiva o in hover, fai “pop” anche al cerchio */
.icon-wrap:hover .icon-circle,
.icon-wrap:active .icon-circle {
    transform: scale(1.05);
    border-color: #0A7F2E;
}


.icon-label {
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    color: #0A7F2E;
}

.icon-label.small {
    font-size: 13px;
    margin-top: -6px;
}

.dashboard-icon {
    width: 98px;
    height: 98px;
    border-radius: 50%;
    transition: transform 0.18s ease;
}

.dashboard-icon:active {
    transform: scale(0.92);
}

.icon-text {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0A7F2E;
}

.upload-area {
    text-align: center;
}

.upload-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: #eaffea;
    border: 3px solid #22C55E;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease;
}

.upload-circle:active {
    transform: scale(0.94);
    background: #d6ffd6;
}

.upload-icon {
    font-size: 48px;
    color: #0A7F2E;
}

.preview-img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.loading-box {
    text-align: center;
}

.loading-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #cceccc;
    border-top-color: #0A7F2E;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}




/* ==========================================================
   AUTH PAGES (LOGIN / REGISTER / RESET)
   ========================================================== */

.auth-wrapper {
    max-width: 420px;
    width: 100%;
    margin: 0 auto 40px auto;
    padding: 25px 22px;
    background: rgba(255,255,255,0.12);
    border-radius: 22px;
    backdrop-filter: blur(6px);
}

.auth-logo img {
    width: 110px;
    margin-bottom: 20px;
}

.auth-input {
    border-radius: 30px;
    height: 48px;
    text-align: center;
    font-size: 15px;
    border: none;
}

.auth-btn {
    border-radius: 30px;
    height: 48px;
    font-weight: bold;
    font-size: 16px;
    background-color: #ffc107;
    border: none;
    color: #333;
}

.auth-link {
    color: #d9ffd9;
    font-size: 14px;
    text-decoration: none;
}


/* ==========================================================
   HEADER DASHBOARD (TOP GREEN STRIPE)
   ========================================================== */

.dashboard-header {
    background: linear-gradient(90deg, #0A7F2E, #0CB043);
    color: white;
    padding: 25px 20px;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    text-align: left;
    margin-bottom: 25px;
}

.dashboard-header img {
    height: 45px;
    margin-right: 10px;
}

/* Fade-in + leggera salita */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Classe da applicare agli elementi che devono comparire con animazione */
.fade-in-up {
    animation: fadeInUp 0.4s ease forwards;
}

/* Ritmi sfalsati per le icone (stagger) */
.fade-delay-1 { animation-delay: 0.05s; }
.fade-delay-2 { animation-delay: 0.1s; }
.fade-delay-3 { animation-delay: 0.15s; }
.fade-delay-4 { animation-delay: 0.2s; }
.fade-delay-5 { animation-delay: 0.25s; }
.fade-delay-6 { animation-delay: 0.3s; }
.fade-delay-7 { animation-delay: 0.35s; }
.fade-delay-8 { animation-delay: 0.4s; }

.emergency-box {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.emergency-number {
    text-decoration: none;
}

.num-box {
    background: #f4f4f4;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.num-box:active {
    transform: scale(0.96);
    background-color: #ffecec;
}

.num {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #B73232;
}

.label {
    display: block;
    font-size: 13px;
    color: #555;
}

.fauna-box {
    background: #f4f4f4;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    transition: transform 0.18s ease, background-color 0.18s ease;
    text-align: center;
}

.fauna-box:active {
    transform: scale(0.96);
    background-color: #eaffea;
}

.fauna-title {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #0A7F2E;
}

.fauna-desc {
    display: block;
    font-size: 13px;
    color: #555;
}

.fauna-link {
    text-decoration: none;
}

.info-section {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.info-section h5 {
    font-size: 18px;
}

.info-section h6 {
    font-size: 15px;
}

textarea.form-control {
    border-radius: 14px;
}

.gal-map-wrapper {
    display: flex;
    justify-content: center;
}

.gal-map-img {
    max-width: 260px;
    width: 100%;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.gal-comuni-list {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.gal-comune-btn {
    border-radius: 999px;
    border: 1px solid #0A7F2E;
    padding: 8px 10px;
    font-size: 13px;
    background: #ffffff;
    color: #0A7F2E;
    text-align: center;
    transition: background-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.gal-comune-btn:active {
    transform: scale(0.96);
}

.gal-comune-btn.active {
    background: #0A7F2E;
    color: #ffffff;
}

.gal-comune-detail {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 14px 14px 16px;
}

.btn-percorsi {
    width: 100%;
    background: #0A7F2E;
    color: #ffffff;
    border: none;
    padding: 10px 0;
    border-radius: 30px;
    font-weight: bold;
    font-size: 14px;
    transition: transform .18s ease, opacity .18s ease;
}

.btn-percorsi:active {
    transform: scale(0.95);
    opacity: 0.85;
}

.plant-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.18s ease;
}

.plant-card:active {
    transform: scale(0.97);
}

.plant-img-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 14px;
}

.plant-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-area {
    text-align: center;
}

.upload-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: #eaffea;
    border: 3px solid #22C55E;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease;
}

.upload-circle:active {
    transform: scale(0.94);
    background: #d6ffd6;
}

.upload-icon {
    font-size: 48px;
    color: #0A7F2E;
}

.preview-box {
    width: 100%;
    height: auto;
}

.preview-img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.loading-box {
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #cceccc;
    border-top-color: #0A7F2E;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Credits page styling */
.credits-wrapper {
    max-width: 430px;
    height: 100vh;
    margin: 0 auto;
    padding: 30px 20px;
    background: linear-gradient(180deg, #0e8c3a 0%, #0a6e2d 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.credits-logos {
    height: 42px;
    margin-top: 10px;
}

.splash-logo img {
    width: 140px;
}

.btn-enter {
    background: #FFC107;
    color: #333;
    font-weight: bold;
    width: 100%;
    padding: 14px;
    border-radius: 30px;
    border: none;
    font-size: 17px;
    transition: transform .2s ease;
}

.btn-enter:active {
    transform: scale(.96);
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1.2s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.character-card {
    background: #ffffff;
    border: 3px solid #c6da00;
    border-radius: 20px;
    text-align: center;
    transition: transform .2s ease;
}

.character-card:active {
    transform: scale(.95);
}

.character-img {
    width: 100%;
    max-width: 120px;
    margin: auto;
    display: block;
}

.character-name {
    background: #0a2759;
    color: white;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 14px;
    margin-top: 10px;
    display: inline-block;
}

/* Animazioni morbide */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp .45s forwards;
}

.fade-delay-2 { animation-delay: .05s; }
.fade-delay-3 { animation-delay: .10s; }
.fade-delay-4 { animation-delay: .15s; }
.fade-delay-5 { animation-delay: .20s; }
.fade-delay-6 { animation-delay: .25s; }


.btn-lillo {
    background: #0a2759;          /* blu fiaba */
    color: #ffffff;
    font-weight: bold;
    width: 100%;
    max-width: 280px;
    padding: 12px 16px;
    border-radius: 18px;
    border: 3px solid #c6da00;    /* giallo Lillo */
    font-size: 14px;
    line-height: 1.2;
    transition: transform .2s ease, background-color .2s ease;
}

.btn-lillo:active {
    transform: scale(.95);
    background: #0c3476;
}
