/**
 * Informacja.com - Header CSS
 */

/* =============================================================================
   HEADER - TOP BAR (Red Background)
   ============================================================================= */

.header-top {
    background: var(--color-primary);
    color: #ffffff;
    padding: 3px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
}

/* =============================================================================
   DATE & WEATHER WIDGET (Left Side)
   ============================================================================= */

.header-date-weather {
    display: flex;
    gap: 15px;
    align-items: center;
    min-width: 200px;
}

.date-info {
    display: flex;
    flex-direction: column;
    gap: 0px;
    align-items: center;
}

.date-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 2px;
}

.month {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.date-label {
    font-size: 12px;
    opacity: 0.9;
    text-align: center;
}

.weather-info {
    display: flex;
    flex-direction: column;
    gap: 0px;
    align-items: center;
}

.weather-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: 6px;
}

.weather-icon svg {
    width: 100%;
    height: 100%;
}

.weather-data {
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-text {
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    margin-top: 5px;
}

.temperature {
    font-weight: bold;
}

.weather-desc {
    opacity: 0.9;
}

/* =============================================================================
   LOGO (Center)
   ============================================================================= */

.header-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.site-header .logo {
    color: #ffffff;
    text-decoration: none;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: -0.5px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.site-header .logo:hover {
    opacity: 0.9;
}

.site-header .logo .logo-text {
    display: inline-block;
}

.site-header .logo .logo-image {
    height: 70px;
    width: auto;
    display: block;
    position: relative;
    top: 3px;
}

/* =============================================================================
   USER PROFILE & MENU (Right Side)
   ============================================================================= */

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    min-width: 200px;
    justify-content: flex-end;
}

.header-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.3s ease;
}

.header-action-item:hover {
    opacity: 0.9;
}

.action-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    position: relative;
    top: 3px;
}

.action-icon img {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
}

.action-text {
    font-size: 12px;
    color: #ffffff;
}

.hamburger-icon {
    width: 30px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    top: -2px;
}

.hamburger-icon .line {
    width: 28px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

.hamburger-icon .line:not(:last-child) {
    margin-bottom: 6px;
}

/* X animation when active */
.header-action-item.active .hamburger-icon .line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.header-action-item.active .hamburger-icon .line:nth-child(2) {
    opacity: 0;
}

.header-action-item.active .hamburger-icon .line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* =============================================================================
   PROFILE DROPDOWN
   ============================================================================= */

.header-profile-dropdown {
    position: relative;
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 2000;
}

.profile-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.profile-dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.profile-dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.profile-dropdown-item:hover {
    background: #f5f5f5;
}

.profile-dropdown-logout:hover {
    background: #fff5f5;
    color: #dc143c;
}

.dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.profile-dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 4px 0;
}

/* =============================================================================
   LANGUAGE SELECTOR (Header)
   ============================================================================= */

.header-lang-selector {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.header-lang-selector .lang-flag {
    font-size: 24px;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    display: block;
    line-height: 1;
}

.header-lang-selector .lang-flag:hover {
    opacity: 0.9;
    transform: scale(1.1);
}

.header-lang-selector .lang-flag.active {
    opacity: 1;
    transform: scale(1.15);
}

/* =============================================================================
   NAVIGATION BAR (Darker Red)
   ============================================================================= */

.header-nav {
    background: var(--color-primary-dark);
    padding: 0px 0;
}

.header-nav .header-container {
    justify-content: center;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 50px;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.3s ease;
    display: inline-block;
}

.nav-link:hover {
    color: #ffd700;
    background: none;
}

.nav-link.active {
    color: #ffd700;
    background: none;
}

/* =============================================================================
   SEARCH SECTION (Light Gray Background)
   ============================================================================= */

.header-search {
    background: #f5f5f5;
    padding: 0px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header-search .header-container {justify-content:center}

.search-wrapper {
    display: flex;
    gap: 9px;
    align-items: center;
    margin-bottom: 0px;
    padding: 10px 0;
}

.search-label {
    font-size: 16px;
    color: #5f5f5f;
    font-weight: 500;
    min-width: 80px;
    text-align: right;
}

.search-input {
    flex: 1;
    padding: 5px 13px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.3s ease;
    width: 321px;
}

.search-input:focus {
    outline: none;
    border-color: #dc143c;
}

.search-input::placeholder {
    color: #999999;
}

.search-button {
    background: #dc143c;
    color: #ffffff;
    border: none;
    padding: 3px 15px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-button:hover {
    background: #b01030;
}

.search-button:active {
    transform: scale(0.98);
}

/* =============================================================================
   SEARCH FILTERS (Checkboxes)
   ============================================================================= */

.search-filters {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #333333;
    user-select: none;
}

.filter-checkbox:hover {
    opacity: 0.8;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #dc143c;
}

/* =============================================================================
   MOBILE RESPONSIVE
   ============================================================================= */

@media (max-width: 968px) {
    .header-date-weather {
        min-width: 150px;
        gap: 10px;
    }

    .weather-desc {
        display: none;
    }

    .nav-list {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    /* Hide date/weather on mobile */
    .header-date-weather {
        display: none;
    }

    /* Reposition logo to left side on mobile */
    .header-logo {
        position: static;
        transform: none;
        margin-right: auto;
    }

    /* Smaller logo on mobile */
    .site-header .logo {
        font-size: 24px;
    }

    .site-header .logo .logo-image {
        width: 100%;
        height: 100%;
    }

    /* Adjust header actions - keep on right */
    .header-actions {
        min-width: auto;
        gap: 15px;
        margin-left: auto;
    }

    .action-text {
        font-size: 10px;
    }

    /* Language selector - slightly smaller on mobile */
    .header-lang-selector .lang-flag {
        font-size: 20px;
    }

    /* Mobile navigation - collapsible */
    .header-nav {
        padding: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        display: none;
        background: #b01030;
        padding: 0;
    }

    .nav-list.active {
        display: flex;
    }

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

    .nav-link {
        display: block;
        padding: 15px 20px;
        border-bottom: none !important;
    }

    /* Search section mobile - use grid to stack search bar and filters */
    .header-search .header-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        padding-bottom: 10px;
    }

    .search-wrapper {
        display: flex;
        flex-direction: row;
        gap: 10px;
        justify-content: center;
        align-items: center;
    }

    .search-label {
        display: none;
    }

    .search-input {
        width: 70%;
        padding: 10px 13px;
    }

    .search-button {
        padding: 10px 15px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .search-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 15px;
    }

    .site-header .logo {
        font-size: 20px;
    }

    .site-header .logo .logo-image {
        width: 100%;
        height: 100%;
    }

    .action-icon {
        width: 32px;
        height: 32px;
    }

    .action-icon img {
        width: 24px;
        height: 24px;
    }

    .search-filters {
        padding: 0 10px;
    }
}

/* =============================================================================
   MOBILE MENU DRAWER
   ============================================================================= */

/* Overlay - darkens background when menu is open */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1100;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Drawer - slides in from right */
.menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85%;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1200;
    overflow-y: auto;
}

.menu-drawer.active {
    transform: translateX(0);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Drawer header */
.menu-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--color-primary);
    color: #ffffff;
}

.menu-drawer-logo {
    font-size: 20px;
    font-weight: bold;
}

.menu-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.menu-close:hover {
    opacity: 0.8;
}

/* Drawer navigation */
.menu-drawer-nav {
    padding: 20px 0;
}

.menu-drawer-link {
    display: block;
    padding: 15px 20px;
    color: #333333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease, color 0.2s ease;
}

.menu-drawer-link:hover {
    background: #f5f5f5;
    color: #dc143c;
}

.menu-drawer-link.active {
    background: #fff5f5;
    color: #dc143c;
    border-left: 4px solid #dc143c;
}

.menu-drawer-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 10px 20px;
}

.menu-drawer-link-admin {
    color: #666666;
    font-size: 15px;
}

.menu-drawer-link-admin:hover {
    background: #f9f9f9;
    color: #dc143c;
}

.menu-drawer-link-admin.active {
    background: #fff5f5;
    color: #dc143c;
    border-left: 4px solid #dc143c;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

/* Ensure header stays on top */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Smooth transitions */
* {
    transition-timing-function: ease;
}
