/* Style dla menu z rozwijanym podmenu */
.menu-item {
    position: relative;
    list-style: none;
}

.menu-item.has-children > .menu-item-content:after {
    content: '▼';
    margin-left: 8px;
    font-size: 10px;
    opacity: 0.7;
}

.children {
    display: none;
    padding-left: 20px;
    margin-left: 10px;
    border-left: 2px solid #000000;
}

.menu-item:hover > .children,
.children:hover {
    display: block !important;
}

.menu-item-content {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.menu-item-content:hover {
    background-color: #000000;
}

.menu-item-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.menu-item:hover .menu-item-actions {
    opacity: 1;
}

/* =========================================================
   MENU GŁÓWNE – styl podstawowy (pierwszy poziom)
   ========================================================= */

.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.navbar.navbar-scrolled {
    background-color: #ffffff;
    border-radius: 0 0 0.75rem 0.75rem;
    margin: 0 0.5rem;
}

.navbar .navbar-brand {
    font-weight: 600;
    color: #000000;
}

.navbar .nav-link {
    color: #212529;
    font-weight: 500;
    padding: 0.75rem 1.1rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #000000;
    background-color: #f8f9fa;
}

.navbar .nav-link.active {
    color: #000000;
    font-weight: 600;
    border-bottom: 2px solid #000000;
}

/* Strzałka przy dropdown */
.navbar .dropdown-toggle::after {
    border-top: 0.35em solid;
    opacity: 0.6;
}

/* =========================================================
   SUBMENU – dropdown (drugi poziom)
   ========================================================= */

.navbar .dropdown-menu {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.4rem;
    padding: 0.4rem 0;
    margin-top: 0.4rem;
    min-width: 14rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.navbar .dropdown-item {
    position: relative;
    color: #212529;
    font-size: 0.95rem;
    padding: 0.6rem 1.4rem;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: #f8f9fa;
    color: #000000;
    padding-left: 1.8rem;
}

/* Akcent po lewej stronie submenu */
.navbar .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: #000000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.navbar .dropdown-item:hover::before,
.navbar .dropdown-item:focus::before {
    opacity: 1;
}

.navbar .dropdown-item.active {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Divider w submenu */
.navbar .dropdown-divider {
    margin: 0.4rem 0;
    border-top: 1px solid #e9ecef;
}

/* =========================================================
   RESPONSYWNOŚĆ – mobile
   ========================================================= */

@media (max-width: 991.98px) {

    .navbar .nav-link {
        padding: 0.6rem 1rem;
    }

    .navbar .dropdown-menu {
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin-top: 0;
        padding: 0;
    }

    .navbar .dropdown-item {
        padding: 0.6rem 1.5rem;
    }

    .navbar .dropdown-item:hover,
    .navbar .dropdown-item:focus {
        background-color: transparent;
        padding-left: 1.5rem;
    }

    .navbar .dropdown-item::before {
        display: none;
    }
}

/* Dodatkowe style dla GrobNet - uzupełniają Bootstrap 5 */

/* Style dla rozwijanego menu */
.menu-item {
    position: relative;
    list-style: none;
}

.menu-item.has-children > .menu-item-content {
    position: relative;
}

.menu-item.has-children > .menu-item-content:after {
    content: '▼';
    margin-left: 8px;
    font-size: 10px;
    opacity: 0.7;
}

.children {
    display: none;
    padding-left: 20px;
    margin-left: 10px;
    border-left: 2px solid #e9ecef;
}

.menu-item:hover > .children,
.children:hover {
    display: block !important;
}

.menu-item-content {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
    text-decoration: none;
    color: #212529;
}

.menu-item-content:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.menu-item-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.menu-item:hover .menu-item-actions {
    opacity: 1;
}

/* Własne style dla lepszego wyglądu */
.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Animacje */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

/* Własne kolory dla badge */
.badge-purple {
    background-color: #8b5cf6;
}

/* Responsywność dla navbar */
@media (max-width: 991px) {
    .navbar-nav {
        margin-top: 1rem;
    }
}

/* Lepsze odstępy dla formularzy */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Stylowanie input-group */
.input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: 1px solid #86b7fe;
}

/* Lepsze wyświetlanie komentarzy */
.comments-list .card {
    border-left: 3px solid #0d6efd;
}

/* Animacje dla alertów */
.alert {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lepsze wyświetlanie statystyk */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

/* Stylowanie tabel */
.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Responsywność dla kart */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Lepsze wyświetlanie list */
.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
}

/* Stylowanie footer */
footer {
    margin-top: auto;
}

/* Lepsze odstępy */
.mb-section {
    margin-bottom: 3rem;
}

/* Ikony w navbar */
.navbar-brand i {
    margin-right: 0.5rem;
}

/* Stylowanie dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Lepsze wyświetlanie formularzy */
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Stylowanie switch */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Lepsze wyświetlanie badge */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Animacje dla przycisków */
.btn {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Stylowanie kart statystyk */
.card.border-primary,
.card.border-success,
.card.border-info,
.card.border-warning {
    border-width: 2px !important;
}

/* Lepsze wyświetlanie postów */
.post-view article {
    border-radius: 0.5rem;
}

/* Stylowanie komentarzy */
.comment-item {
    border-left: 3px solid #0d6efd;
    padding-left: 1rem;
}

/* Responsywność dla hero */
@media (max-width: 576px) {
    .display-4 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}
