/* === PATENTINO SOCIAL — override diretto === */
/* CSS puro: usato con !important per vincere sulla specificità Bootstrap */

/* FONT */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

body, .page-content, #page, #region-main {
    font-family: 'Inter', -apple-system, system-ui, sans-serif !important;
    color: #333333;
}

h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5,
.navbar-brand, .card-title, .page-header-headings h1, .sectionname {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
}

/* VARIABILI BOOTSTRAP — override a runtime */
:root, [data-bs-theme="light"], body {
    --bs-primary: #5B2D8E !important;
    --bs-primary-rgb: 91, 45, 142 !important;
    --bs-link-color: #5B2D8E !important;
    --bs-link-hover-color: #45206B !important;
    --bs-body-bg: #ffffff !important;
    --bs-body-color: #333333 !important;
}

/* NAVBAR */
.navbar {
    background-color: #ffffff !important;
    border-bottom: 2px solid #E8E2F0 !important;
    box-shadow: 0 2px 12px rgba(91,45,142,.07) !important;
}
.navbar-brand, .navbar .navbar-brand {
    color: #5B2D8E !important;
    font-weight: 800 !important;
    font-size: 1.2rem !important;
}
.navbar .nav-link { color: #333333 !important; font-weight: 500 !important; }
.navbar .nav-link:hover, .navbar .nav-link:focus { color: #5B2D8E !important; }

/* BOTTONI PRIMARI — arancio CTA */
.btn-primary, .btn-primary:focus, .btn-primary:not(:disabled):not(.disabled):active,
input[type="submit"].btn-primary, button.btn-primary {
    background-color: #FF6B35 !important;
    border-color: #FF6B35 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 9px !important;
    box-shadow: 0 4px 14px rgba(255,107,53,.25) !important;
}
.btn-primary:hover, .btn-primary:not(:disabled):not(.disabled):hover {
    background-color: #E85A24 !important;
    border-color: #E85A24 !important;
}

/* BOTTONI SECONDARI — viola */
.btn-secondary, .btn-outline-secondary, .btn-outline-primary {
    border-color: #5B2D8E !important;
    color: #5B2D8E !important;
    border-radius: 9px !important;
    font-weight: 600 !important;
    background-color: transparent !important;
}
.btn-secondary:hover, .btn-outline-secondary:hover, .btn-outline-primary:hover {
    background-color: #5B2D8E !important;
    color: #ffffff !important;
}

/* LINK */
a, a:visited { color: #5B2D8E !important; }
a:hover, a:focus { color: #45206B !important; text-decoration: underline; }

/* LOGIN */
.pagelayout-login .card, #page-login-index .card {
    border: 1px solid #E8E2F0 !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 44px rgba(91,45,142,.13) !important;
    padding: 14px !important;
}
.pagelayout-login .login-container { max-width: 440px !important; margin: 0 auto; }
.pagelayout-login h2, .pagelayout-login h1, #page-login-index h2 {
    color: #5B2D8E !important;
    text-align: center !important;
    font-weight: 800 !important;
}
.pagelayout-login .login-form-submit .btn,
#page-login-index .login-form-submit input[type="submit"] {
    background-color: #FF6B35 !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    border-radius: 10px !important;
    width: 100%;
}

/* FORM */
.form-control, input[type="text"], input[type="password"],
input[type="email"], select.form-control, textarea.form-control {
    border: 1.5px solid #E8E2F0 !important;
    border-radius: 9px !important;
    padding: 11px 14px !important;
    font-size: 15px !important;
    background-color: #fff !important;
    color: #333 !important;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
    border-color: #5B2D8E !important;
    box-shadow: 0 0 0 3px rgba(91,45,142,.12) !important;
    outline: none !important;
}

/* CARD */
.card {
    border: 1px solid #E8E2F0 !important;
    border-radius: 14px !important;
}
.card-title, .card h4, .card h5 { color: #5B2D8E !important; }

/* SEZIONI CORSO */
.course-section, .course-content .section-main, .course-content .section {
    border: 1px solid #E8E2F0 !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
    background-color: #ffffff !important;
}
.sectionname, .course-content .sectionname, .course-content .section .sectionname {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    color: #5B2D8E !important;
    font-size: 1.05rem !important;
}
.course-content .current .sectionname { color: #45206B !important; }
.course-content .activity:hover { background-color: #EFE6FA !important; border-radius: 10px; }

/* BLOCCHI */
.block, .block .card {
    border: 1px solid #E8E2F0 !important;
    border-radius: 12px !important;
    background-color: #fff !important;
}
.block .card-title, .block h5 {
    color: #5B2D8E !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #EFE6FA !important;
    padding-bottom: 10px !important;
}

/* BADGE E PROGRESS */
.badge.bg-primary, .badge-primary, .badge.bg-info { background-color: #5B2D8E !important; color:#fff !important; }
.progress-bar { background-color: #5B2D8E !important; }

/* TAB */
.nav-tabs .nav-link.active {
    color: #5B2D8E !important;
    border-bottom: 2px solid #5B2D8E !important;
    font-weight: 600 !important;
}

/* TABELLE */
.table thead th {
    background-color: #F9F7FC !important;
    color: #5B2D8E !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #E8E2F0 !important;
}

/* ALERT */
.alert-info {
    background-color: #EFE6FA !important;
    border-color: #DCCBF2 !important;
    color: #45206B !important;
}

/* FOOTER */
#page-footer, footer, .footer-content {
    background-color: #5B2D8E !important;
    color: #D9CCEE !important;
}
#page-footer a, footer a, .footer-content a { color: #D9CCEE !important; }
#page-footer a:hover, footer a:hover { color: #ffffff !important; }
#page-footer .footer-content-debugging { display: none; }

/* TITOLI */
.page-header-headings h1 { color: #5B2D8E !important; font-weight: 800 !important; }

/* QUIZ */
.path-mod-quiz .submitbtns input[type="submit"],
.path-mod-quiz input[type="submit"] {
    background-color: #FF6B35 !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 28px !important;
    border-radius: 10px !important;
}

/* NAV BUTTONS e paginazione */
.page-link { color: #5B2D8E !important; }
.page-item.active .page-link { background-color: #5B2D8E !important; border-color: #5B2D8E !important; color: #fff !important; }

/* MOBILE */
@media (max-width: 640px) {
    .navbar-brand { font-size: 1.05rem !important; }
    h1 { font-size: 1.6rem !important; }
    h2 { font-size: 1.35rem !important; }
    .sectionname { font-size: .98rem !important; }
}
