﻿/* Content.css */

/* General Body Styling */
body {
    background: #f8f9fc;
    color: #5a5c69;
    font-family: 'Helvetica', sans-serif;
    margin: 0;
}

/* Navbar Base Styles */
.custom-navbar {
    background-color: #333333;
    padding: 0.5rem 1rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
}

/* Search Bar Styling - Google-like */
.navbar-search-container {
    flex-grow: 1;
    max-width: 400px;
    margin: 0 2rem;
}

    .navbar-search-container .input-group {
        position: relative;
        box-shadow: 0 1px 6px 0 rgba(32,33,36,0.28);
        border-radius: 24px;
        overflow: hidden;
        background: white;
    }

        .navbar-search-container .input-group:hover {
            box-shadow: 0 1px 6px 0 rgba(32,33,36,0.40);
        }

.search-input {
    border-radius: 24px 0 0 24px !important;
    border: 1px solid #dfe1e5 !important;
    box-shadow: none !important;
    height: 40px;
    padding-left: 40px !important;
    padding-right: 80px !important;
}

.search-btn {
    border-radius: 0 24px 24px 0 !important;
    background-color: #f8f9fa !important;
    border: 1px solid #dfe1e5 !important;
    border-left: none !important;
    color: #9aa0a6 !important;
    height: 40px;
    padding: 0 1.5rem;
}

    .search-btn:hover {
        background-color: #f1f3f4 !important;
        color: #202124 !important;
        box-shadow: none !important;
    }

/* Search icon left */
.search-icon-left {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa0a6;
    font-size: 18px;
    z-index: 5;
}

/* Clear button */
.search-clear-btn {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    color: #70757a;
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    z-index: 5;
}

    .search-clear-btn:hover {
        color: #202124;
    }

/* Search Suggestions Styles */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 6px rgba(32,33,36,0.28);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 8px;
    border: 1px solid #dfe1e5;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    text-align: left;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s;
}

    .suggestion-item:first-child {
        border-radius: 24px 24px 0 0;
    }

    .suggestion-item:last-child {
        border-bottom: none;
        border-radius: 0 0 24px 24px;
    }

    .suggestion-item:only-child {
        border-radius: 24px;
    }

    .suggestion-item:hover {
        background-color: #f1f3f4;
    }

.suggestion-icon {
    color: #9aa0a6;
    margin-right: 12px;
    font-size: 14px;
}

.suggestion-subject {
    color: #202124;
    font-weight: normal;
    font-size: 16px;
    flex-grow: 1;
}

/* Error Message Styling */
.search-error {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    color: #dc3545;
    padding: 5px 10px;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 12px;
    display: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Home Link Animation */
.home-link {
    position: relative;
    color: white !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s;
}

    .home-link:before,
    .home-link:after {
        content: "";
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background: #FFF;
        opacity: 0;
        transition: all 0.3s ease-in-out;
    }

    .home-link:before {
        top: 0;
        transform: translateY(10px);
    }

    .home-link:after {
        bottom: 0;
        transform: translateY(-10px);
    }

    .home-link:hover:before,
    .home-link:hover:after {
        opacity: 1;
        transform: translateY(0);
    }

/* Category Label Styling */
.category-label {
    color: white;
    margin-right: 10px;
    font-size: 14px;
}

/* Dropdown Container */
.dropdown-container {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

/* Custom Dropdown Styling */
.custom-dropdown {
    background-color: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    padding: 0.375rem 2rem 0.375rem 1rem !important;
    font-size: 14px;
    border-radius: 4px !important;
    min-width: 180px;
}

    .custom-dropdown:focus {
        box-shadow: none !important;
    }

    .custom-dropdown::after {
        border-top-color: white;
    }

/* Dropdown Menu Styling */
.dropdown-menu {
    background-color: #333333;
    border: none;
    border-radius: 4px;
    margin-top: 5px;
    padding: 0;
}

.dropdown-item {
    color: white;
    padding: 8px 20px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

    .dropdown-item:hover {
        background-color: #444444;
        color: white;
    }

    .dropdown-item.active {
        background-color: #444444;
        color: white;
    }

/* Header Section */
.header {
    position: relative;
    text-align: center;
    background: linear-gradient(rgba(128, 130, 133, 0.8), rgba(128, 130, 133, 0.8)), url('../../Images/MainPageImg/HeaderBackground.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    margin-top: 56px;
    padding-top: 20px;
}

.inner-header {
    height: 12vh;
    width: 100%;
}

.flex {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Content Styling */
.container-fluid {
    padding: 0 2rem;
}

.card-body h2,
.card-body h4 {
    margin-bottom: 1.5rem;
    color: #EE5C17;
}

.card-body p {
    font-size: 1rem;
    color: #6c757d;
}

.breadcrumb {
    background: #f8f9fc;
}

.breadcrumb-item a {
    color: #798C9C;
}

.breadcrumb-item.active {
    color: #858796;
}

/* Link Styling */
.text-decoration-none {
    color: #798C9C !important;
}

    .text-decoration-none:hover {
        color: #5c7287 !important;
    }

/* Slide-up Animation */
.slide-up {
    animation: slide-up 0.5s ease-in-out forwards;
}

@keyframes slide-up {
    0% {
        transform: translateY(100vh);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Left Panel Styling */
.left-panel {
    background-color: #f8f9fc;
    padding: 20px;
    border-right: 1px solid #dee2e6;
    height: 100vh;
    overflow-y: auto;
}

.panel-title {
    color: #EE5C17;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.category-list {
    list-style-type: none;
    padding-left: 0;
}

    .category-list li {
        margin-bottom: 10px;
    }

    .category-list a {
        color: #798C9C;
        text-decoration: none;
    }

        .category-list a:hover {
            color: #EE5C17;
            text-decoration: underline;
        }

/* Footer Styling */
footer {
    background-color: #333333;
    color: #ffffff;
    padding: 0;
    width: 100%;
    position: relative;
    z-index: 1;
    margin-top: 2rem;
}

    footer .container {
        width: 100%;
    }

    footer .footer-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 0;
    }

    footer .footer-wrapper {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    footer .footer-logo {
        max-width: 200px;
    }

        footer .footer-logo img {
            width: 100%;
            height: auto;
        }

    footer .footer-menu ul {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 2rem;
    }

    footer .footer-menu a {
        color: #ffffff;
        text-decoration: none;
        font-size: 1rem;
        transition: color 0.3s ease;
    }

        footer .footer-menu a:hover {
            color: #ff6b00;
        }

    footer .footer-bottom {
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    footer .footer-info {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 0.5rem;
    }

    footer .copyright {
        font-size: 0.875rem;
    }

    footer .footer-info a {
        color: #ffffff;
        text-decoration: none;
        font-size: 0.875rem;
        transition: color 0.3s ease;
    }

        footer .footer-info a:hover {
            color: #ff6b00;
        }

    footer .separator {
        color: #ffffff;
    }

/* Media Queries */
@media (max-width: 991.98px) {
    .navbar-search-container {
        margin: 0.5rem 0;
        max-width: 100%;
    }

    .nav-label {
        margin-bottom: 5px;
    }

    .custom-dropdown {
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
    }

    .dropdown-menu {
        width: 100%;
        position: static !important;
        transform: none !important;
        margin-top: 0;
    }

    .left-panel {
        height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .header {
        margin-top: 64px;
        padding: 30px 0;
    }

    .inner-header {
        min-height: 150px;
        padding: 30px 15px;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

        .inner-header h1 {
            font-size: 2rem;
            margin-bottom: 20px;
        }

    .custom-navbar {
        min-height: 64px;
    }

    .navbar-brand img {
        height: 35px;
    }

    .navbar-search-container {
        margin: 10px 0;
    }

    .navbar-collapse.show {
        margin-bottom: 20px;
    }

    /* Target all images and videos within the article body */
    .card-body img,
    .card-body video {
        max-width: 100% !important;
        height: auto !important;
        display: block;
        margin: 1rem auto;
    }

        /* Specific handling for GIF images */
        .card-body img[src$=".gif"] {
            max-width: 100% !important;
            width: auto !important;
            height: auto !important;
        }

        /* Ensure MP4 videos are responsive */
        .card-body video::-webkit-media-controls {
            width: 100% !important;
        }

    /* Container for embedded media */
    .card-body iframe,
    .card-body embed,
    .card-body object {
        max-width: 100% !important;
        height: auto !important;
        display: block;
        margin: 1rem auto;
    }

    footer .footer-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    footer .footer-nav {
        text-align: left;
        padding: 1.5rem 0;
    }

    footer .footer-menu {
        margin-left: 0;
        margin-top: 1rem;
    }

        footer .footer-menu ul {
            flex-direction: column;
            gap: 1rem;
        }

    footer .footer-info {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    footer .separator {
        display: inline-block;
    }
}


/* Improved responsive search bar styling */
@media (max-width: 991.98px) {
    .navbar-search-container {
        max-width: 100%;
        margin: 0.5rem 0;
        order: 1;
    }

    .navbar-brand {
        margin-right: 0;
    }

    .navbar-toggler {
        order: 0;
    }

    .navbar > .container {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .navbar-search-container {
        max-width: 100%;
        width: 100%;
        margin: 10px 0;
        order: 1;
    }

    .navbar-brand {
        margin-right: auto;
    }

    .navbar-toggler {
        order: 0;
    }

    /* Ensure search suggestions don't overflow */
    .search-suggestions {
        width: 100%;
        left: 0;
        right: 0;
    }
}

@media (max-width: 576px) {
    .navbar-search-container {
        max-width: 100%;
    }

    .search-input {
        font-size: 14px;
    }

    .search-btn {
        padding: 0 1rem;
    }
}