/* css/style.css */

:root {
    --hc-blue: #1877f2;
    --hc-dark-blue: #002347;
    --hc-navy: #003366;
    --hc-bg: #f0f2f5;
    --hc-white: #ffffff;
    --hc-text: #050505;
    --hc-secondary: #65676b;
    --hc-border: #ced0d4;
    --hc-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--hc-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: var(--hc-text);
    margin: 0;
    padding-top: 135px; /* Adjusted: 90 (Main) + 45 (Sub) */
    overflow-x: hidden; /* Prevent horizontal scroll */
    padding-bottom: 70px; /* Space for mobile bottom nav */
}

html {
    overflow-x: hidden; /* Global safeguard against horizontal overflow */
}

a {
    cursor: pointer;
}

.support-bar {
    background: white;
    height: 35px;
    z-index: 1060;
}

.support-bar .nav-link {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

/* Header Tier 1 */
.header-main {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 90px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1050;
    top: 0;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.main-logo-img {
    height: 70px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1060;
    display: block;
    margin: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.logo-title-h1 {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--hc-navy);
    margin: 0;
    margin-top: -8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

.logo-container-hc:hover .logo-title-h1 {
    color: var(--hc-blue);
}

@media (max-width: 768px) {
    .main-logo-img {
        height: 60px;
    }
    .header-main {
        height: 85px;
    }
    body {
        padding-top: 100px;
    }
}

.search-bar-hc {
    background: #f0f2f5;
    border-radius: 8px;
    padding: 8px 15px;
    width: 100%;
    max-width: 450px;
}

@media (max-width: 400px) {
    .header-auth-btn {
        padding: 4px 10px !important;
        font-size: 0.75rem !important;
    }
}

.search-bar-hc input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
}

.nav-icon-hc {
    text-decoration: none;
    color: var(--hc-dark-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.3s ease;
    opacity: 0.8;
    position: relative;
}

.nav-icon-hc:hover {
    color: var(--hc-blue);
    opacity: 1;
    transform: translateY(-2px);
}

.nav-icon-hc i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.nav-icon-hc::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--hc-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 3px;
}

.nav-icon-hc:hover::after {
    width: 20px;
}

/* Premium Buttons - exclude btn-close from overrides */
.btn-primary:not(.btn-close) {
    background: linear-gradient(135deg, #1877f2, #0056b3) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
    transition: all 0.3s ease !important;
}

.btn-primary:not(.btn-close):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(24, 119, 242, 0.4);
}

.btn-outline-primary:not(.btn-close) {
    border: 2px solid #1877f2 !important;
    color: #1877f2 !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
}

.btn-outline-primary:not(.btn-close):hover {
    background: #1877f2 !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Protect Bootstrap btn-close from premium button overrides */
.btn-close {
    background-color: transparent !important;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;
    border: 0 !important;
    border-radius: 0.375rem !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 0.55;
    cursor: pointer !important;
    padding: 0.25em !important;
    width: 1em !important;
    height: 1em !important;
}

.btn-close:hover {
    opacity: 1 !important;
    transform: none !important;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    opacity: 0.85 !important;
}

.btn-close-white:hover {
    opacity: 1 !important;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 65px;
    border-radius: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0 10px;
}

.mobile-nav-item {
    text-decoration: none;
    color: #65676b;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.mobile-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 3px;
}

.mobile-nav-item.active {
    color: #1877f2;
}

.mobile-nav-item.active i {
    transform: translateY(-5px);
    text-shadow: 0 5px 10px rgba(24, 119, 242, 0.2);
}

.icon-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e41e3f;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
    z-index: 10;
}

@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none !important;
    }
    body {
        padding-bottom: 0;
    }
}

/* Offcanvas Premium Styling */
.offcanvas {
    border-radius: 0 30px 30px 0 !important;
}

.offcanvas-header {
    background: linear-gradient(135deg, var(--hc-navy), #001a33) !important;
    padding: 25px 20px !important;
}

.offcanvas-title {
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.offcanvas-body .list-group-item {
    font-weight: 600;
    font-size: 0.95rem;
    color: #444;
    padding: 15px 25px !important;
    transition: all 0.2s ease;
}

.offcanvas-body .list-group-item:hover {
    background: #f0f7ff;
    color: var(--hc-blue);
    padding-left: 30px !important;
}

.offcanvas-body .list-group-item i {
    width: 25px;
    text-align: center;
    font-size: 1.1rem;
}

/* Header Tier 2 */
.header-sub {
    background: rgba(0, 35, 71, 0.98);
    backdrop-filter: blur(10px);
    height: 45px;
    color: white;
    z-index: 1040;
    top: 90px; /* Base top */
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sub-nav-scroll {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.sub-nav-scroll::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

@media (max-width: 768px) {
    .header-sub {
        top: 80px; /* Match header height */
    }
}

.header-sub .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 20px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    padding: 10px 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.widget-hc {
    background: white;
    border-radius: 8px;
    box-shadow: var(--hc-card-shadow);
    margin-bottom: 20px;
    padding: 15px;
}
.header-sub .nav-link:hover {
    color: white;
    transform: scale(1.05);
}

.btn-create-post {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 3px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.btn-yellow {
    background: linear-gradient(135deg, #ffcc00, #ffb300) !important;
    color: #000 !important;
    font-weight: 800 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
    transition: all 0.3s ease !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.5px;
}

.btn-yellow:hover {
    background: linear-gradient(135deg, #ffb300, #ff9900) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 204, 0, 0.4);
    color: #000 !important;
}

/* Sidebar */
.sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hc-blue);
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-left: 10px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    color: #1c1e21;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 15px;
}

.sidebar-nav-item:hover {
    background: #e4e6eb;
}

.sidebar-nav-item i {
    width: 32px;
    height: 32px;
    background: var(--hc-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    margin-right: 12px;
    font-size: 14px;
}

.sidebar-nav-item.active {
    background: var(--hc-blue);
    color: white;
}

.sidebar-nav-item.active i {
    background: white;
    color: var(--hc-blue);
}

/* Profile Card Sidebar */
.profile-card-sb {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--hc-card-shadow);
    margin-bottom: 20px;
}

.profile-card-sb img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
}

/* Feed */
.card-hc {
    background: white;
    border-radius: 8px;
    box-shadow: var(--hc-card-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.banner-ad {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../assets/images/banner_bg.jpg');
    background-size: cover;
    color: white;
    padding: 40px;
}

.create-post-area {
    padding: 15px;
}

.create-post-input-box {
    background: #f0f2f5;
    border-radius: 20px;
    padding: 10px 15px;
    color: var(--hc-secondary);
    cursor: pointer;
}

.post-meta-hc {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    color: var(--hc-secondary);
}

.comment-box-hc {
    background: #f0f2f5;
    border-radius: 18px;
    padding: 8px 12px;
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.3;
    white-space: pre-wrap; /* Preserves line breaks and spaces */
}

.post-content {
    white-space: pre-wrap; /* Preserves line breaks and spaces */
    word-wrap: break-word;
    word-break: break-word;
}

/* Widgets */
.widget-hc {
    background: white;
    border-radius: 8px;
    box-shadow: var(--hc-card-shadow);
    margin-bottom: 20px;
    padding: 15px;
}

.widget-hc h6 {
    font-weight: 700;
    color: var(--hc-dark-blue);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #31a24c;
    border-radius: 50%;
    display: inline-block;
}

/* Footer */
footer {
    background: var(--hc-dark-blue);
    color: #ddd;
    padding: 50px 0 20px;
}

.footer-link {
    color: #bbb;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: white;
}

/* Live Chat Widget UI - Premium & Responsive */
.live-chat-wrapper {
    position: fixed;
    bottom: 40px;
    right: 25px;
    width: 350px;
    z-index: 10000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
    margin-bottom: 40px;
}

.live-chat-card {
    border: none !important;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.live-chat-header {
    background: linear-gradient(135deg, var(--hc-blue), var(--hc-navy)) !important;
    color: white !important;
    padding: 15px 20px !important;
    border: none !important;
}

.live-chat-body {
    height: 350px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 20px !important;
    scroll-behavior: smooth;
}

.chat-msg {
    margin-bottom: 15px;
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    animation: msgFadeIn 0.3s ease;
    white-space: pre-wrap; /* Preserves line breaks and spaces */
}

@keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg.admin {
    background: white;
    color: #333;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    align-self: flex-start;
}

.chat-msg.user {
    background: var(--hc-blue);
    color: white;
    border-bottom-right-radius: 2px;
    align-self: flex-end;
    margin-left: auto;
}

.live-chat-footer {
    background: white !important;
    padding: 15px !important;
    border-top: 1px solid #eee !important;
}

.chat-input-group {
    background: #f0f2f5;
    border-radius: 25px;
    padding: 5px 5px 5px 15px;
    display: flex;
    align-items: center;
    transition: margin-bottom 0.3s ease;
}

@media (max-width: 991.98px) {
    .chat-input-group {
        margin-bottom: 85px !important; /* Lift input above floating mobile nav */
    }
}

.chat-input-group input {
    background: transparent;
    border: none;
    outline: none;
    flex-grow: 1;
    font-size: 0.9rem;
    padding: 8px 0;
}

.chat-send-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--hc-blue);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    background: var(--hc-navy);
    transform: scale(1.1);
}

.chat-bubble-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, var(--hc-blue), var(--hc-navy));
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.4);
    z-index: 9999;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-bubble-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 25px rgba(24, 119, 242, 0.5);
}

/* Chat Responsive Queries */
@media (max-width: 991.98px) {
    /* On mobile: bottom nav is at bottom:20px, height:65px → occupies 20–85px from bottom */
    /* Chat bubble must sit above it: 20 + 65 + 15 gap = 100px */
    .chat-bubble-btn {
        bottom: 100px !important;
        right: 15px !important;
        padding: 10px 18px !important;
        font-size: 0.85rem !important;
        z-index: 1050 !important;
    }

    .live-chat-wrapper {
        /* Sits above the chat bubble (~50px tall): 100 + 50 + 15 gap = 165px */
        bottom: 165px !important;
        right: 15px !important;
        left: 15px !important;
        width: auto !important;
        max-width: none !important;
        transform-origin: bottom center !important;
        margin-bottom: 0 !important;
        z-index: 1049 !important;
    }

    .live-chat-card {
        width: 100% !important;
        height: auto !important;
        max-height: 75vh !important;
    }

    .live-chat-body {
        height: 45vh !important;
    }
}

/* Ad Badges */
.ad-badge {
    background: #e4e6eb;
    color: #65676b;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    float: right;
}

/* SOP & Department Styles */
.dept-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.dept-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--hc-blue);
    transform: translateY(-5px);
}

.dept-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.dept-card h6 {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.sop-table thead {
    background: #f8f9fa;
}

.sop-table th {
    font-weight: 700;
    color: var(--hc-dark-blue);
    text-transform: uppercase;
    font-size: 0.8rem;
    border-bottom: 2px solid var(--hc-blue) !important;
}

.sop-table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.badge-pdf {
    background: #ffebee;
    color: #c62828;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

.breadcrumb-hc {
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.breadcrumb-hc a {
    color: var(--hc-secondary);
    text-decoration: none;
}

.breadcrumb-hc span {
    color: var(--hc-blue);
    font-weight: 600;
}

/* Custom Widgets */
.latest-downloads-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.latest-downloads-item:last-child {
    border-bottom: none;
}

.latest-downloads-item i {
    font-size: 1.5rem;
    margin-right: 15px;
}

/* Post Media Grid */
.post-media-hc {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4px;
    background: #f0f2f5;
}

.post-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.post-media-hc img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: #f8f9fa;
    display: block;
}

.post-media-hc video {
    width: 100%;
    height: auto;
    max-height: none;
    display: block;
}

.post-media-hc img:hover {
    opacity: 0.9;
}

/* Modal Icons */
.modal-body .fa-image:hover, .modal-body .fa-user-tag:hover {
    transform: scale(1.1);
    transition: transform 0.2s;
}

#mediaPreview img {
    border: 2px solid var(--hc-blue);
    border-radius: 8px;
}

/* Job Description Premium Cards */
.jd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.jd-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    flex-direction: column;
}

.jd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--hc-blue);
}

.jd-card-icon {
    width: 50px;
    height: 50px;
    background: #f0f7ff;
    color: var(--hc-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.5rem;
    margin-bottom: 15px;
}
/* SOP Library Grid */
.sop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.sop-grid-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
}

.sop-grid-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-color: var(--hc-blue);
    transform: translateY(-3px);
}

.sop-icon-box {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border-radius: 12px;
}

.sop-grid-item h6 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--hc-navy);
    margin-bottom: 0;
}

/* Detailed SOP Table */
.sop-table-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--hc-card-shadow);
    padding: 25px;
}

.sop-table-card h5 {
    font-weight: 700;
    color: var(--hc-navy);
    margin-bottom: 20px;
}

.sop-table-detailed {
    width: 100%;
}

.sop-table-detailed thead th {
    background: #f8f9fa;
    color: var(--hc-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.sop-table-detailed tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #f8f8f8;
    font-size: 0.9rem;
}

.type-badge-pdf {
    background: #fff0f0;
    color: #d32f2f;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 3px;
}

.btn-sop-view {
    background: #f0f2f5;
    color: var(--hc-navy);
    border: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 4px;
}

.btn-sop-download {
    background: var(--hc-blue);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 4px;
}

.jd-card h6 {
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--hc-navy);
}

.jd-card .job-count {
    font-size: 0.8rem;
    color: var(--hc-secondary);
    margin-bottom: 15px;
}

.jd-card .job-examples {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.jd-card .view-link {
    color: var(--hc-blue);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.jd-card .view-link i {
    margin-left: 8px;
    transition: transform 0.2s;
}

.jd-card:hover .view-link i {
    transform: translateX(5px);
}

/* Premium Sidebar Resources */
.res-sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    margin-bottom: 10px;
    border-radius: 8px;
    color: var(--hc-navy);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.res-sidebar-item:hover {
    background: #f8faff;
    border-color: var(--hc-blue);
    color: var(--hc-blue);
}

.res-sidebar-item i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.res-sidebar-item.active {
    background: var(--hc-blue);
    color: white !important;
}

/* Filter Bar */
.filter-bar-jd {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--hc-card-shadow);
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}
/* Responsiveness & Mobile Friendly */
@media (max-width: 991.98px) {
    .header-main {
        top: 0;
        overflow: visible; /* Allow dropdowns to show */
    }
    .header-main .container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        overflow: hidden; /* Prevent inner content from overflowing */
    }
    .header-left {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }
    .header-center {
        flex: 1;
        display: flex;
        justify-content: flex-start; /* Align logo to the left */
        align-items: center;
    }
    .header-right {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }
    .search-bar-hc {
        display: none !important;
    }
    
    /* Hide sidebars on mobile */
    .col-lg-3 {
        display: none !important;
    }
    
    /* Stack grid items */
    .jd-grid, .sop-grid {
        grid-template-columns: 1fr !important;
    }
    
    .card-hc {
        margin-bottom: 15px;
    }
}

@media (max-width: 575px) {
    .create-post-input-box {
        font-size: 0.85rem;
    }
}

/* Post Reactions */
.reaction-wrapper:hover .reaction-emojis {
    display: flex !important;
    animation: fadeInUp 0.2s ease-out forwards;
}

.reaction-icon:hover {
    transform: scale(1.3) translateY(-5px);
    transform-origin: bottom center;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 575.98px) {
    .header-sub .nav-link {
        font-size: 0.75rem;
        margin-right: 10px;
    }
    .btn-create-post {
        width: 100%;
        text-align: center;
    }
}

.hover-underline:hover { text-decoration: underline !important; }
.cursor-pointer { cursor: pointer; }

/* Social Media Icons Brand Colors */
.social-icon-footer {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-icon-footer.fb:hover { background: #1877F2; color: white; transform: translateY(-3px); }
.social-icon-footer.ln:hover { background: #0A66C2; color: white; transform: translateY(-3px); }
.social-icon-footer.yt:hover { background: #FF0000; color: white; transform: translateY(-3px); }
.social-icon-footer.ig:hover { background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D); color: white; transform: translateY(-3px); }

/* Scroll to Top Button */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 25px;
    z-index: 999;
    width: 45px;
    height: 45px;
    background: var(--hc-blue);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#scrollToTopBtn:hover {
    background: var(--hc-navy);
    transform: translateY(-5px);
}

@media (max-width: 991.98px) {
    #scrollToTopBtn {
        bottom: 170px; /* Sit above the chat bubble on mobile */
    }
}
