/* ===== STYLE DLA STRONY BIP ===== */
.bip-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.bip-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #013160 0%, #0056b3 100%);
    color: white;
    border-radius: 12px;
    /* box-shadow: 0 4px 20px rgba(1, 49, 96, 0.3); */
}

.bip-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.bip-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

.bip-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    /* box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08); */   
    /* border-left: 4px solid #013160; */
}

.bip-section h2 {
    color: #013160;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    /* border-bottom: 2px solid #e9ecef; */
}

.bip-info p, .bip-contact p {
    margin: 0.8rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

.bip-info strong, .bip-contact strong {
    color: #013160;
    font-weight: 600;
    min-width: 120px;
    display: inline-block;
}

.bip-structure ul, .bip-documents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bip-structure li, .bip-documents li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #f1f3f4;
    font-size: 1rem;
    line-height: 1.5;
}

.bip-structure li:last-child, .bip-documents li:last-child {
    border-bottom: none;
}

.bip-documents a {
    color: #013160;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.bip-documents a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.bip-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive design dla BIP */
@media (max-width: 768px) {
    .bip-container {
        padding: 1rem;
    }
    
    .bip-header {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .bip-header h1 {
        font-size: 2rem;
    }
    
    .bip-header p {
        font-size: 1rem;
    }
    
    .bip-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .bip-info strong, .bip-contact strong {
        min-width: auto;
        display: block;
        margin-bottom: 0.3rem;
    }
}

/* ===== SUBDOMAIN NAVBAR STYLES ===== */

/* ZOL Navbar - announcement bar positioning */
#zolNav .announcement-bar {
    position: absolute !important;
    top: -45px !important;
    left: 0 !important;
    right: 0 !important;
    height: 45px !important;
    z-index: 1030;
}

/* BIP Navbar - announcement bar positioning */
#bipNav .announcement-bar {
    position: absolute !important;
    top: -45px !important;
    left: 0 !important;
    right: 0 !important;
    height: 45px !important;
    z-index: 1030;
}

/* WCAG Panel positioning for subdomains */
#zol-wcag-panel, #bip-wcag-panel {
    position: fixed !important;
    top: 0; /* Będzie ustawiane dynamicznie przez JavaScript */
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    z-index: 10999 !important;
    opacity: 1;
    visibility: visible;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out;
    padding-bottom: 0px;
}

#zol-wcag-panel.active, #bip-wcag-panel.active {
    max-height: 500px;
}

/* ===== NAVBAR SCROLLED STYLES FOR ZOL AND BIP ===== */

/* ZOL Navbar Scrolled Styles */
#zolNav.navbar-scrolled {
    background: rgba(248, 249, 250, 0.98) !important;
    padding: 0.5rem 0 !important;
}

#zolNav.navbar-scrolled .navbar-brand,
#zolNav.navbar-scrolled .nav-link {
    color: #1e3a8a !important;
}

#zolNav.navbar-scrolled .navbar-ai-btn {
    background-color: #1e3a8a !important;
    color: white !important;
    border: 1px solid #1e3a8a !important;
}

#zolNav.navbar-scrolled .navbar-play-btn {
    background-color: rgba(30, 58, 138, 0.1) !important;
    color: #1e3a8a !important;
    border: 1px solid #1e3a8a !important;
}

#zolNav.navbar-scrolled .btn {
    background-color: rgba(30, 58, 138, 0.1) !important;
    color: #1e3a8a !important;
    border: 1px solid rgba(30, 58, 138, 0.3) !important;
}

#zolNav.navbar-scrolled .navbar-wcag-btn-mobile {
    background-color: rgba(30, 58, 138, 0.1) !important;
    color: #1e3a8a !important;
    border: 1px solid rgba(30, 58, 138, 0.3) !important;
}

#zolNav .navbar-wcag-btn-desktop {
    margin-top: 1px;
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    border-radius: 35%;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    background-color: transparent;
    transition: all 0.3s ease-in-out;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#zolNav .wcag-menu {
    color: rgba(255, 255, 255, 0.9);
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 35%;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
}

#zolNav .wcag-menu:hover {
    color: rgba(221, 250, 0, 0.995);
    width: 28px;
    border-radius: 35%;
}

#zolNav .navbar-wcag-btn-desktop:hover {
    border-color: rgba(255, 255, 255, 0.8);
    color: rgba(255, 255, 255, 1);
}

#zolNav.navbar-scrolled .navbar-wcag-btn-desktop {
    border-color: rgba(1, 49, 96, 0.5);
    color: rgba(1, 49, 96, 0.9) !important;
}

#zolNav.navbar-scrolled .navbar-wcag-btn-desktop:hover {
    border-color: rgba(1, 49, 96, 0.8);
    color: rgba(1, 49, 96, 1);
}

#zolNav.navbar-scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2830, 58, 138, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

#zolNav.navbar-scrolled .announcement-bar {
    opacity: 0;
    visibility: hidden;
}

#zolNav {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

/* ZOL Logo switching - będzie obsługiwane przez JavaScript */
#zolNav #logo-zol,
#zolNav #logo-kpo {
    transition: opacity 0.3s ease;
}

/* ZOL Navbar Home Link */
#zolNav .navbar-home-link {
    background-color: rgba(255,255,255,0.1) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    font-size: 0.6rem !important;
}

#zolNav.navbar-scrolled .navbar-home-link {
    background-color: rgba(30, 58, 138, 0.1) !important;
    color: #1e3a8a !important;
    border: 1px solid rgba(30, 58, 138, 0.3) !important;
}

#bipNav {
    background: linear-gradient(135deg, #bf0013 40%, #011840 80%);
}

/* BIP Navbar Home Link */
#bipNav .navbar-home-link {
    background-color: rgba(255,255,255,0.1) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    font-size: 0.6rem !important;
}

#bipNav.navbar-scrolled .navbar-home-link {
    background-color: rgba(55, 65, 81, 0.1) !important;
    color: #374151 !important;
    border: 1px solid rgba(55, 65, 81, 0.3) !important;
}

/* BIP Logo - biały w obu stanach */
#bipNav #bip-logo .cls-1 {
    fill: #ffffff !important;
}

#bipNav.navbar-scrolled #bip-logo .cls-1 {
    fill: #bf0013 !important;
}

/* BIP Navbar Scrolled Styles */
#bipNav.navbar-scrolled {
    background: rgba(248, 249, 250, 0.98) !important;
    padding: 0.5rem 0 !important;
}

#bipNav.navbar-scrolled .navbar-brand,
#bipNav.navbar-scrolled .nav-link {
    color: #374151 !important;
}

#bipNav.navbar-scrolled .navbar-ai-btn {
    background-color: #374151 !important;
    color: white !important;
    border: 1px solid #374151 !important;
}

#bipNav.navbar-scrolled .navbar-play-btn {
    background-color: rgba(55, 65, 81, 0.1) !important;
    color: #374151 !important;
    border: 1px solid #374151 !important;
}

#bipNav.navbar-scrolled .btn {
    background-color: rgba(55, 65, 81, 0.1) !important;
    color: #374151 !important;
    border: 1px solid rgba(55, 65, 81, 0.3) !important;
}

#bipNav.navbar-scrolled .navbar-wcag-btn-mobile {
    background-color: rgba(55, 65, 81, 0.1) !important;
    color: #374151 !important;
    border: 1px solid rgba(55, 65, 81, 0.3) !important;
}

#bipNav.navbar-scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2855, 65, 81, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

#bipNav.navbar-scrolled .announcement-bar {
    opacity: 0;
    visibility: hidden;
}

#bipNav .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

#bipNav .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 1) !important;
}

#bipNav .navbar-nav .nav-link.active {
    color: rgba(255, 255, 255, 1) !important;
    font-weight: 500 !important;
}

#bipNav.navbar-scrolled .navbar-nav .nav-link {
    color: rgba(220, 53, 69, 0.8) !important;
}

#bipNav.navbar-scrolled .navbar-nav .nav-link:hover {
    color: #90151c !important;
}

#bipNav.navbar-scrolled .navbar-nav .nav-link.active {
    color: #252627 !important;
    font-weight: 500 !important;
}


/* ===== FOOTER STYLES - BIP I ZOL ===== */

/* BIP Footer Styles */
footer.bip-footer {
    background: linear-gradient(-135deg, #c60700 0%, #051e42 100%) !important;
}

.bip-footer .footer-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 20px !important;
    background: linear-gradient(to bottom, rgba(248, 249, 250, 0.05) 0%, transparent 100%) !important;
    pointer-events: none !important;
}

.bip-footer .footer-container {
    position: relative;
    z-index: 1;
}

.bip-footer .footer-row {
    position: relative;
}

.bip-footer .footer-left-column {
    margin-left: 10%;
    margin-right: 10%;
}

.bip-footer .footer-section {
    padding-right: 20px;
}

.bip-footer .footer-section-title {
    font-size: 0.875rem;
    color: #fbbf24;
}

.bip-footer .footer-content {
    font-size: 0.75rem;
}

.bip-footer .footer-icon {
    font-size: 0.7rem;
    color: #9ca3af;
}

.bip-footer .footer-right-column {
    position: relative;
}

.bip-footer .footer-mobile-divider {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.bip-footer .footer-links-section {
    margin-left: 20%;
}

.bip-footer .footer-logo {
    position: absolute;
    bottom: 5px;
    right: 40px;
}

.bip-footer .footer-logo svg {
    height: 30px;
    width: auto;
}

.bip-footer .footer-copyright {
    font-size: 0.5rem;
}

.bip-footer .footer-bottom-text {
    font-size: 0.65rem;
}

/* BIP Metrics Section */
.bip-metrics-section {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.bip-metrics {
    padding: 10px 0;
}

.bip-metrics .metrics-content {
    font-size: 0.675rem;
    color: #6b7280;
    font-family: 'IBM Plex Sans', sans-serif;
}

.bip-metrics .metric-icon {
    color: #9ca3af;
}

/* ZOL Footer Styles */
footer.zol-footer {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
}

.zol-footer .footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(248, 249, 250, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

.zol-footer .footer-container {
    position: relative;
    z-index: 1;
}

.zol-footer .footer-row {
    position: relative;
}

.zol-footer .footer-left-column {
    margin-left: 10%;
    margin-right: 10%;
}

.zol-footer .footer-section {
    padding-right: 20px;
}

.zol-footer .footer-section-title {
    font-size: 0.875rem;
    color: #fbbf24;
}

.zol-footer .footer-content {
    font-size: 0.75rem;
}

.zol-footer .footer-icon {
    font-size: 0.7rem;
    color: #9ca3af;
}

.zol-footer .footer-right-column {
    position: relative;
}

.zol-footer .footer-mobile-divider {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.zol-footer .footer-links-section {
    margin-left: 20%;
}

.zol-footer .footer-logo {
    position: absolute;
    bottom: 5px;
    right: 40px;
}

.zol-footer .footer-logo i {
    font-size: 60px;
    color: rgba(251, 191, 36, 0.3);
}

.zol-footer .footer-copyright {
    font-size: 0.5rem;
}

.zol-footer .footer-bottom-text {
    font-size: 0.65rem;
}

/* Responsive Footer Styles */
@media (max-width: 768px) {
    .bip-footer .footer-left-column,
    .zol-footer .footer-left-column {
        margin-left: 5%;
        margin-right: 5%;
    }
    
    .bip-footer .footer-links-section,
    .zol-footer .footer-links-section {
        margin-left: 10%;
    }
    
    .bip-footer .footer-logo,
    .zol-footer .footer-logo {
        right: 20px;
    }
}

.bipicon {
    color: rgba(255, 255, 255, 0.5);
    position: relative;
    top: 1px;
    width: 15px;
    text-decoration: none !important;
}

.zolicon {
    color: rgba(255, 255, 255, 0.5);
    position: relative;
    top: 1px;
    width: 15px;
    text-decoration: none !important;
}

/* ===== BIP SIDEBAR STYLES ===== */

.bip-main-container {
    margin-top: 00px; /* Wysokość navbar */
    min-height: calc(100vh - 160px); /* Odejmij wysokość navbar i footer */
}

.bip-sidebar-column {
    padding: 0 15px 0 0;
    position: relative;
    
}

.bip-sidebar {
    background: linear-gradient(to bottom, 
        rgba(220, 53, 69, 0.12) 0%, 
        rgba(220, 53, 69, 0.08) 15%, 
        rgba(220, 53, 69, 0.04) 20%, 
        #f8f9fa 50%, 
        #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 4px;
    height: fit-content;
    overflow-y: auto;
    width: 100%;
    padding: 0;
    margin-bottom: 1rem;
    position: relative;
}

.bip-main-content {
    padding-left: 0;
    padding-right: 0;
}

.bip-sidebar-header {
    padding: 1rem;
    background: transparent;
    color: #495057;
    border-bottom: 1px solid rgba(222, 226, 230, 0.5);
}

.bip-sidebar-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

.bip-sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.bip-sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.bip-sidebar-content {
    padding: 0;
}

.bip-sidebar-nav {
    padding: 0;
}

.bip-sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bip-sidebar-item {
    position: relative;
    border-bottom: 1px solid #e9ecef;
}

.bip-sidebar-item:last-child {
    border-bottom: none;
}

.bip-sidebar-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.bip-sidebar-link:hover {
    background-color: #e9ecef;
    color: #212529;
    text-decoration: none;
}

.bip-sidebar-link.active {
    background-color: #dee2e6;
    color: #550000;
    font-weight: 500;
}

.bip-sidebar-home {
    background-color: #44000062;
    border-bottom: 1px solid #dee2e6;
}

.bip-sidebar-home .bip-sidebar-link {
    color: #ffffff;
    font-weight: 500;
}

.bip-sidebar-home:hover .bip-sidebar-link {
    color: #ff0000;
    background-color: #ffffffdd;
    font-weight: 500;
}

.bip-sidebar-separator {
    height: 1px;
    background: #dee2e6;
    margin: 0.5rem 0;
}

.bip-sidebar-expand {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.7rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
    z-index: 10;
    width: 20px;
    height: 20px;
    text-align: center;
    border-radius: 8px;
}

.bip-sidebar-expand:hover {
    background-color: #00000033;
    color: #ffffff;
}

.bip-sidebar-item.expanded .bip-sidebar-expand i {
    transform: rotate(90deg);
}

.bip-sidebar-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.bip-sidebar-item.expanded .bip-sidebar-submenu {
    max-height: 500px;
}

.bip-sidebar-submenu .bip-sidebar-item {
    border-bottom: 1px solid #dee2e6;
}

.bip-sidebar-submenu .bip-sidebar-link {
    padding-left: 2rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.bip-sidebar-submenu .bip-sidebar-link:hover {
    background-color: #e9ecef;
    color: #495057;
}

.bip-sidebar-submenu .bip-sidebar-item:last-child {
    border-bottom: none;
}

/* Poziomy zagnieżdżenia */
.bip-sidebar-item.level-1 .bip-sidebar-link {
    padding-left: 2.5rem;
}

.bip-sidebar-item.level-2 .bip-sidebar-link {
    padding-left: 3rem;
}

.bip-sidebar-item.level-3 .bip-sidebar-link {
    padding-left: 3.5rem;
}

/* Sidebar tylko na desktop - mobile ukryty przez d-none d-lg-block */

.bip-main-container .layblock[data-color="blue"] .layblock-icon,
.bip-main-container .layblock[data-color="orange"] .layblock-icon,
.bip-main-container .layblock[data-color="teal"] .layblock-icon,
.bip-main-container .layblock[data-color="purple"] .layblock-icon,
.bip-main-container .layblock[data-color="green"] .layblock-icon,
.bip-main-container .layblock .layblock-icon {
    color: #9700009b !important;
    mix-blend-mode: normal !important;
}

.bip-main-container .layblock a {
    color: #970000 !important;
}

.bip-main-container .content-section-alternate {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 2.5rem 0;
    padding-left: 0px;
    position: relative;
    color: #040e28;
}

/* Tło na pełną szerokość za pomocą pseudo-elementu */
.bip-main-container .content-section-alternate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: linear-gradient(135deg, #ffd4d1 0%, #f5e9e9 100%);
    z-index: -1;
}

/* Prosty biały tekst w ciemnych sekcjach */
/* .content-section-alternate * {
    color: #040e28;
} */

/* Kontener dla treści w alternujących sekcjach */
.bip-main-container .content-section-alternate .container {
    margin: 0 auto;
    padding: 0;
}

/* ===== STYLE DLA CZERWONYCH GRADIENTÓW BIP ===== */
.card-img-top-link:hover .random-gradient-fallback .rg-bg-gradient,
.card-img-top-link:hover .random-gradient-fallback .rg-blob {
    display: none !important;
}

.card-img-top-link:hover .random-gradient-fallback .rg-noise-top {
    opacity: 0.55 !important;
    mix-blend-mode: normal !important;
}

.card-img-top-link:hover .card-img-fallback {
    background: white !important;
    transition: background 0.4s ease;
}

.card-img-top-link:hover .card-img-fallback img[alt="Logo KCZ"] {
    filter: invert(1) contrast(1.1);
    transition: filter 0.4s ease;
}

.card-img-top-link:hover .card-img-fallback .fallback-caption {
    color: #8B0000 !important;
    opacity: 0.9 !important;
    transition: color 0.4s ease, opacity 0.4s ease;
}