/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Theme transition */
body {
    transition: background-color 0.3s ease;
}

/* Mobile menu animation */
#mobile-menu {
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, border-top-width 0.3s ease;
    overflow: hidden;
}

#mobile-menu.is-closed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-width: 0;
    pointer-events: none;
}

#mobile-menu:not(.is-closed) {
    max-height: 500px;
    opacity: 1;
    pointer-events: auto;
}

/* ─── Custom select styling ─── */
/* Remove Tailwind Forms plugin background arrow + native arrow */
.search-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none !important;
    padding-right: 2rem;
}
.search-select::-ms-expand {
    display: none;
}
.search-select:focus {
    box-shadow: none;
    outline: none;
}

/* ─── Search field dividers ─── */
.search-field {
    position: relative;
}
.search-field:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: currentColor;
    opacity: 0.12;
}

/* ─── Header icon buttons ─── */
.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}
.nav-icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* ─── Footer newsletter ─── */
@media (min-width: 640px) {
    .newsletter-form {
        flex-direction: row !important;
    }
    .newsletter-form input {
        flex: 1;
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
    .newsletter-form button {
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
        white-space: nowrap;
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
}
