:root {
    --bs-warning: #f0ad4e;
    --bs-warning-rgb: 240, 173, 78;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-size: 1.3rem;
}

.hover-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card {
    border-radius: 0.75rem;
}

.btn-warning {
    color: #000;
    background-color: var(--bs-warning);
    border-color: var(--bs-warning);
}

.btn-warning:hover,
.btn-warning:focus {
    color: #000;
    background-color: #e0a800;
    border-color: #d39e00;
}

.navbar .btn-warning {
    color: #000 !important;
    background-color: var(--bs-warning) !important;
    border-color: var(--bs-warning) !important;
}

.hide-alerts .alert-dismissible {
    display: none !important;
}

.badge {
    font-weight: 500;
}

.form-control:focus {
    border-color: var(--bs-warning);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-warning-rgb), 0.25);
}

/* ===== Touch-friendly form controls ===== */
@media (max-width: 768px) {
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 1rem;
    }

    .form-control-lg,
    .form-select-lg {
        min-height: 48px;
        font-size: 1.05rem;
    }

    .btn {
        min-height: 44px;
        font-size: 1rem;
    }

    .btn-sm {
        min-height: 36px;
        font-size: 0.9rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 1rem;
    }

    main.container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .mb-5 {
        margin-bottom: 2rem !important;
    }

    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }

    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* ===== Phone (< 576px) ===== */
@media (max-width: 575.98px) {
    .display-5 {
        font-size: 1.3rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h4 {
        font-size: 1.15rem;
    }

    h5 {
        font-size: 1.05rem;
    }
}

/* ===== Mobile navbar improvements ===== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 0.5rem 0;
    }

    .navbar-nav .nav-link {
        padding: 0.6rem 0;
        font-size: 1rem;
    }

    .navbar-nav .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }
}

/* ===== Mobile search form (home page) ===== */
@media (max-width: 575.98px) {
    .mobile-search-form {
        flex-direction: column;
        gap: 0.5rem !important;
    }

    .mobile-search-form .form-control,
    .mobile-search-form .form-select,
    .mobile-search-form .btn {
        width: 100%;
        max-width: 100% !important;
    }
}

/* ===== Mobile footer ===== */
@media (max-width: 768px) {
    footer .row > div {
        margin-bottom: 1rem;
    }

    footer h5,
    footer h6 {
        font-size: 1rem;
    }

    footer .list-unstyled li {
        margin-bottom: 0.3rem;
    }
}

/* ===== Chat mobile ===== */
@media (max-width: 768px) {
    .chat-messages-container {
        max-height: calc(100vh - 280px) !important;
        min-height: 200px;
    }

    .chat-message-bubble {
        max-width: 85% !important;
    }

    .chat-form {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 0.75rem 0;
        margin: 0 -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* ===== Profile mobile ===== */
@media (max-width: 768px) {
    .profile-card .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .profile-card .d-flex .btn {
        width: 100%;
    }
}

/* ===== Vacancy list mobile filter toggle ===== */
@media (max-width: 991.98px) {
    .vacancy-filters-toggle {
        display: block;
    }

    .vacancy-filters-panel {
        display: none;
    }

    .vacancy-filters-panel.show {
        display: block;
    }
}

@media (min-width: 992px) {
    .vacancy-filters-toggle {
        display: none;
    }

    .vacancy-filters-panel {
        display: block !important;
    }
}

/* ===== Sticky mobile bottom bar (optional) ===== */
@media (max-width: 768px) {
    .mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #212529;
        z-index: 1040;
        padding: 0.5rem 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    }

    .mobile-bottom-bar .btn {
        min-height: 40px;
        font-size: 0.8rem;
    }

    body {
        padding-bottom: 60px;
    }
}

/* ===== Pagination mobile ===== */
@media (max-width: 575.98px) {
    .pagination .page-item .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
}

/* ===== Notification badge mobile ===== */
@media (max-width: 768px) {
    .navbar .badge {
        font-size: 0.65rem;
        padding: 0.25em 0.45em;
    }
}

/* ===== Card title truncation ===== */
.card-title-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* ===== Smooth scroll for chat ===== */
#chat-messages {
    scroll-behavior: smooth;
}
