/* ------------------ Desktop Nav ------------------ */

nav.desktop-nav {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


/* Main navigation list */

nav.desktop-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    gap: 25px;
}


/* Each nav item */

nav.desktop-nav ul li {
    position: relative;
    /* Needed for dropdown positioning */
}


/* Nav links */

nav.desktop-nav ul li a {
    text-decoration: none;
    color: #222;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}


/* Hover effect: black background, slight upward move */

nav.desktop-nav ul li a:hover {
    background: black;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(230, 57, 70, 0.4);
}


/* ------------------ Desktop Dropdown ------------------ */

nav.desktop-nav ul li .dropdown {
    display: none;
    /* hidden by default */
    position: absolute;
    top: 100%;
    /* below parent link */
    left: 0;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 5px 0;
    min-width: 150px;
    border-radius: 6px;
    z-index: 1000;
}

nav.desktop-nav ul li:hover>.dropdown {
    display: block;
    /* show dropdown on hover */
}

nav.desktop-nav ul li .dropdown li a {
    padding: 8px 15px;
    color: #222;
    font-weight: 500;
    display: block;
    white-space: nowrap;
}

nav.desktop-nav ul li .dropdown li a:hover {
    background: black;
    color: #fff;
}


/* Arrow for items with dropdown */

nav.desktop-nav ul li:has(.dropdown)>a::after {
    content: "";
    display: inline-block;
    margin-left: 6px;
    border: solid #222;
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: rotate(45deg);
    /* right-down arrow */
    transition: transform 0.3s ease;
}

nav.desktop-nav ul li:hover>a::after {
    transform: rotate(-135deg);
    /* points downward */
    border-color: #fff;
    /* matches hover text color */
}


/*Desktop end Here*/


/* ------------------ Dropdown Menu ------------------ */

#sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    background: #fff;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.2);
    padding-top: 60px;
    transition: left 0.3s ease;
    z-index: 1000;
}

#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#sidebar ul li a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: #222;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

#sidebar ul li a:hover {
    background: black;
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 3px 8px rgba(230, 57, 70, 0.5);
}

#sidebar ul li a.active {
    background: black;
    color: #fff;
}

#sidebar ul li:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #e63946;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #c1121f;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 900;
}

#overlay.active {
    opacity: 1;
    pointer-events: all;
}


/* ------------------ Mobile Dropdown ------------------ */

#sidebar .dropdown-mobile {
    display: none;
    /* hidden by default */
    flex-direction: column;
    padding-left: 15px;
}

#sidebar .has-dropdown {
    position: relative;
}

#sidebar .has-dropdown .arrow {
    float: right;
    font-size: 16px;
    /* bigger for visibility */
    font-weight: 600;
    /* slightly bolder */
    margin-left: 8px;
    /* small spacing from link text */
    cursor: pointer;
    transition: transform 0.3s ease;
}

#sidebar .has-dropdown.open .arrow {
    transform: rotate(-180deg);
}

#sidebar .has-dropdown.open .dropdown-mobile {
    display: flex;
}


/* Hamburger */

.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    nav.desktop-nav {
        display: none;
    }
    .menu-toggle {
        display: block;
        font-size: 28px;
        cursor: pointer;
        padding: 10px 20px;
        color: #e63946;
        transition: color 0.3s ease;
    }
    .menu-toggle:hover {
        color: #c1121f;
    }
}


/* Slide-in animation */

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

#sidebar.open ul li a {
    animation: slideIn 0.4s forwards;
}


/*Brand name */


/* Sidebar Brand Logo */

.sidebar-brand {
    text-align: center;
    margin-bottom: 20px;
    /* space before menu items */
}

.sidebar-brand img {
    max-width: 140px;
    /* adjust as needed */
    height: auto;
    display: inline-block;
    border-radius: 6px;
    /* optional, for rounded corners */
    transition: transform 0.3s ease;
}

.sidebar-brand img:hover {
    transform: scale(1.05);
    /* subtle hover effect */
}


/* Author Info Section */

.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: left;
}

.author-info img.author-img {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.author-img:hover {
    transform: scale(1.05);
    border-color: #ff0000;
}

.author-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.author-details.show {
    max-height: 200px;
    opacity: 1;
    margin-top: 10px;
}

.author-name {
    font-size: 0.95rem;
    color: #222;
    margin: 5px 0 2px;
    font-weight: 600;
}

.author-bio {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 6px;
    line-height: 1.4;
}

.facebook-link {
    display: inline-block;
    font-size: 0.85rem;
    color: #1877f2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.facebook-link:hover {
    color: #0d5bd3;
}