/* PharmaQMS Main Stylesheet */
:root {
    --primary-color: #1F5FA8;
    --secondary-color: #FFC107;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* Header & Navigation */
.navbar {
    background-color: var(--primary-color) !important;
    padding: 0;
    0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: white;
    font-size: 1.8rem;
}

.navbar-brand small {
    font-size: 0.8rem;
    display: block;
    margin-top: -5px;
}

.nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--secondary-color) !important;
}

.nav-link.active {
    font-weight: 700;
    color: var(--secondary-color) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 3px 3px 0 0;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}





/* Mobile Dropdown Fixes */
@media (max-width: 719.9px) {
    .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
    }

    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0;
        border: none;
        background-color: rgba(255, 255, 255, 0.1);
    }

    .dropdown-item {
        color: rgba(255, 255, 255, 0.8) !important;
        padding-left: 2rem !important;
    }

    .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
    }

    .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

    .dropdown-header {
        color: rgba(255, 255, 255, 0.6) !important;
    }

    /* Search form on mobile */
    .search-form {
        margin-top: 1rem;
        margin-left: 0 !important;
        width: 100%;
    }

    .search-form .input-group {
        width: 100%;
    }
}

/* Dropdown fixes for all devices */
.dropdown-menu {
    animation: fadeIn 0.3s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 0.5rem 0;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.2s;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--primary-color);
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active state for dropdown parent */
.nav-item.dropdown .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Main Content */
.container {
    padding-top: 0px;
}

/* Hero Slider */
.hero-slider {
    margin-bottom: 2rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.carousel-item {
    height: 400px;
}

.carousel-item img {
    height: auto;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(31, 95, 168, 0.85);
    padding: 2rem;
    border-radius: 10px;
    bottom: 50px;
    left: 10%;
    right: 10%;
}

.carousel-caption h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    height: 100%;
}

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

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
}

.card-text {
    color: #666;
    font-size: 0.9rem;
}

/* Category Cards */
.category-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.category-card:hover .category-icon,
.category-card:hover .category-name,
.category-card:hover .badge {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.category-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Statistics */
.statistics {
    background: linear-gradient(135deg, var(--primary-color), #2a7dd5);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Feedback Slider */
.feedback-slider {
    margin: 3rem 0;
}

.feedback-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--primary-color);
}

.feedback-content {
    font-style: italic;
    color: #555;
    margin-bottom: 1rem;
}

.feedback-author {
    font-weight: 600;
    color: var(--primary-color);
}

.feedback-profession {
    color: #777;
    font-size: 0.9rem;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.sidebar-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-list {
    list-style: none;
    padding: 0;
}

.sidebar-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.sidebar-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #164d8a;
    border-color: #164d8a;
}

.btn-warning {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--dark-color);
    font-weight: 500;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #e0a800;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 50px;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer h4,
.footer h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.social-icons a {
    display: inline-block;
    transition: all 0.3s;
}

.social-icons a:hover {
    transform: translateY(-3px);
    text-decoration: none;
}

.admin-contact a {
    color: var(--secondary-color);
}

/* Forms */
.form-control {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(31, 95, 168, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-item {
        height: 300px;
    }

    .carousel-caption {
        bottom: 20px;
        left: 5%;
        right: 5%;
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .navbar-brand h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-top: 0px;
    }

    .card-img-top {
        height: 150px;
    }

    .feedback-item {
        padding: 1rem;
    }
}

@media (max-width: 719.9px) {
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(31, 95, 168, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    border-radius: 50px;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--primary-color);
}

.badge-warning {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    border-radius: 10px;
}

.page-link:hover {
    color: white;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Alert Messages */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}