*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

*:focus,
*:focus-visible {
    outline: none !important;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: 2px solid #7cb342 !important;
    outline-offset: 2px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f0;
    color: #333;
    min-height: 100vh;
}

body > * {
    transition: opacity 0.1s ease-in-out;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100%;
}

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-top {
    background: linear-gradient(to right, #2d5016 0%, #7cb342 100%);
    border-bottom: 3px solid #7cb342;
    position: relative;
    overflow: hidden;
}

.header-top::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-image: url('../images/tlo.jpg?v=3');
    background-size: cover;
    background-position: right center;
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.header-container {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 60px;
    width: auto;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.logo-subtext {
    font-size: 0.95rem;
    font-weight: 500;
    color: #c5e1a5;
    line-height: 1.2;
}

.slogan {
    display: none;
    color: #c5e1a5;
    font-style: italic;
    font-size: 0.95rem;
    margin-left: auto;
}

.header-info {
    display: none;
}

.nav-main {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: #7cb342;
    border: none;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 6px;
    transition: background 0.2s;
    z-index: 10;
}

.hamburger:hover {
    background: #689f38;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
}

.mobile-login-btn {
    background: #7cb342;
    color: #fff;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
    z-index: 10;
    border: none;
}

.mobile-login-btn:hover {
    background: #689f38;
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
}

.nav-overlay.otwarte {
    display: block;
}

.nav-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: #fff;
    overflow-y: auto;
    z-index: 1999;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
}

.nav-menu.otwarte {
    left: 0;
}

.nav-menu-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2d5016;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nav-menu-close:hover {
    background: #3d6b1e;
}

.nav-item {
    border-bottom: 1px solid #e8e8e8;
}

.nav-item > a,
.nav-item > .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    color: #2d5016;
    font-size: 1.05rem;
    font-weight: 600;
    background-color: #fff;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.nav-item > a:hover,
.nav-item > .nav-link:hover {
    background-color: #e8f5e9;
}

.nav-item > a.active {
    background-color: #c8e6c9;
    color: #1b5e20;
}

.dropdown-arrow {
    font-size: 0.55rem;
    margin-left: 8px;
    display: inline-block;
    transform: rotateX(180deg);
    transition: transform 0.3s ease;
}

.has-dropdown.otwarte .dropdown-arrow {
    transform: rotateX(0deg);
}

.has-dropdown.otwarte > .nav-link {
    background-color: #e8f5e9;
    color: #2d5016;
}

.dropdown-menu {
    display: none;
    background-color: #fafafa;
}

.has-dropdown.otwarte > .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 14px 20px 14px 35px;
    color: #444;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid #eee;
    transition: background 0.2s, color 0.2s;
    background-color: #fafafa;
    text-align: left;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover,
.dropdown-menu li a.active {
    background-color: #e8f5e9;
    color: #2d5016;
}

.dropdown-divider {
    border-top: 1px solid #e0e0e0;
    margin: 0;
}

.kontakt-info {
    padding: 15px 20px 15px 35px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.8;
    background-color: #fafafa;
}

.kontakt-info strong {
    color: #2d5016;
}

.nav-login {
    display: none;
}

.desktop-only {
    display: none;
}

.main-content {
    flex: 1;
    padding: 25px 15px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    min-height: 700px;
}

.footer {
    background: linear-gradient(135deg, #5d4037 0%, #6d4c41 100%);
    color: #fff;
    padding: 6px 15px 4px;
    margin-top: auto;
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

body.blazor-loaded .footer {
    opacity: 1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    font-size: 0.7rem;
    color: #e0e0e0;
    text-align: center;
}

.footer-item {
    white-space: nowrap;
}

.footer-item strong {
    color: #c5e1a5;
}

.footer-separator {
    display: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
    font-size: 0.6rem;
    color: #bdbdbd;
}

@media (min-width: 1024px) {
    .header-container {
        padding: 15px 40px;
    }

    .logo-img {
        height: 100px;
    }

    .logo-text {
        font-size: 1.8rem;
    }

    .logo-subtext {
        font-size: 1.3rem;
    }

    .slogan {
        display: block;
    }

    .header-info {
        display: flex;
        flex-direction: column;
        margin-left: auto;
        text-align: right;
        position: relative;
        z-index: 10;
    }

    .info-line {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-size: 1.15rem;
        font-weight: 600;
        color: #f5f5f5;
        line-height: 1.4;
    }

    .hamburger {
        display: none;
    }

    .mobile-login-btn {
        display: none;
    }

    .nav-overlay {
        display: none !important;
    }

    .nav-container {
        padding: 0 40px;
        justify-content: center;
    }

    .nav-menu {
        position: static;
        left: auto;
        width: auto;
        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        background: transparent;
        overflow: visible;
        gap: 8px;
        padding: 10px 0;
        box-shadow: none;
    }

    .nav-menu-close {
        display: none;
    }

    .nav-item {
        position: relative;
        border-bottom: none;
    }

    .nav-item > a,
    .nav-item > .nav-link {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 8px 16px !important;
        font-size: 0.95rem !important;
        background-color: #f8f8f6 !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 5px !important;
        font-weight: 500 !important;
        color: #333 !important;
        transition: background-color 0.2s, color 0.2s, border-color 0.2s !important;
    }

    .nav-item > a:hover,
    .nav-item > .nav-link:hover {
        background-color: #7cb342 !important;
        border-color: #7cb342 !important;
        color: #fff !important;
    }

    .nav-item > a.active {
        background-color: #c8e6c9 !important;
        border-color: #c8e6c9 !important;
        color: #1b5e20 !important;
    }

    .dropdown-arrow {
        margin-left: 6px;
    }

    .has-dropdown {
        padding-bottom: 8px;
        margin-bottom: -8px;
    }

    .has-dropdown:hover .dropdown-arrow,
    .has-dropdown.otwarte .dropdown-arrow {
        transform: rotateX(0deg);
    }

    .has-dropdown:hover > .nav-link,
    .has-dropdown.otwarte > .nav-link {
        background-color: #7cb342 !important;
        border-color: #7cb342 !important;
        color: #fff !important;
    }

    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        min-width: 200px;
        background-color: #fff;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        border-radius: 5px;
        padding: 8px 0;
        z-index: 1000;
        border-top: 3px solid #7cb342;
    }

    .has-dropdown:hover > .dropdown-menu,
    .has-dropdown.otwarte > .dropdown-menu {
        display: block;
    }

    .nav-menu .dropdown-menu li {
        text-align: center;
    }

    .nav-menu .dropdown-menu li a {
        display: block;
        padding: 14px 20px;
        background-color: #fff;
        border-bottom: 1px solid #e0e0e0;
        font-size: 0.95rem;
        font-weight: 500;
        color: #333;
        text-align: center;
    }

    .nav-menu .dropdown-menu li:last-child a {
        border-bottom: none;
    }

    .nav-menu .dropdown-menu li a:hover {
        background-color: #e8f5e9;
        color: #2d5016;
    }

    .dropdown-kontakt {
        min-width: 260px;
        left: 50%;
        transform: translateX(-50%);
    }

    .kontakt-info {
        padding: 15px 20px;
        font-size: 0.9rem;
        text-align: left;
    }

    .nav-login {
        display: block;
        margin-left: auto;
    }

    .nav-login > a {
        background-color: #7cb342 !important;
        border-radius: 6px;
        padding: 10px 22px !important;
        color: #fff !important;
        font-weight: 600;
        border: none !important;
    }

    .nav-login > a:hover {
        background-color: #689f38 !important;
    }

    .desktop-only {
        display: block;
    }

    .main-content {
        padding: 50px 40px;
        min-height: 800px;
    }

    .footer {
        padding: 8px 40px 5px;
    }

    .footer-content {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }

    .footer-separator {
        display: inline;
        color: #7cb342;
        font-weight: bold;
    }
}
