/* --- VARIABILI --- */
:root {
    --apedomus-orange: #f39200;
    --apedomus-purple: #6b2d91;
    --text-dark: #333333;
}

/* --- LOGICA STICKY FOOTER & RESPONSIVE HEIGHT --- */
html, body {
    height: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #ffffff;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Fa espandere il contenuto centrale occupando tutto lo spazio verticale residuo */
main.flex-grow-1 {
    flex: 1 0 auto;
}

/* --- NAVBAR --- */
.logo-nav {
    height: 45px !important;
    width: auto;
}
.navbar .nav-link {
    color: var(--text-dark) !important;
    transition: color 0.2s ease;
}
.navbar .nav-link:hover, .navbar .nav-link.active {
    color: var(--apedomus-orange) !important;
}

/* --- UTILITY SPACING --- */
.tracking-tight { letter-spacing: -0.5px; }
.tracking-wider { letter-spacing: 1.5px; }

/* --- CARD STRUTTURA --- */
.custom-card {
    position: relative;
    margin-top: 40px;
    border-radius: 12px;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    background: #ffffff;
    height: 100%;
}

.card-body {
    padding: 60px 25px 30px 25px !important; /* Spazio controllato per evitare sovrapposizioni */
}

/* Cerchi fluttuanti sopra le card */
.card-icon-top {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #ffffff;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.bg-purple-light { background-color: #f4edf7; }
.bg-orange-light { background-color: #fff6eb; }

.card-icon-top img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}

/* --- BOTTONI --- */
.btn-apedomus {
    font-weight: 700;
    font-size: 0.8rem;
    padding: 12px 20px;
    border-radius: 6px;
    text-transform: uppercase;
    border: none;
    color: #ffffff !important;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn-apedomus:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.btn-purple-fill { background-color: var(--apedomus-purple); }
.btn-orange-fill { background-color: var(--apedomus-orange); }

/* --- FOOTER PROFESSIONALE --- */
footer.main-footer {
    background-color: #1a1d21 !important;
    border-top: 4px solid var(--apedomus-orange);
    color: #ffffff !important;
    padding-top: 40px;
    padding-bottom: 20px;
    flex-shrink: 0; /* Impedisce al footer di restringersi */
}

/* Rimuove linee residue strutturali */
footer.main-footer hr, 
footer.main-footer .border-top {
    display: none !important;
}

/* Titoli delle colonne piccoli e in grassetto */
footer.main-footer h6 {
    color: #ffffff !important;
    font-size: 0.8rem !important;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Testi info molto piccoli ed eleganti */
footer.main-footer p, footer.main-footer li, footer.main-footer span {
    color: #e0e0e0 !important;
    font-size: 0.72rem !important;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Testo del copyright in fondo */
.copyright-text {
    color: #b0b0b0 !important;
    font-size: 0.68rem !important;
    margin-top: 30px;
    display: block;
    opacity: 0.7;
}

/* --- MEDIA QUERIES (RESPONSIVE) --- */
@media (max-width: 991.98px) {
    /* Adatta gli allineamenti del footer a tablet e schermi intermedi */
    footer.main-footer .text-lg-end {
        text-align: left !important;
    }
}

@media (max-width: 768px) {
    .logo-nav { height: 35px !important; }
    
    /* Forza la centralità dei testi del footer su smartphone */
    footer.main-footer { text-align: center !important; }
    footer.main-footer .text-md-start,
    footer.main-footer .text-lg-end {
        text-align: center !important;
    }
    
    /* Aumenta lo spazio superiore delle card per via del layout a colonna singola */
    .custom-card { margin-top: 50px; }
}