/* ========================================================= */
/* ===================== BASE & UTILITIES ================== */
/* ========================================================= */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    font-weight: 400;
    background: #f9f9f9;
    color: #333;
}

a {
    color: #003366; /* Main theme link color (navy) */
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #002244; /* Darker navy on hover */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================================================= */
/* ===================== GRID & CARD ======================= */
/* ========================================================= */
.row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 0;
}

.col {
    flex: 0 0 calc((100% / 6) - 4px);
    max-width: calc((100% / 6) - 4px);
    padding: 0;
}

.card {
    border: none;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    padding: 6px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 13px;
    margin-bottom: 3px;
    line-height: 1.3;
}

.card-text {
    font-size: 11px;
    color: #555;
    margin-bottom: 3px;
}

.card .text-success {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #198754;
}

.card .btn {
    font-size: 12px;
    background-color: #003366; /* Card button color (navy) */
    color: #fff !important;
    border: none;
    border-radius: 25px;
    padding: 6px 0;
    margin-top: auto;
    text-align: center;
    display: block;
    width: 100%;
    transition: background 0.3s;
}

.card .btn:hover {
    background-color: #002244;
}

/* ========================================================= */
/* ==================== NAVBAR DESKTOP ===================== */
/* ========================================================= */
.navbar-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 12px 20px;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

.navbar-desktop .left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-desktop .left img {
    height: 40px;
}

.navbar-desktop .left span {
    font-weight: 400;
    color: #003366;
}

/* Category Dropdown */
.category-dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    color: #003366;
}

.category-dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 5px;
    max-height: 400px;
    overflow-y: auto;
}

.category-dropdown-content a {
    color: #003366;
    padding: 10px 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.category-dropdown-content a:hover {
    background-color: #f1f1f1;
}

.category-dropdown-content.show {
    display: block;
}

/* Searchbar */
.navbar-desktop .searchbar {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f1f1f1;
    padding: 6px 10px;
    border-radius: 25px;
    border: 1px solid #ddd;
    margin: 0 15px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.navbar-desktop .searchbar:hover,
.navbar-desktop .searchbar:focus-within {
    box-shadow: 0 0 5px rgba(0, 51, 102, 0.2);
}

.navbar-desktop .searchbar input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-weight: 400;
    padding-left: 5px;
}

.navbar-desktop .searchbar i {
    color: #003366;
}

/* Right section */
.navbar-desktop .right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-desktop .right i {
    font-size: 18px;
    color: #003366;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.navbar-desktop .right i:hover {
    transform: scale(1.1);
}

.navbar-desktop .right .divider {
    width: 1px;
    height: 28px;
    background: #ddd;
    margin: 0 6px;
}

.navbar-desktop .right .btn {
    padding: 5px 14px;
    border-radius: 25px;
    font-weight: 400;
    border: 1px solid #003366;
    background: #fff;
    color: #003366;
    font-size: 13px;
    transition: all 0.3s ease;
}

.navbar-desktop .right .btn:hover {
    background: #003366;
    color: #fff;
}

.navbar-desktop .right .btn-primary {
    background: #003366;
    color: #fff;
    border: none;
    font-size: 13px;
}

.navbar-desktop .right .btn-primary:hover {
    background: #002244;
}

/* Subnav */
.subnav {
    position: sticky;
    top: 64px;
    z-index: 998;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 8px 20px;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.1);
}

/* FIX: Changed `display: fixed` to `display: flex` */
.subnav-left, .subnav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.subnav a {
    font-size: 12px;
    font-weight: 400;
    color: #003366; /* navy link */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.subnav a:hover {
    color: #002244;
}

/* ========================================================= */
/* =============== MOBILE NAV & SIDE MENU ================== */
/* ========================================================= */
.navbar-mobile {
    display: none;
    background: #fff;
    padding: 8px 15px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.navbar-mobile .logo a,
.navbar-mobile .search-toggle-btn,
.navbar-mobile .searchbar button {
    color: #003366;
}

.navbar-mobile .logo img {
    height: 35px;
}

/* Reorganized for better structure */
.navbar-mobile .mobile-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-mobile .search-container {
    flex: 1;
    position: relative;
    margin: 0 10px;
    display: flex;
    align-items: center;
}

/* This targets the searchbar itself when active */
.navbar-mobile .searchbar.active {
    display: flex;
}

/* Hide the searchbar by default */
.navbar-mobile .searchbar {
    display: none;
    align-items: center;
    gap: 5px;
    background: #fff;
    border-radius: 25px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 6px 12px;
    z-index: 10;
    width: 100%;
}

.navbar-mobile .searchbar input {
    border: none;
    outline: none;
    flex-grow: 1;
    background: transparent;
}

.navbar-mobile .menu-btn {
    font-size: 22px;
    cursor: pointer;
    color: #003366;
}

/* Mobile Side Menu */
#mobileMenu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: #fff;
    z-index: 1050;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

#mobileMenu.active {
    left: 0;
}

#mobileMenu .close-btn {
    font-size: 24px;
    color: #333;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

#mobileMenu a {
    color: #003366;
}

#mobileMenu a:hover {
    color: #002244;
    background-color: #f8f8f8;
}


/* ========================================================= */
/* ============== RESPONSIVE MEDIA QUERIES ================= */
/* ========================================================= */
@media (min-width: 992px) {
    .bottom-nav-mobile,
    .navbar-mobile { display: none; }
}

@media (max-width: 991px) {
    .navbar-desktop, .subnav { display: none; }
    .navbar-mobile { display: flex; }
    .col { flex: 0 0 calc((100% / 4) - 4px); max-width: calc((100% / 4) - 4px); }
    .bottom-nav-mobile { display: flex; }
}

@media (max-width: 767px) {
    .row { gap: 6px; }
    .col { flex: 0 0 calc((100% / 2) - 6px); max-width: calc((100% / 2) - 6px); }
}