﻿/* Dark theme navigation fixes */
.dark-theme .navbar-toggler {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.dark-theme .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(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.dark-theme .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

    .dark-theme .nav-link:hover {
        color: #ffffff !important;
    }

.dark-theme .dropdown-toggle {
    color: #ffffff !important;
}

    .dark-theme .dropdown-toggle::after {
        color: #ffffff !important;
    }

/* For Bootstrap navbar brand text */
.dark-theme .navbar-brand {
    color: #ffffff !important;
}

.dark-theme .navbar-text {
    color: rgba(255, 255, 255, 0.8) !important;
}


.nav-item .nav-link.active {
    font-weight: bold;
    color: #0d6efd !important; /* Bootstrap primary blue */
    border-bottom: 3px solid #0d6efd;
    padding-bottom: 2px;
}

/* Hover effect for non-active links */
.nav-item .nav-link:not(.active):hover {
    font-weight: 500;
}


/* ===== HEADER SPACING ===== */

/* Allow full image height */
.navbar {
    padding-top: 5.5rem !important; /* Space from browser top */
    padding-bottom: 0.75rem !important;
    min-height: auto !important; /* Remove fixed min-height */
    overflow: visible !important; /* Ensure navbar doesn't clip content */
    border-bottom: none !important;
    position: sticky;
    top: 0;
    z-index: 1050;
    background: var(--bs-body-bg) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-mobile {
    visibility: collapse !important;
    display: none !important;
}

.navbar-collapse {
    background: var(--bs-body-bg);
    padding: 1rem;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Don't constrain the image */
.navbar .d-flex img {
    margin-right: 1rem;
    max-height: 102px !important; /* Set maximum height */
    width: auto !important;
    height: auto !important;
}

/* Add extra spacing around the logo container */
.navbar .container-fluid {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}



/* Mobile responsiveness */
@media (max-width: 991.98px) {
    .navbar {
        min-height: 60px;
    }

    .navbar-mobile {
        visibility: visible;
    }

    .navbar .d-flex img {
        max-height: 80px !important; /* Set maximum height Smaller on mobile */
        width: auto !important;
        height: auto !important;
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 1040;
        padding: 1rem;
    }

    /* Ensure the toggle button and logo always stay visible */
    .navbar .container-fluid > .d-flex:first-child {
        position: sticky;
        top: 0;
        z-index: 1050;
        background: var(--bs-body-bg);
        padding: 0.5rem 0;
    }

    /* Adjust logo size for mobile */
    .navbar .d-flex img {
        max-width: 120px !important;
        height: auto !important;
    }

    /* Fix for the menu items */
    .navbar-nav {
        padding: 0.5rem 0;
    }

    .nav-item {
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

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

/* Remove the border from BlazorBootstrap's top row */
.bb-top-row {
    border-bottom: none !important;
    /* Or change its style */
    /* border-bottom: 1px solid rgba(0,0,0,0.08) !important; */
}


/* ===== CONTENT SECTION SPACING ===== */

/* Add top padding to the main content */
.content-wrapper {
    padding-top: 4rem !important; /* Space between header and content */
    padding-bottom: 1rem !important;
}

/* If you want to target the ContentSection directly */
.content-section {
    padding-top: 2rem !important;
    padding-bottom: 1rem !important;
}


#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Blazor startup loading screen */
.loading-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3.5rem;
    height: 3.5rem;
    transform: translate(-50%, -50%);
}

    .loading-progress circle {
        fill: none;
        stroke-width: 0.25rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:first-child {
            stroke: #e0e0e0;
        }

        .loading-progress circle:last-child {
            stroke: #0d6efd;
            stroke-linecap: round;
            stroke-dasharray: 80%, 100%;
            animation: loading-progress 1.5s linear infinite;
        }

.loading-progress-text {
    position: absolute;
    top: calc(50% + 3rem);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #666;
}

    .loading-progress-text:after {
        content: "Wczytywanie...";
    }

@keyframes loading-progress {
    0% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(270deg);
    }
}

.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

    .blog-content h1,
    .blog-content h2,
    .blog-content h3 {
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    .blog-content h2 {
        font-size: 1.8rem;
        border-bottom: 2px solid #e9ecef;
        padding-bottom: 0.5rem;
    }

    .blog-content h3 {
        font-size: 1.4rem;
    }

    .blog-content p {
        margin-bottom: 1.2rem;
    }

    .blog-content ul,
    .blog-content ol {
        margin-bottom: 1.2rem;
        padding-left: 2rem;
    }

    .blog-content li {
        margin-bottom: 0.5rem;
    }

    .blog-content a {
        color: #0d6efd;
        text-decoration: underline;
    }

    .blog-content img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        margin: 1.5rem 0;
    }

    .blog-content blockquote {
        border-left: 4px solid #0d6efd;
        padding-left: 1.5rem;
        margin: 1.5rem 0;
        font-style: italic;
        background-color: #f8f9fa;
        padding: 1rem 1.5rem;
        border-radius: 4px;
    }