/* Custom Variable Colors */
:root {
    --ifh-red: #dc3545;
    --dark-bg: #1a1a1a;
}

/* Glassmorphism Header */
.header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 99;
}

/* Navigation Link Styling */
.core-menu {
    display: flex;
    justify-content: space-between;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.menu-li-item {
    font-size: 13px;
    font-weight: 700;
    color: #333 !important;
    text-transform: uppercase;
    padding: 8px 12px;
    transition: 0.3s;
    text-decoration: none;
}

.menu-li-item:hover {
    color: var(--ifh-red) !important;
}

/* Elegant Dropdowns */
.dropdown {
    display: none;
    position: absolute;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    list-style: none;
    border-top: 3px solid var(--ifh-red);
}

li:hover > .dropdown {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dropdown li a {
    padding: 10px 20px;
    display: block;
    color: #444;
    font-size: 14px;
    text-decoration: none;
}

.dropdown li a:hover {
    background: #fff5f5;
    color: var(--ifh-red);
}

/* Mobile Offcanvas Customization */
.offcanvas {
    background: #fdfdfd;
}

.menu-link {
    font-weight: 600;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submenu-list {
    background: #f8f9fa;
    padding-left: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* --- Mobile Navigation (App Style) --- */
.offcanvas {
    border-radius: 0 24px 24px 0;
    width: 300px !important;
    border: none;
}

.mobile-user-profile {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.mobile-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--main-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.mobile-nav-link {
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 15px;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between; /* For arrow icons */
    border-radius: 12px;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.mobile-nav-link:hover, .mobile-nav-link:focus {
    background-color: #f1f3f5;
    color: var(--main-color);
}

.mobile-nav-icon {
    width: 30px;
    color: var(--grey-color);
    font-size: 1.1rem;
    text-align: center;
    margin-right: 10px;
}

.mobile-nav-link:hover .mobile-nav-icon {
    color: var(--main-color);
}

/* Mobile Nested Menu (Accordion) */
.mobile-submenu {
    background: #f8f9fa;
    border-radius: 12px;
    margin: 5px 0 15px 0;
    padding: 5px;
    border: 1px solid #eee;
}

.mobile-sub-link {
    display: block;
    padding: 10px 15px 10px 55px; /* Indent */
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
}

.mobile-sub-link:hover {
    color: var(--main-color);
    background: white;
}

.mobile-bottom-actions {
    margin-top: auto; /* Pushes to bottom */
    padding-top: 20px;
    border-top: 1px solid #eee;
}
/* Navigation Layout */
.nav-row-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-item-link {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 12px;
    white-space: nowrap;
    transition: 0.3s;
    display: flex;
    align-items: center;
}

.nav-item-link:hover {
    color: var(--ifh-red);
}

.nav-item-link i {
    font-size: 10px;
}

/* Dropdown logic */
.has-dropdown {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s ease;
    z-index: 1000;
    border-top: 3px solid var(--ifh-red);
}

.has-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown li a {
    padding: 8px 20px;
    display: block;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.nav-dropdown li a:hover {
    background-color: #fef2f2;
    color: var(--ifh-red);
}

/* Make Search bar look sleek */
.search-bar .form-control:focus {
    box-shadow: none;
    border-color: #dee2e6;
    background-color: #fff;
}
/* Container for AJAX results */
#result_set, #result_set_mobile {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 9999;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
}

/* Ensure results are styled properly */
.search-results-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-results-dropdown li {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.search-results-dropdown li:hover {
    background-color: #f8f9fa;
}
/* Desktop Row Styling */
.nav-row-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.nav-item-link {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 13.5px;
    padding: 10px 10px;
    white-space: nowrap;
    transition: 0.3s;
}

.nav-item-link:hover { color: var(--ifh-red); }

/* AJAX Search Result Floating Box */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 1060;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    display: none; /* jQuery will show this */
}

/* Dropdown Animation */
.has-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown {
    position: absolute;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-top: 3px solid var(--ifh-red);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s;
    list-style: none;
    padding: 10px 0;
    z-index: 1000;
}

/* Mobile Offcanvas Link styles */
.mobile-nav-link {
    display: block;
    padding: 15px 20px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-submenu a {
    display: block;
    padding: 10px 40px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    background: #fcfcfc;
}
/* Search Results Dropdown Styling */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 2000;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    max-height: 450px;
    overflow-y: auto;
    border: 1px solid #eee;
}

.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-item:hover {
    background-color: #fff5f5;
}

.search-icon-wrapper {
    width: 35px;
    height: 35px;
    background: #f1f3f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #dc3545;
}

.search-text-wrapper {
    display: flex;
    flex-direction: column;
}

.search-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    line-height: 1.2;
}

.search-category {
    font-size: 11px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Scrollbar styling */
.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}
.search-results-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
/* Footer Styling */
.footer {
    margin-top: 80px;
    background-color: rgba(248,249,250, 1) !important; /* Deep dark background */
}

.footer-title {
    color: #000000;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--ifh-red);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    color: #383838;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
}

.footer-links li a:hover {
    color: var(--ifh-red);
    padding-left: 5px;
}

.social-icon {
    width: 35px;
    height: 35px;
    background: #222;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--ifh-red);
    color: white;
    transform: translateY(-3px);
}

.footer .form-control::placeholder {
    color: #ccc;
}

.footer .form-control:focus {
    box-shadow: none;
    background-color: #333;
}
/* Desktop View (Large Screens) */
.mainsection {
    margin-top: 40px;
}

