/* header.css - обновленная версия */
header {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1000;
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "brand logo contacts"
        "search search icons";
    align-items: center;
    column-gap: 28px;
    row-gap: 18px;
}

.brand-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    justify-self: start;
    grid-area: brand;
}

.brand-text {
    text-align: left;
}

.brand-text h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.15;
    text-transform: uppercase;
}

.brand-text small {
    display: block;
    font-size: 13px;
    opacity: 0.9;
    font-weight: 400;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.3s;
    justify-self: center;
    justify-content: center;
    margin-left: 0;
    grid-area: logo;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(220px, 22vw, 360px);
    background-color: transparent;
    border-radius: 0;
}

.logo-image {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.35));
}

.currency-time {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    opacity: 0.95;
    text-align: left;
    align-items: flex-start;
}

.currency-time p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.currency-time .map-link a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.45);
    padding-bottom: 1px;
}

.currency-time .map-link a:hover {
    border-bottom-color: rgba(255, 255, 255, 0.85);
}

.currency-time p:first-child {
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
}

.header-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    align-items: flex-end;
    text-align: right;
    justify-self: end;
    grid-area: contacts;
}

.language-switcher {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: white;
    color: #c0392b;
    border-color: white;
}

.contact-label {
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.12);
}

.contact-link {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.18);
    padding: 8px 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: all 0.3s;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    min-width: 220px;
}

.contact-link:hover {
    background-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.search-bar {
    display: flex;
    background-color: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    width: 100%;
    max-width: 520px;
    justify-self: start;
    grid-area: search;
}

.search-bar:focus-within {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.search-bar input {
    padding: 12px 25px;
    border: none;
    outline: none;
    flex: 1;
    width: 100%;
    font-size: 15px;
    min-width: 0;
}

.search-bar button {
    padding: 12px 25px;
    background-color: #3498db;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    flex-shrink: 0;
}

.search-bar button:hover {
    background-color: #2980b9;
}

.header-icons {
    display: flex;
    gap: 15px;
    justify-self: end;
    grid-area: icons;
}

.header-icons button {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 16px;
    padding: 12px 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.header-icons button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.favorite-text {
    font-size: 16px;
}

.favorite-count {
    background-color: #f39c12;
    color: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

@media (max-width: 768px) {
    .header-content {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .brand-side {
        align-items: center;
    }

    .brand-text {
        text-align: center;
    }

    .brand-text h1 {
        font-size: 20px;
    }

    .logo {
        justify-content: center;
        margin-left: 0;
    }

    .currency-time,
    .header-contacts,
    .search-bar,
    .header-icons {
        width: 100%;
        justify-content: center;
    }

    .currency-time {
        align-items: center;
        text-align: center;
    }

    .contact-link {
        width: fit-content;
        min-width: 0;
    }

    .search-bar {
        max-width: 480px;
    }

    .header-contacts {
        align-items: center;
    }

    .language-switcher {
        justify-content: center;
    }
    
    .search-bar input {
        width: 100%;
        min-width: 0;
    }

    .logo-icon {
        width: clamp(180px, 60vw, 260px);
    }
    
    .favorite-text {
        display: none;
    }
}
