/**
 * HEADER STYLES - ODŚWIEŻONA WERSJA
 * Style dla nagłówka strony z poprawioną pozycją logo
 * Zaktualizowana kolorystyka w schemacie niebieskim
 */

 header {
    color: #7a8ca0;
    margin: 0px auto;
    position: relative;
    z-index: 100;
    background-image: url(../../../images/greendark/header-bg.png);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: contain;
    background-color: rgba(0, 0, 0, 0.5);
    min-height: 900px;
    height: auto;
    padding-bottom: 50px;
}

/* Grafika logo-header.png - kontener dla logo */
header > .top:after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -174px; /* Połowa szerokości (348px / 2) - przesuwa w prawo o 2% */
    background-image: url(../../../images/greendark/logo-header.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    width: 348px;
    height: 165px;
    box-sizing: border-box;
    padding-top: 20px;
    text-align: center;
    z-index: 15;
    pointer-events: none; /* Grafika nie blokuje klików */
}

/* Logo CS-Pogrom - zawsze w tym samym miejscu względem logo-header.png */
header .logo img {
    position: absolute;
    z-index: 20;
    left: 50%;
    margin-left: -85px; /* Połowa szerokości logo (180px / 2) - to samo przesunięcie co :after */
    top: 25px; /* Odległość od góry - podniesione do góry */
    transition: opacity 0.5s ease-in-out;
    display: inline-block;
    max-width: 180px;
    height: auto;
}

header .logo img:hover {
    opacity: 0.7;
}

/* Footer logo - taka sama logika */
footer .site-logo img {
    position: absolute;
    z-index: 20;
    left: 50%;
    margin-left: -90px;
    transition: opacity 0.5s ease-in-out;
    display: inline-block;
    max-width: 180px;
    height: auto;
}

footer .site-logo img:hover {
    opacity: 0.7;
}

/* Menu główne */
header .top .menu {
    float: left;
    height: 100px;
    padding: 0px;
    margin: 0px;
    list-style: none;
}

header .top .menu > li {
    display: inline-block;
    height: 100px;
    box-sizing: border-box;
    margin: 0px 0px 0px 0px;
    position: relative;
    vertical-align: top;
    z-index: 5;
}

header .top .menu > li.submenu {
    padding: 0 20px;
}

/* Efekt podświetlenia menu - linia dolna */
header .top .menu > li:not(.submenu):after {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #00d4ff 50%, 
        transparent 100%);
    content: '';
    bottom: 0;
    opacity: 0;
    visibility: hidden;
    transition: .3s ease-in-out opacity;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Strzałka wskaźnika */
header .top .menu > li:not(.submenu):before {
    position: absolute;
    bottom: 0;
    height: 4px;
    left: 0;
    right: 0;
    text-align: center;
    line-height: 0;
    font-family: fontawesome;
    font-size: 16px;
    color: #00d4ff;
    content: '\f0d8';
    opacity: 0;
    visibility: hidden;
    transition: .3s ease-in-out opacity;
    filter: drop-shadow(0 0 5px rgba(0, 212, 255, 0.6));
}

header .top .menu > li:not(.submenu):hover:after,
header .top .menu > li:not(.submenu):hover:before,
header .top .menu > li.active:after,
header .top .menu > li.active:before {
    visibility: visible;
    opacity: 1;
}

header .top .menu:hover > li.active:after,
header .top .menu:hover > li.active:before {
    visibility: hidden;
    opacity: 0;
}

/* Submenu */
header .top .menu > li > ul {
    position: absolute;
    top: 99px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 90px;
    background: url(../../../images/greendark/submenu.png) no-repeat;
    background-size: 100% 100%;
    padding: 10px 20px 20px 20px;
    list-style: none;
    margin: 0;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s ease-in-out opacity;
}

header .top .menu > li:hover > ul {
    visibility: visible;
    opacity: 1;
}

/* Niebieska linia górna submenu */
header .top .menu > li > ul:before {
    height: 2px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #00d4ff 50%, 
        transparent 100%);
    content: '';
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Strzałka submenu */
header .top .menu > li > ul:after {
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    text-align: center;
    line-height: 0;
    font-family: fontawesome;
    font-size: 16px;
    color: #00d4ff;
    content: '\f0d8';
    filter: drop-shadow(0 0 5px rgba(0, 212, 255, 0.6));
}

header .top .menu > li > ul > li {
    display: block;
}

header .top .menu > li > ul > li a {
    font-weight: 400;
    font-size: 13px;
    height: 30px;
    display: block;
    line-height: 30px;
    color: #fff;
    transition: all 0.3s ease;
}

header .top .menu > li > ul > li a:before {
    content: '\f0da';
    margin-right: 10px;
    font-family: fontawesome;
    transition: all 0.3s ease;
}

header .top .menu > li > ul > li a:hover {
    font-weight: bold;
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

header .top .menu > li > ul > li a:hover:before {
    color: #00d4ff;
    margin-right: 15px;
}

header .top .menu > li > a {
    padding: 0 20px;
    display: block;
    box-sizing: border-box;
    height: 99px;
    vertical-align: top;
    line-height: 1;
}

/* Social media icons */
header .top .inline-media {
    position: absolute;
    top: 35px;
    left: 60%;
    width: 150px;
    z-index: 5;
}

header .top .inline-media > a {
    height: 25px;
    width: 25px;
    text-align: center;
    color: #ffffff;
    box-sizing: border-box;
    display: inline-block;
    margin-left: -4px;
    font-size: 10pt;
    margin-right: 7px;
    padding-top: 6px;
    line-height: 0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

header .top .inline-media > a.fb {
    background: linear-gradient(135deg, #3d599b 0%, #2d4373 100%);
}

header .top .inline-media > a.tw {
    background: linear-gradient(135deg, #00abee 0%, #0085bb 100%);
}

header .top .inline-media > a.gp {
    background: linear-gradient(135deg, #dc422b 0%, #b33623 100%);
}

header .top .inline-media > a.st {
    background: linear-gradient(135deg, #222222 0%, #111111 100%);
}

header .top .inline-media > a.yt {
    background: linear-gradient(135deg, #ff021e 0%, #cc0118 100%);
}

header .top .inline-media > a:last-child {
    margin-right: 0px;
}

header .top .inline-media > a:hover {
    transform: scale(1.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Nazwa strony w menu */
header .top .menu > li span.page-name {
    color: #ffffff;
    font-weight: bold;
    margin-left: 10px;
    line-height: 97px;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

header .top .menu > li:hover span.page-name {
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

/* Ikony menu */
.menu-icon {
    background: url(../../../images/greendark/iconmenu.png) no-repeat;
    float: left;
    display: block;
    position: relative;
    width: 21px;
    height: 20px;
    margin: 38px auto 0 auto;
    filter: drop-shadow(0 0 3px rgba(0, 212, 255, 0.3));
    transition: all 0.3s ease;
}

header .top .menu > li:hover .menu-icon {
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6));
}

.menu-icon--users {
    background-position: 0px -20px;
}

.menu-icon--amx-bans {
    background-position: 0px -40px;
}

.menu-icon--more {
    background-position: center -60px;
    padding-left: 20px;
    display: block;
    height: 100px;
}

/* Panel kontrolny użytkownika */
header .control-panel {
    width: 40%;
    float: right;
    padding-top: 29px;
    box-sizing: border-box;
}

header .control-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

header .control-panel nav > ul.user-panel {
    text-align: right;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

header .control-panel nav > ul.user-panel > li:not(.imp-menu),
.control-panel nav > ul.user-panel > li.imp-menu > ul > li {
    display: inline-block;
    font-size: 10.5pt;
    position: relative;
    vertical-align: top;
    line-height: 1;
    box-sizing: border-box;
    margin-left: 0;
    height: 50px;
    text-align: center;
    margin-right: 0;
    padding: 15px 7px;
    transition: all 0.3s ease;
}

header .control-panel nav > ul.user-panel > li:not(.imp-menu):hover {
    transform: translateY(-2px);
}

header .control-panel nav > ul.user-panel > li.imp-menu > ul > li > a {
    color: #0052a3;
    transition: all 0.3s ease;
}

header .control-panel nav > ul.user-panel > li.imp-menu > ul > li > a:hover {
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

header .control-panel nav > ul.user-panel > li.imp-menu {
    display: inline-block;
}

header .control-panel nav > ul.user-panel > li:last-child {
    margin-right: 0;
}

header .control-panel nav > ul.user-panel > li.user-menu > span {
    font-weight: bold;
    color: #ffffff;
}

header .control-panel nav > ul.user-panel > li > a,
header .control-panel nav > ul.user-panel > li.imp-menu > ul > li > a {
    color: #7a8ca0;
    transition: all 0.3s ease;
}

header .control-panel nav > ul.user-panel > li > a:hover,
header .control-panel nav > ul.user-panel > li > a:hover i,
header .control-panel nav > ul.user-panel > li:hover > span {
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

/* Licznik wiadomości */
header .control-panel nav > ul.user-panel > li .pms-value {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: #fff;
    display: block;
    height: 16px;
    padding: 2px 6px;
    vertical-align: top;
    font-size: 10px;
    font-weight: bold;
    line-height: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5);
}

header .control-panel nav > ul.user-panel > li .pms-value.value-0 {
    display: none;
}

header .control-panel nav > ul.user-panel > li .pms-value:before {
    font-family: fontawesome;
    display: inline-block;
    content: '\f0d8';
    position: absolute;
    color: #ff4444;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}

/* Avatar użytkownika */
header .control-panel nav > ul.user-panel > li.user-menu {
    position: relative;
    padding-left: 64px;
}

header .control-panel nav > ul.user-panel .avatar {
    height: 35px;
    width: 35px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 20px;
    display: inline-block;
    margin-top: -3px;
    vertical-align: middle;
    border: 2px solid rgba(0, 143, 255, 0.4);
    border-radius: 50%;
    transition: all 0.3s ease;
    object-fit: cover;
}

header .control-panel nav > ul.user-panel > li.user-menu:hover .avatar {
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

/* Przyciski logowania/rejestracji */

header .control-panel nav > ul.user-panel li.register a {
    font-size: 9.75pt;
    margin-top: -14px;
    font-weight: normal;
    height: 43px;
    line-height: 43px;
    padding: 0 20px;
    text-transform: uppercase;
    border-radius: 4px;
    color: #fff;
    display: inline-block;
    background: linear-gradient(135deg, 
        rgba(0, 82, 163, 1) 0%, 
        rgba(0, 143, 255, 0.9) 100%);
    border: 1px solid rgba(0, 143, 255, 0.5);
    box-shadow: 0 5px 15px rgba(0, 143, 255, 0.3);
    transition: all 0.3s ease;
}

header .control-panel nav > ul.user-panel li.register a:hover {
    background: linear-gradient(135deg, 
        rgba(0, 143, 255, 1) 0%, 
        rgba(0, 212, 255, 0.9) 100%);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

header .control-panel nav > ul.user-panel li.register a:before {
    content: '\f090';
    margin-right: 5px;
    font-family: fontawesome;
}

header .control-panel nav > ul.user-panel li.login span {
    font-size: 9.75pt;
    margin-top: -14px;
    font-weight: normal;
    height: 43px;
    line-height: 43px;
    padding: 0 20px;
    text-transform: uppercase;
    border-radius: 4px;
    color: #fff;
    display: inline-block;
    background: linear-gradient(135deg, 
        rgba(0, 82, 163, 1) 0%, 
        rgba(0, 143, 255, 0.9) 100%);
    border: 1px solid rgba(0, 143, 255, 0.5);
    box-shadow: 0 5px 15px rgba(0, 143, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

header .control-panel nav > ul.user-panel li.login span:hover {
    background: linear-gradient(135deg, 
        rgba(0, 143, 255, 1) 0%, 
        rgba(0, 212, 255, 0.9) 100%);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

header .control-panel nav > ul.user-panel li.login span:before {
    content: '\f084';
    margin-right: 5px;
    font-family: fontawesome;
}

/* Breadcrumbs i nawigacja dolna */
header .middle nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

header .middle nav ul.page {
    float: left;
    width: 60%;
    color: #7a8ca0;
}

header .middle nav ul.page i {
    vertical-align: middle;
    font-size: 10.5pt;
    margin-right: 5px;
    color: #00d4ff;
    filter: drop-shadow(0 0 3px rgba(0, 212, 255, 0.4));
}

header .middle nav ul.page > li {
    display: inline-block;
    max-width: 400px;
    margin-left: -3px;
    white-space: nowrap;
    overflow: hidden;
    height: 18px;
    vertical-align: middle;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 400;
    color: #7a8ca0;
    transition: color 0.3s ease;
}

header .middle nav ul.page > li:hover {
    color: #00d4ff;
}

header .middle nav ul.page > span {
    font-size: 10pt;
    padding-right: 10px;
}

header .middle nav ul.page > li:not(:first-of-type):before {
    content: '\f105';
    font-family: fontawesome;
    font-size: 10.5pt;
    padding: 0 8px;
    color: #00d4ff;
}

header .middle nav ul.user2 {
    float: right;
    width: 40%;
    text-align: right;
}

header .middle nav ul.user2 > li {
    display: inline-block;
    margin-right: 40px;
    color: #fff;
}

header .middle nav ul.user2 > li.read-all a:before {
    content: '\f129';
    color: #00d4ff;
    padding-right: 5px;
    font-family: fontawesome;
    vertical-align: middle;
    display: inline-block;
    filter: drop-shadow(0 0 3px rgba(0, 212, 255, 0.4));
}

header .middle nav ul.user2 > li.new-content a:before {
    content: '\f005';
    color: #00d4ff;
    padding-right: 5px;
    font-family: fontawesome;
    vertical-align: middle;
    display: inline-block;
    filter: drop-shadow(0 0 3px rgba(0, 212, 255, 0.4));
}

header .middle nav ul.user2 > li:last-child {
    margin-right: 0;
}

header .middle nav ul.user2 > li a {
    font-size: 10pt;
    vertical-align: middle;
    color: #7a8ca0;
    transition: all 0.3s ease;
}

header .middle nav ul.user2 > li a:hover {
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

/* Top section */
header > .top {
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 143, 255, 0.15);
    height: 100px;
    width: 100%;
    box-sizing: border-box;
    display: block;
    position: relative;
    z-index: 100;
}

header > .top .left {
    float: left;
    box-sizing: border-box;
}

header > .top .left h1 {
    font-size: 12pt;
    color: #7a8ca0;
    font-weight: normal;
}

/* Menu container */
header .menu-container {
    min-height: 48px;
    margin-top: 30px;
    z-index: 2;
}

header .menu-container .middle {
    padding: 17px 0;
}

header .menu-container .top {
    background-size: 100% 100%;
    height: 70px;
}

header .menu-container .top ul {
    margin: 0;
    padding: 0 0 0 10px;
    list-style: none;
}

header .menu-container .top ul li {
    display: inline-block;
    height: 70px;
    box-sizing: border-box;
    padding: 25px 20px;
    margin-right: 15px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.58);
    font-weight: 400;
    transition: all 0.3s ease;
}

header .menu-container .top ul li:hover {
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

header .menu-container .top ul li i {
    color: #00d4ff;
    margin-right: 3px;
    font-size: 12pt;
    filter: drop-shadow(0 0 3px rgba(0, 212, 255, 0.4));
}

header .menu-container .top ul li:last-child {
    margin-right: 0;
}

header .menu-container .top ul li a {
    font-size: 11.5pt;
    font-weight: 300;
    transition: all 0.3s ease;
}

header .menu-container .top ul li a:hover {
    color: #00d4ff;
}

/* Partners section */
header .partners.js-loaded {
    background: url(../../../images/greendark/partners-bg.png) no-repeat;
    background-position: center top;
    background-size: 100% 100%;
    height: 188px;
    box-sizing: border-box;
    padding: 82px 90px 0 90px;
    margin: 440px -30px 0 -30px;
    display: block;
}

header .partners:not(.js-loaded) {
    display: none;
}

/* Media queries dla urządzeń mobilnych */
@media (max-width: 768px) {
    /* Mobilny navbar - pozycja relative zamiast fixed, aby przewijał się z resztą strony */
    .mobile-menus-open {
        display: block;
        background: linear-gradient(135deg, 
            rgba(0, 82, 163, 0.9) 0%, 
            rgba(0, 143, 255, 0.7) 50%, 
            rgba(0, 212, 255, 0.5) 100%);
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
        height: 40px;
        padding: 12px;
        box-sizing: border-box;
    }

    /* Header zaczyna się normalnie, bez marginesu górnego */
    header {
        min-height: auto;
        height: auto;
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 30px;
        background-size: 180% auto;
        background-position: center top;
        background-origin: border-box;
        position: relative;
        z-index: 1;
    }

    /* Ukryj desktop navbar na mobile */
    header .top .menu,
    header .menu-container {
        display: none;
    }

    header > .top:after {
        width: 90%;
        max-width: 500px;
        height: auto;
        aspect-ratio: 348 / 165;
        margin-left: 50%;
        transform: translateX(-50%);
        padding-top: 0;
        top: 20px;
        z-index: 0;
        position: relative;
    }

    header .logo {
        text-align: center;
        position: relative;
        z-index: 1;
        margin-top: 10px;
    }

    header .logo img {
        max-width: 70%;
        width: auto;
        height: auto;
        position: relative;
        left: auto;
        margin-left: 0;
        top: 0;
        transform: none;
    }

    header > .top {
        height: auto;
        min-height: 80px;
        position: relative;
        z-index: 0;
        padding-top: 0;
    }

    header .top .inline-media {
        top: 25px;
        left: 55%;
        width: 120px;
    }

    header .top .inline-media > a {
        height: 20px;
        width: 20px;
        font-size: 9pt;
        margin-right: 5px;
    }

    header .control-panel {
        width: 50%;
        padding-top: 20px;
    }

    header .control-panel nav > ul.user-panel > li:not(.imp-menu),
    .control-panel nav > ul.user-panel > li.imp-menu > ul > li {
        height: 40px;
        padding: 10px 5px;
        margin-right: 8px;
        font-size: 9pt;
    }

    header .partners {
        height: 140px;
        padding: 60px 40px 0 40px;
        margin: 300px -20px 0 -20px;
    }
}

@media (max-width: 480px) {
    /* Tylko style specyficzne dla mniejszych ekranów - reszta dziedziczy z @media (max-width: 768px) */
    header {
        padding-bottom: 20px;
    }

    header > .top:after {
        width: 85%;
        max-width: 400px;
        top: 15px;
    }

    header .logo {
        margin-top: 5px;
    }

    header .logo img {
        max-width: 65%;
    }

    header > .top {
        min-height: 60px;
    }
}

/* Orientacja pozioma dla małych ekranów - nadpisuje wartości z @media (max-width: 480px) */
@media (max-width: 480px) and (orientation: landscape) {
    header > .top:after {
        width: 80%;
        max-width: 700px;
        top: 42px;
    }

    header > .top {
        height: 50px;
        min-height: 50px;
        max-height: 50px;
    }

    header .logo img {
        max-width: 60%;
    }

    header .logo {
        margin-top: 5px;
    }
}

/* Orientacja pionowa dla małych ekranów - nadpisuje wartości z @media (max-width: 480px) */
@media (max-width: 480px) and (orientation: portrait) {
    header > .top {
        height: 30px;
        min-height: 30px;
        max-height: 30px;
    }

    header .top .inline-media {
        display: none;
    }

    header .control-panel {
        width: 100%;
        float: none;
        padding-top: 10px;
        text-align: center;
    }

    header .control-panel nav > ul.user-panel {
        text-align: center;
    }

    header .partners {
        height: 100px;
        padding: 40px 20px 0 20px;
        margin: 200px -10px 0 -10px;
    }
}

/* 
 * Media queries dla orientacji - działają kaskadowo z @media (max-width: 768px)
 * Style z orientacji są bardziej specyficzne i nadpisują tylko to, co jest potrzebne
 */

/* Orientacja pozioma - edycja pozycji i wielkości elementów */
@media (max-width: 768px) and (orientation: landscape) {
    /* Grafika logo-header.png - pozycja i wielkość */
    header > .top:after {
        width: 80%;
        max-width: 700px;
        top: 42px;
    }

    /* Pasek pod navbarem - wielkość i pozycja */
    header > .top {
        height: 50px;
        min-height: 50px;
        max-height: 50px;
    }

    /* Logo - wielkość i pozycja */
    header .logo img {
        max-width: 60%;
    }

    header .logo {
        margin-top: 5px;
    }
}

/* Orientacja pionowa - zmniejszamy box i logo */
@media (max-width: 768px) and (orientation: portrait) {
    /* Zmniejsz box pod navbarem */
    header > .top {
        height: 40px;
        min-height: 40px;
        max-height: 40px;
    }

    /* Zmniejsz logo */
    header .logo img {
        max-width: 45%;
    }

    header .logo {
        margin-top: 0px;
    }
}

/* Landscape dla tabletów i większych smartfonów (1079px) */
@media (max-width: 1079px) and (orientation: landscape) {
    header {
        background-size: 180% auto;
        background-position: center top;
    }
    
    /* Pasek pod navbarem - wielkość i pozycja */
    header > .top {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
    }
    
    /* Logo - wielkość i pozycja */
    header .logo img {
        max-width: 30%;
        top: 0px; /* Przesunięcie o 10px do góry (z 25px na 15px) */
    }
    
    header .logo {
        margin-top: 0px;
    }
}