/* ==========================================================================
   CENTROCOPIA BICOCCA - MODERN STYLE CONFIGURATION (2026 UPDATE)
   ========================================================================== */

/* --- VARIABILI CSS (Tavolozza Colori Moderna & Tipografia) --- */
:root {
    --primary-color: #0f4c81;        /* Blu Classico Elegante */
    --primary-hover: #0a355c;        /* Blu Profondo */
    --secondary-color: #ff9f1c;      /* Arancione/Oro Caldo per Accent */
    --secondary-hover: #e08300;
    --dark-theme-bg: #111827;        /* Grigio Ardesia Scuro per Footer */
    --dark-theme-accent: #1f2937;    /* Scurissimo per schede e background scuri */
    --light-bg: #f8f9fa;             /* Sfondo Chiaro Sezioni */
    --light-border: #e9ecef;
    --text-dark: #1f2937;            /* Colore Testo Principale */
    --text-light-body: #4b5563;      /* Colore Testo Secondario */
    --text-muted: #9ca3af;
    --whatsapp-green: #25d366;       /* Icona WhatsApp */
    --box-shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --box-shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- REGOLE GENERALI --- */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-light-body);
    background-color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .font-montserrat {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
}

.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6,
.hero-content h1, .hero-content h2, .hero-content h3, .page-banner h1, .page-banner h2 {
    color: #ffffff !important;
}

.text-primary-color { color: var(--primary-color) !important; }
.text-accent-color { color: var(--secondary-color) !important; }
.text-light-body { color: var(--text-light-body) !important; }
.text-whatsapp { color: var(--whatsapp-green) !important; }
.tracking-tight { letter-spacing: -0.025em; }
.letter-spacing-1 { letter-spacing: 0.1em; }
.fs-7 { font-size: 0.875rem !important; }
.fs-8 { font-size: 0.75rem !important; }
.fw-600 { font-weight: 600 !important; }

/* --- SEZIONE TOP BAR CON CONTATTI --- */
.top-bar {
    background-color: var(--light-bg);
    border-bottom: 1px solid var(--light-border);
    font-size: 0.8rem;
    font-weight: 500;
}

.top-bar a:hover {
    color: var(--primary-color) !important;
}

.social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: var(--text-dark);
    font-size: 0.75rem;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.social-icon-link:hover {
    background-color: var(--primary-color);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* --- TASTI UNIVERSITÀ CON RIQUADRO IN NAVBAR --- */
.nav-btn-university {
    border: 1.5px solid #d1d5db !important;
    transition: var(--transition-smooth);
    background-color: #ffffff !important;
    text-transform: none;
    letter-spacing: normal;
}
.nav-btn-university:hover {
    border-color: var(--primary-color) !important;
    background-color: rgba(15, 76, 129, 0.04) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* --- NAV-BAR (GLASSMORPHISM & MODERN DESIGNS) --- */
.main-navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.main-navbar.scrolled {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    box-shadow: var(--box-shadow-soft);
}

.logo-navbar {
    transition: var(--transition-smooth);
}

.main-navbar.scrolled .logo-navbar {
    height: 50px !important;
}

.brand-text .lh-1 {
    letter-spacing: 0.03em;
    font-size: 1.15rem;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.925rem;
    font-family: 'Inter', sans-serif;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* --- PULSANTI MODERNI --- */
.btn-action-important {
    background-color: var(--secondary-color);
    color: #ffffff !important;
    font-size: 0.875rem;
    border: none;
    transition: var(--transition-smooth);
}

.btn-action-important:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 159, 28, 0.4);
}

.btn-primary-modern {
    background-color: var(--primary-color);
    color: #ffffff !important;
    font-size: 0.95rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    border-radius: 50px;
    padding: 12px 30px;
    border: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(15, 76, 129, 0.2);
}

.btn-primary-modern:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 76, 129, 0.3);
}

.btn-outline-modern {
    background-color: transparent;
    color: var(--primary-color) !important;
    font-size: 0.95rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    border-radius: 50px;
    padding: 11px 28px;
    border: 2px solid var(--primary-color);
    transition: var(--transition-smooth);
}

.btn-outline-modern:hover {
    background-color: var(--primary-color);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* --- HERO SLIDER / CAROUSEL & TESTATA --- */
.hero-carousel {
    position: relative;
    background-color: #000000;
}

.hero-carousel .carousel-item {
    height: 580px;
    min-height: 480px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.85) 0%, rgba(17, 24, 39, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.hero-title-badge {
    background-color: rgba(255, 159, 28, 0.15);
    color: var(--secondary-color);
    border: 1px solid rgba(255, 159, 28, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.05em;
}

.hero-heading {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #f3f4f6;
    max-width: 600px;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 5%;
    z-index: 3;
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-size: 40%;
    backdrop-filter: blur(4px);
    transition: var(--transition-smooth);
}

.hero-carousel .carousel-control-prev-icon:hover,
.hero-carousel .carousel-control-next-icon:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: scale(1.1);
}

/* --- SCHEDE FEATURES (GRANDI FORMATI, PICCOLI FORMATI, RILEGATURE) --- */
.feature-section {
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.feature-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: var(--box-shadow-medium);
    border: 1px solid #f1f5f9;
    transition: var(--transition-smooth);
    height: 100%;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(15, 76, 129, 0.1);
}

.feature-icon-wrapper {
    background-color: rgba(15, 76, 129, 0.05);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-wrapper {
    background-color: var(--primary-color);
}

.feature-card:hover .feature-icon-wrapper img {
    filter: brightness(0) invert(1);
}

.feature-icon-wrapper img {
    transition: var(--transition-smooth);
}

.feature-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.feature-card-text {
    font-size: 0.875rem;
    color: var(--text-light-body);
    line-height: 1.7;
    margin-bottom: 20px;
}

.feature-card .readmore {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
}

.feature-card .readmore i {
    transition: var(--transition-smooth);
}

.feature-card:hover .readmore {
    color: var(--secondary-color);
}

.feature-card:hover .readmore i {
    transform: translateX(4px);
}

/* --- ANIMAZIONI ANIMATE --- */
.animate-hover {
    transition: var(--transition-smooth);
}

.animate-hover:hover {
    transform: scale(1.03);
}

@keyframes pulse-animation {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 159, 28, 0.4); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(255, 159, 28, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 159, 28, 0); }
}

.animate-pulse {
    animation: pulse-animation 2s infinite;
}

/* --- MODERN FOOTER --- */
.bg-dark-theme {
    background-color: var(--dark-theme-bg);
}

.bg-dark-accent {
    background-color: var(--dark-theme-accent);
}

.text-secondary-light {
    color: #9cb3c9;
}

.border-bottom-accent {
    position: relative;
}

.border-bottom-accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.social-btn:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

.links-footer a {
    transition: var(--transition-smooth);
}

.links-footer a:hover {
    color: #ffffff !important;
    padding-left: 5px;
}

/* Media Queries */
@media (max-width: 768px) {
    .hero-heading {
        font-size: 2.25rem;
    }
    .hero-carousel .carousel-item {
        height: 480px;
    }
    .feature-section {
        margin-top: 20px;
    }
}

/* ==========================================================================
   UTILITY E COMPONENTI COMUNI
   Prima alcune regole erano definite solo dentro singole pagine (index,
   contatti, lacattolica) e altre non esistevano: ora valgono su tutto il sito.
   ========================================================================== */

/* --- Tipografia --- */
.font-inter { font-family: 'Inter', sans-serif; }
.fw-500 { font-weight: 500 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.fs-7\.5 { font-size: 0.8125rem !important; }
.fs-8\.5 { font-size: 0.7rem !important; }
.tracking-wider { letter-spacing: 0.1em; }
.leading-relaxed { line-height: 1.75; }

/* --- Spaziature intermedie (Bootstrap ha solo gli interi) --- */
.me-1\.5 { margin-right: 0.375rem !important; }
.me-2\.5 { margin-right: 0.75rem !important; }
.mb-1\.5 { margin-bottom: 0.375rem !important; }
.mb-2\.5 { margin-bottom: 0.75rem !important; }
.px-2\.5 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.py-2\.5 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }

/* --- Larghezze massime --- */
.max-width-600 { max-width: 600px; }
.max-width-700 { max-width: 700px; }
.max-width-800 { max-width: 800px; }

/* --- Colori di sfondo e bordi --- */
.bg-primary-color { background-color: var(--primary-color) !important; }
.bg-secondary-color { background-color: var(--secondary-color) !important; }
.bg-primary-soft { background-color: rgba(15, 76, 129, 0.06); }
.bg-secondary-soft { background-color: rgba(255, 159, 28, 0.12); }
.bg-light-bg { background-color: var(--light-bg); }
.text-accent { color: var(--secondary-color) !important; }
.border-light { border-color: var(--light-border) !important; }
.border-transparent { border-color: var(--light-border) !important; }
.border-secondary-dark { border-color: rgba(156, 163, 175, 0.35) !important; }
.border-accent { border-color: var(--secondary-color) !important; }
.border-accent:hover {
    background-color: var(--secondary-color) !important;
    color: #ffffff !important;
}
.opacity-10 { opacity: 0.1 !important; }

/* --- Ombre, transizioni ed effetti hover --- */
.shadow-xs { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important; }
.shadow-medium { box-shadow: var(--box-shadow-medium) !important; }
.transition-smooth { transition: var(--transition-smooth); }
.cursor-pointer { cursor: pointer; }
.hover-shadow { transition: var(--transition-smooth); }
.hover-shadow:hover {
    box-shadow: var(--box-shadow-medium) !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-3px);
}
.hover-shadow-lg { transition: var(--transition-smooth); }
.hover-shadow-lg:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-4px);
}
.hover-primary:hover { color: var(--primary-color) !important; }
.tag-hover {
    transition: var(--transition-smooth);
    cursor: default;
}
.tag-hover:hover {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(15, 76, 129, 0.2) !important;
}

/* --- Pulsanti aggiuntivi --- */
.btn-xs {
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
}
.btn-action-important-accent {
    background-color: var(--secondary-color);
    color: #ffffff !important;
    border: none;
    transition: var(--transition-smooth);
}
.btn-action-important-accent:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 159, 28, 0.4);
}

/* --- Home: selettore interattivo degli argomenti --- */
.navigation-topics .topic-btn {
    border-color: var(--light-border) !important;
    outline: none;
    text-align: left;
}
.navigation-topics .topic-btn:hover {
    border-color: var(--primary-color) !important;
    transform: translateX(4px);
    box-shadow: var(--box-shadow-soft);
}
.navigation-topics .topic-btn.active {
    border-color: var(--primary-color) !important;
    background-color: rgba(15, 76, 129, 0.03) !important;
    box-shadow: var(--box-shadow-soft);
}
.navigation-topics .topic-btn.active .topic-icon-box { background-color: var(--primary-color); }
.navigation-topics .topic-btn.active .topic-icon-box i { color: #ffffff !important; }
.topic-icon-box {
    background-color: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}
.dynamic-img-holder { background: #000000; }
.dynamic-img-holder img { transition: opacity 0.25s ease-in-out; }
.dynamic-img-holder img.fade-out { opacity: 0; }

/* --- Contatti: schede delle sedi --- */
.branch-card { transition: var(--transition-smooth); }
.branch-card:hover {
    border-color: var(--primary-color) !important;
    background-color: rgba(15, 76, 129, 0.01) !important;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-medium) !important;
}
.branch-card.active-branch {
    border-color: var(--primary-color) !important;
    background-color: rgba(15, 76, 129, 0.02) !important;
    box-shadow: var(--box-shadow-medium) !important;
}
.branch-card.active-branch .branch-icon {
    color: var(--primary-color) !important;
    transform: scale(1.1);
}

/* --- Menu a tendina nella navbar --- */
/* .nav-link::after disegna la sottolineatura: sulle tendine ripristina la freccetta di Bootstrap */
.main-navbar .nav-link.dropdown-toggle::after {
    position: static;
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.3em;
    vertical-align: 0.2em;
    background: none;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-left: 0.3em solid transparent;
    border-bottom: 0;
    transform: none;
}
.main-navbar .dropdown-menu { min-width: 240px; }
.main-navbar .dropdown-item {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 0.75rem;
    transition: var(--transition-smooth);
}
.main-navbar .dropdown-item:hover,
.main-navbar .dropdown-item:focus {
    background-color: rgba(15, 76, 129, 0.06);
    color: var(--primary-color);
}
.main-navbar .dropdown-item.active,
.main-navbar .dropdown-item:active {
    background-color: rgba(15, 76, 129, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}
/* Da desktop la tendina si apre anche al passaggio del mouse */
@media (min-width: 992px) {
    .main-navbar .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}
