/* Topbar */
.topbar {
    height: 64px;
    font-size: 17px;
    padding-top: 11px;
}

.topbar-nav {
    gap: 20px;
}

.topbar-nav a {
    position: relative;
    text-decoration: none;
    color: var(--bs-body-color);
    transition: color 0.2s ease;
}

.topbar-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--bs-primary);
    transition: width 0.25s ease;
}

.topbar-nav a:hover,
.topbar-nav a.active {
    color: var(--bs-primary);
}

.topbar-nav a:hover::after {
    width: 100%;
}

.topbar-phone {
    font-weight: 700;
    color: inherit;
    text-decoration: none;
}

.topbar-divider {
    width: 1px;
    height: 19px;
    background-color: var(--bs-primary);
    margin: 0 16px;
}

.topbar-cta {
    color: var(--bs-primary);
    text-decoration: underline;
}

.topbar-cta:hover {
    color: var(--bs-btn-hover-bg, #335aa8);
}

/* Navbar */
.navbar-konpal {
    background-color: #fff;
    min-height: 70px;
    padding: 16px 0;
    position: relative;
}

.navbar-konpal .container-xxl {
    padding-left: 3px;
}

.navbar-logo-link {
    flex-shrink: 0;
    margin-right: 8px;
    position: relative;
    z-index: 1;
}

.navbar-logo-img {
    height: 106px;
    width: 243px;
    margin-top: -30px;
    margin-bottom: -30px;
}

.navbar-icons {
    gap: 32px;
}

.navbar-icons a {
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar-icons a:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

/* Navbar search block (blue rectangle) */
.navbar-search-block {
    background-color: var(--bs-primary);
    border-radius: 0;
    height: 70px;
    padding: 0 2.25rem;
    margin-top: -2px;
    flex-grow: 1;
}

.navbar-search-icon {
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.navbar-search-input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'Arial', sans-serif;
    font-size: 1rem;
    flex-grow: 1;
    min-width: 0;
    margin-top: 7px;
}

.navbar-search-input::placeholder {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-search-form {
    border-bottom: 1px solid #fff;
    padding-bottom: 6px;
    flex: 1 1 auto;
    max-width: 67%;
}

.navbar-search-divider {
    width: 1px;
    height: 26px;
    background-color: #fff;
    margin: 0 0.75rem;
    flex-shrink: 0;
}

.navbar-search-cat {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.navbar-search-cat::after {
    display: none;
}

.navbar-search-cat:hover {
    color: rgba(255, 255, 255, 0.8);
}

.navbar-search-cat img {
    transition: transform 0.25s ease;
}

.navbar-search-cat[aria-expanded="true"] img {
    transform: rotate(90deg);
}

/* Catalog dropdown overlay */
.catalog-dropdown-backdrop {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.catalog-dropdown-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.catalog-dropdown {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 1031;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease,
        transform 0.2s ease;
}

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

.catalog-dropdown > .container-xxl {
    max-width: 1297px;
    background: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
    padding: 32px 60px 48px;
    pointer-events: auto;
}

.catalog-dropdown-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-right: -30px;
    margin-bottom: 32px;
}

.catalog-dropdown-title {
    font-family: 'Fira Sans', sans-serif;
    font-size: 30px;
    font-weight: 600;
    color: var(--bs-body-color);
    text-decoration: none;
}

.catalog-dropdown-title:hover {
    color: var(--bs-primary);
}

.catalog-dropdown-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--bs-body-color);
    font-size: 28px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.catalog-dropdown-close:hover {
    color: var(--bs-primary);
    transform: rotate(90deg);
}

.catalog-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 8px 100px;
}

.catalog-dropdown-item {
    position: relative;
    color: var(--bs-body-color);
    text-decoration: none;
    font-size: 17px;
    padding: 2px 0;
    opacity: 0;
    transform: translateY(6px);
    transition: color 0.2s ease, opacity 0.25s ease,
        transform 0.25s ease;
}

.catalog-dropdown-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--bs-primary);
    transition: width 0.25s ease;
}

.catalog-dropdown-item:hover {
    color: var(--bs-primary);
}

.catalog-dropdown-item:hover::after {
    width: 100%;
}

.catalog-dropdown.active .catalog-dropdown-item {
    opacity: 1;
    transform: translateY(0);
}

.catalog-dropdown.active .catalog-dropdown-item:nth-child(1) { transition-delay: 0.04s; }
.catalog-dropdown.active .catalog-dropdown-item:nth-child(2) { transition-delay: 0.06s; }
.catalog-dropdown.active .catalog-dropdown-item:nth-child(3) { transition-delay: 0.08s; }
.catalog-dropdown.active .catalog-dropdown-item:nth-child(4) { transition-delay: 0.10s; }
.catalog-dropdown.active .catalog-dropdown-item:nth-child(5) { transition-delay: 0.12s; }
.catalog-dropdown.active .catalog-dropdown-item:nth-child(6) { transition-delay: 0.14s; }
.catalog-dropdown.active .catalog-dropdown-item:nth-child(7) { transition-delay: 0.16s; }
.catalog-dropdown.active .catalog-dropdown-item:nth-child(8) { transition-delay: 0.18s; }
.catalog-dropdown.active .catalog-dropdown-item:nth-child(9) { transition-delay: 0.20s; }
.catalog-dropdown.active .catalog-dropdown-item:nth-child(10) { transition-delay: 0.22s; }

@media (max-width: 991.98px) {
    .catalog-dropdown-backdrop,
    .catalog-dropdown {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-dropdown,
    .catalog-dropdown-backdrop,
    .catalog-dropdown-item,
    .catalog-dropdown-close {
        transition: none;
    }

    .catalog-dropdown-item {
        opacity: 1;
        transform: none;
    }
}

/* Footer */
.footer-konpal {
    background-color: #EDF0F7;
    min-height: 136px;
}



.footer-logo-link {
    flex-shrink: 0;
    margin-right: 120px;
}

.footer-logo-img {
    width: 244px;
    margin-top: 15px;
}

.footer-center {
    padding-top: 36px;
}

.footer-nav {
    gap: 20px;
    margin-bottom: 22px;
}

.footer-nav a {
    color: #000206;
    text-decoration: none;
    font-size: 17px;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--bs-primary);
}

.footer-legal {
    gap: 48px;
}

.footer-legal a {
    color: #787878;
    text-decoration: underline;
    font-size: 15px;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: #555;
}

.footer-contacts {
    padding-top: 38px;
    margin-left: auto;
}

.footer-contact-row {
    gap: 13px;
    margin-bottom: 13px;
    color: inherit;
    text-decoration: none;
}

.footer-contact-row:last-child {
    margin-bottom: 0;
}

.footer-contact-row span {
    color: var(--bs-primary);
    font-size: 19px;
    font-weight: 700;
}

/* Hamburger button (mobile) */
.navbar-toggler {
    background: none;
    border: 1px solid var(--bs-border-color);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    color: var(--konpal-navy);
}

/* Mobile offcanvas */
.offcanvas-header-navy {
    background-color: var(--konpal-navy);
    padding: 16px 24px;
    min-height: 70px;
}

.offcanvas-logo img {
    height: 48px;
    width: auto;
}

.mobile-nav {
    padding: 8px 0;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 17px;
    font-weight: 500;
    color: var(--bs-body-color) !important;
    text-decoration: none !important;
    padding: 16px 24px;
    border-bottom: 1px solid var(--bs-border-color);
    transition: background-color 0.15s ease;
}

.mobile-nav a:hover {
    background-color: var(--bs-secondary-bg);
    color: var(--bs-primary) !important;
}

.mobile-contacts {
    padding: 16px 24px 24px;
}

.mobile-contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 10px 0;
}

.mobile-contact-row span {
    font-size: 18px;
    font-weight: 700;
    color: var(--bs-primary);
}

@media (max-width: 991.98px) {
    .navbar-konpal {
        padding: 8px 0;
    }

    .navbar-konpal .container-xxl {
        justify-content: space-between;
        padding-left: 12px;
        padding-right: 12px;
    }

    .navbar-logo-img {
        width: 150px;
        height: auto;
        margin-top: -12px;
        margin-bottom: -12px;
    }

    .footer-konpal .container-xxl {
        flex-direction: column;
        padding: 24px 16px;
    }

    .footer-center {
        padding-top: 0;
    }

    .footer-nav {
        flex-wrap: wrap;
        gap: 12px 20px;
    }

    .footer-contacts {
        padding-top: 16px;
        margin-left: 0;
    }
}
