/* =========================
   🎨 COLORS FLNC
========================= */
:root {
    --green: #198754;
    --blue: #0d6efd;
    --red: #dc3545;
    --yellow: #ffc107;
    --white: #ffffff;
    --dark: #1e293b;
}

/* =========================
   BODY
========================= */
body {
    background: #f4f6f9;
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

/* =========================
   HEADER
========================= */
.navbar {
    height: 70px;
    z-index: 1030;
    background: linear-gradient(90deg, var(--green), var(--blue));
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: white !important;
    font-weight: 500;
}

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

/* =========================
   SIDEBAR DESKTOP
========================= */
.sidebar {
    position: fixed;
    top: 70px; /* sotto header */
    left: 0;
    width: 250px;
    height: calc(100vh - 70px);
    background: var(--dark);
    padding: 15px;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1020;
}

/* HEADER SIDEBAR */
.sidebar-header {
    padding: 10px;
    border-bottom: 1px solid #2c3e50;
    text-align: center;
    color: var(--green);
    font-weight: bold;
}

/* LINKS */
.sidebar .nav-link {
    color: #cbd5e1;
    padding: 10px;
    border-radius: 6px;
    display: flex;
    gap: 10px;
    align-items: center;
    transition: all 0.2s ease;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
}

/* HOVER */
.sidebar .nav-link:hover {
    background: var(--green);
    color: white;
    transform: translateX(5px);
}

/* ACTIVE (se vuoi usarlo con Thymeleaf) */
.sidebar .nav-link.active {
    background: var(--blue);
    color: white;
}

/* =========================
   MAIN CONTENT
========================= */
.main-content {
    margin-left: 250px;
    padding-top: 70px;
    transition: all 0.3s ease;
}

/* =========================
   TOPBAR
========================= */
.topbar {
    height: 60px;
    background: var(--white);
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1010;
}
/* =========================
   BUTTONS
========================= */
.btn-primary {
    background: var(--green);
    border: none;
}

.btn-primary:hover {
    background: var(--blue);
}

.btn-danger {
    background: var(--red);
}

/* =========================
   MOBILE FIX
========================= */
@media (max-width: 768px) {

    /* Sidebar nascosta */
    .sidebar {
        left: -260px;
        position: fixed;
        z-index: 2000;
    }

    /* Sidebar aperta */
    .sidebar.active {
        left: 0;
    }

    /* Overlay scuro */
    .overlay {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(0,0,0,0.4);
        z-index: 1500;
        display: none;
    }

    .overlay.active {
        display: block;
    }

    /* Contenuto pieno */
    /*    .main-content {
            margin-left: 0;
        }*/
    .main-content {
        margin-left: 250px;
        margin-top: 70px; /* 🔥 QUESTO MANCAVA */
    }
}

.psm-img{
    height: 15rem;
    width: 100%;
    object-fit: cover;
}

/* =========================
   CARDS (dashboard)
========================= */
.card {
    border: none;
    border-radius: 12px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Varianti colore FLNC */
.card-primary {
    border-left: 4px solid var(--blue);
}

.card-success {
    border-left: 4px solid var(--green);
}

.card-danger {
    border-left: 4px solid var(--red);
}

.card-warning {
    border-left: 4px solid var(--yellow);
}


/* =========================
   DASHBOARD CARDS FLNC
========================= */

.stat-card {
    border-left: 5px solid var(--green);
}

.border-green {
    border-left-color: var(--green);
}
.border-blue  {
    border-left-color: var(--blue);
}
.border-red   {
    border-left-color: var(--red);
}
.border-yellow{
    border-left-color: var(--yellow);
}

/* numeri dashboard */
.stat-card h3 {
    font-size: 28px;
}

/* icone grandi dashboard */
.stat-card i {
    opacity: 0.8;
}

.border-green {
    border-left: 4px solid var(--green);
}
.border-blue {
    border-left: 4px solid var(--blue);
}
.border-red {
    border-left: 4px solid var(--red);
}
.border-yellow {
    border-left: 4px solid var(--yellow);
}

/* =========================
   HEADER PUBLIC (PRO)
========================= */
.navbar {
    background: linear-gradient(90deg, var(--green), var(--blue));
}

.navbar .navbar-brand {
    color: var(--white) !important;
    font-weight: 600;
}

.navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar .nav-link:hover {
    color: var(--white) !important;
    text-decoration: underline;
}

/* CTA BUTTON */
.navbar .btn-primary {
    background: var(--red);
    border: none;
}

.navbar .btn-primary:hover {
    background: #bb2d3b;
}

.navbar {
    background: linear-gradient(90deg, var(--green), var(--blue));
    backdrop-filter: blur(6px);
}

.navbar .nav-link {
    position: relative;
}

/* linea sotto elegante */
.navbar .nav-link::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: 0;
    background: var(--yellow);
    transition: 0.3s;
}

.navbar .nav-link:hover::after {
    width: 100%;
}

/* =========================
   DROPDOWN MENU
========================= */
.dropdown-menu {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dropdown-item:hover {
    background: var(--green);
    color: white;
}


/* =========================
   FOOTER FIX VISIBILITÀ
========================= */
.footer-political {
    background: linear-gradient(180deg, #14532d 0%, #0f172a 100%);
    color: #ffffff;
    border-top: 3px solid var(--green);
    box-shadow: inset 0 15px 40px rgba(0,0,0,0.4);
}

/* TITOLI */
/*.footer-political h6 {
    color: var(--green);
    font-weight: 600;
}*/
.footer-political h6 { color: var(--yellow); /* evidenza */ font-weight: 600; }

/* TESTI NORMALI */
.footer-political p,
.footer-political li {
    color: rgba(255,255,255,0.9) !important;
}

/* FIX BOOTSTRAP */
.footer-political .text-muted {
    color: rgba(255,255,255,0.75) !important;
}

/* LINEA */
.footer-political hr {
    border-top: 1px solid rgba(255,255,255,0.15);
}

/* COPYRIGHT */
.footer-political .text-center {
    color: rgba(255,255,255,0.7);
}

/* LINK */
.footer-political a {
    color: #bbf7d0;
}

.footer-political a:hover {
    color: #ffffff;
}

/* =========================
   FOOTER ICONS STYLE
========================= */
.footer-political i {
    color: var(--green);
}

/* SOCIAL ICONS */
.footer-political .bi-facebook:hover {
    color: #1877f2;
}

.footer-political .bi-twitter-x:hover {
    color: #ffffff;
}

.footer-political .bi-youtube:hover {
    color: #ff0000;
}

/* LINK FOOTER */
.footer-political a {
    color: #bbf7d0;
    transition: 0.2s;
}

.footer-political a:hover {
    color: #ffffff;
}

/* SPAZIATURA */
.footer-political p,
.footer-political li {
    line-height: 1.6;
}


/* =========================
   SECTION TITLES
========================= */
h1, h2, h3 {
    color: var(--green);
}

/* =========================
   BUTTONS GLOBAL
========================= */
.btn-primary {
    background: var(--blue);
    border: none;
}

.btn-primary:hover {
    background: #0b5ed7;
}

.btn-danger {
    background: var(--red);
}

.btn-warning {
    background: var(--yellow);
    color: black;
}

/* =========================
   HERO SECTION
========================= */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6)),
        linear-gradient(90deg, var(--green), var(--blue));
}

/* =========================
   LINKS GLOBAL
========================= */
a {
    color: var(--blue);
}

a:hover {
    color: var(--green);
}

/* =========================
   SMALL DETAILS (PRO TOUCH)
========================= */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

.container {
    max-width: 1200px;
}

/* =========================
   HERO PRO (CON IMMAGINE)
========================= */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.75)),
        url('/images/hero-congo.jpg') center/cover no-repeat;

    color: white;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* =========================
   ANIMAZIONI SOFT
========================= */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   CARD PREMIUM
========================= */
.card {
    border: none;
    border-left: 4px solid var(--green);
    border-radius: 10px;
    transition: all 0.25s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-left: 4px solid var(--blue);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

section {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* =========================================================
   HISTORIQUE PAGE PREMIUM
========================================================= */

.historique-page {
    background: linear-gradient(to bottom, #f8fafc, #eef5f1);
    padding: 40px 0;
}

/* CARD PRINCIPALE */
.historique-wrapper {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0,0,0,0.08);
}

/* HEADER */
.historique-header {
    background: linear-gradient(135deg, #0f5132, #198754);
    color: white;
    padding: 35px;
}

.historique-header h2 {
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0;
}

/* SIDEBAR */
.historique-sidebar {
    background: #0f172a;
    min-height: 100%;
    padding: 25px;
    border-right: 4px solid #198754;
}

.historique-sidebar h3 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 25px;
}

/* MENU */
.historique-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.historique-sidebar li {
    margin-bottom: 10px;
}

.historique-sidebar a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.historique-sidebar a:hover {
    background: rgba(25,135,84,0.2);
    color: #ffffff;
    transform: translateX(4px);
}

/* CONTENU */
.historique-content {
    padding: 40px;
}

/* TITRES */
.historique-content h1,
.historique-content h2,
.historique-content h3,
.historique-content h4,
.historique-content h5 {
    color: #0f5132;
    font-weight: 700;
    margin-top: 35px;
    margin-bottom: 20px;
}

/* PARAGRAPHES */
.historique-content p {
    color: #334155;
    line-height: 1.9;
    text-align: justify;
    font-size: 1rem;
    margin-bottom: 20px;
}

/* LISTES */
.historique-content ul,
.historique-content ol {
    padding-left: 25px;
    margin-bottom: 20px;
}

.historique-content li {
    color: #334155;
    line-height: 1.8;
    margin-bottom: 6px;
}

/* IMAGES */
.historique-content img {
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    margin-bottom: 20px;
}

/* RETOUR HAUT */
.historique-content a[href="#"] {
    display: inline-block;
    background: #198754;
    color: white !important;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    text-decoration: none;
    transition: 0.3s;
}

.historique-content a[href="#"]:hover {
    background: #145c32;
    transform: translateY(-3px);
}

/* ANIMATION */
.historique-wrapper {
    animation: fadeHistorique 0.8s ease;
}

@keyframes fadeHistorique {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */
@media(max-width: 992px){

    .historique-sidebar {
        border-right: none;
        border-bottom: 4px solid #198754;
    }

    .historique-content {
        padding: 25px;
    }

    .historique-content img {
        width: 100% !important;
        height: auto !important;
        float: none !important;
    }
}

/* =====================================================
   MOBILE FIX MENU + RESPONSIVE
===================================================== */

@media(max-width: 992px){

    /* spazio corretto */
    .side-principe{
        margin-bottom:20px;
    }

    /* hero */
    .principe-hero{
        min-height:35vh;
        padding:40px 15px;
    }

    .principe-hero h1{
        font-size:2rem;
        line-height:1.3;
    }

    .principe-hero p{
        font-size:1rem;
    }

    /* card body */
    .card-body{
        padding:1.2rem !important;
    }

    /* menu */
    .chapter-link{
        padding:15px;
    }

    .chapter-link h5{
        font-size:1rem;
    }

    /* immagini */
    .principe-image{
        width:100%;
        max-width:100%;
        height:auto;
    }

    img{
        max-width:100%;
        height:auto;
    }

    /* testi */
    .principe-text{
        font-size:1rem;
        line-height:1.8;
    }

}

/* MOBILE SMALL */
@media(max-width:576px){

    .principe-hero h1{
        font-size:1.7rem;
    }

    .principe-menu-header{
        padding:18px;
    }

    .chapter-number{
        font-size:.75rem;
    }

    .chapter-link h5{
        font-size:.95rem;
    }

    .principe-title{
        font-size:1.5rem;
    }
}


/* =====================================================
   FIX NAVBAR PUBLIC
===================================================== */

main{
    padding-top: 90px;
}

/* MOBILE */
@media(max-width:992px){

    main{
        padding-top: 110px;
    }

    /* menu mobile */
    .navbar-collapse{
        background: linear-gradient(180deg, #198754, #0d6efd);
        padding: 20px;
        border-radius: 0 0 16px 16px;
        margin-top: 10px;
        box-shadow: 0 10px 25px rgba(0,0,0,.15);
    }

    .navbar-nav{
        gap: 10px;
    }

    .navbar .nav-link{
        padding: 12px 15px;
        border-radius: 10px;
    }

    .navbar .nav-link:hover{
        background: rgba(255,255,255,.15);
    }

    .dropdown-menu{
        background: rgba(255,255,255,.08);
        border: none;
        box-shadow: none;
    }

    .dropdown-item{
        color: white;
    }

    .dropdown-item:hover{
        background: rgba(255,255,255,.15);
    }
}

.profile-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #198754;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: 0.3s;
}

.profile-img:hover {
    transform: scale(1.1);
}

