/*
 * Custom CSS for Hospitech Service & Sales
 * Author: Your Name/Company
 * Version: 1.0
 */

/* --- General & Typography --- */
body {
    font-family: 'Roboto', sans-serif;
    color: #555;
    line-height: 1.7;
    background-color: #f8f9fa;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #343a40;
}

.lead {
    font-size: 1.1rem;
    font-weight: 400;
}

.section-title {
    margin-bottom: 50px;
    text-align: center;
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 20px;
    text-transform: uppercase;
}

.section-title span {
    color: #0d6efd; /* Bootstrap 5 Primary Blue */
}

.section-title::after {
    content: '';
    position: absolute;
    display: block;
    width: 80px;
    height: 3px;
    background: #0d6efd;
    bottom: 0;
    left: calc(50% - 40px);
}

/* --- Header & Navigation --- */
.navbar {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

/* --- Mega Menu for Products --- */
.mega-menu .dropdown-menu {
    width: auto;
    width: 1140px; /* Fixed width for desktop */
    max-width: 95vw; /* Ensure it fits on smaller screens */
    left: 50%;
    transform: translateX(-50%);
}

.mega-menu-column {
    position: static; /* Override Bootstrap's relative positioning on columns */
    padding: 0 15px; /* Reduced vertical padding */
}

.mega-menu-item .mega-menu-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 400; /* Changed to normal font weight */
    color: #343a40;
    text-decoration: none;
    padding: 8px 0; /* Reduced padding for a more compact look */
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.mega-menu-item {
    position: relative;
}

.mega-menu-item .mega-menu-title .sub-menu-indicator {
    float: right;
    font-size: 0.75rem;
    line-height: 1.5rem; /* Align with text */
}
.mega-menu-item .sub-menu {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 10px 0;
    z-index: 100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mega-menu-item:hover .mega-menu-title {
    border-bottom-color: #0d6efd;
}

.mega-menu-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
}

.mega-menu-item .sub-menu .dropdown-item {
    font-weight: 400; /* Normal text for sub-menu items */
    color: #6c757d; /* Lighter color for sub-menu items */
}

/* --- Why Choose Us Section --- */
.feature-box {
    background: #fff;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* --- Owl Carousel --- */
.owl-carousel .owl-nav button.owl-next,
.owl-carousel .owl-nav button.owl-prev {
    font-size: 2rem !important;
    color: #0d6efd !important;
}

.owl-carousel .item img {
    border-radius: 8px;
}

.news-section .card-title {
    color: #333;
}

/* --- Product Slider Section --- */
.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    display: flex; /* Use flexbox for the card itself */
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.product-card .image-container {
    height: 160px; /* Fixed height for the image area */
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}

.product-card .card-img-top {
    max-height: 100%;
    max-width: 100%;
    width: auto; /* Maintain aspect ratio */
    height: auto; /* Maintain aspect ratio */
}

.product-card .product-title {
    padding: 15px 10px;
    color: #0056b3;
    font-weight: 600;
    font-style: italic;
    text-align: center;
    margin-top: auto; /* Pushes title to the bottom */
    background-color: #f8f9fa;
    min-height: 80px; /* Set a minimum height for the title area */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Footer --- */
.site-footer {
    font-size: 0.9rem;
}

.site-footer h5 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-footer p, .site-footer li {
    color: #adb5bd;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 4px 0;
}

.footer-links a:hover {
    color: #fff;
}

.footer-contact li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    color: #0d6efd;
    margin-top: 4px;
}

.footer-bottom {
    border-top: 1px solid #444;
    font-size: 0.85rem;
}

/* --- Utility Classes --- */
.text-justify {
    text-align: justify;
}

/* --- Team Section --- */
.team-card {
    transition: transform 0.3s ease;
}

.team-card:hover {
    transform: translateY(-10px);
}

.team-card img {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.team-card h5 {
    font-weight: 700;
    color: #343a40;
}

/* --- Products Page Sidebar --- */
.sidebar-widget {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.category-list .list-group-item {
    border: none;
    padding: 10px 0;
    font-weight: 500;
}

.category-list .list-group-item.active {
    color: #0d6efd;
    background-color: transparent;
    font-weight: 700;
}


/* --- Responsive Adjustments for Mobile --- */
@media (max-width: 991.98px) {
    /* Reset mega menu for mobile view */
    .mega-menu .dropdown-menu {
        width: 100%;
        max-width: 100%;
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
    }

    .mega-menu-column {
        padding: 0;
    }

    /* Disable hover effect and make sub-menus always visible on mobile */
    .mega-menu-item .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        padding: 0 0 10px 15px; /* Indent sub-menu items */
    }
}