/* Custom CSS for LearnMate */

/* Navbar Logo Styles - Small and compact for header */
.navbar-brand img,
.navbar-logo {
    transition: transform 0.3s ease;
    max-width: 100%;
    /* Keep navbar logo small and compact */
    height: 28px !important;
    width: auto;
    max-height: 28px !important;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Fixed navbar improvements */
.navbar.fixed-top {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Ensure navbar brand stays compact */
.navbar-brand {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    padding: 0.25rem 0;
}

/* Hero Logo Animation - Larger for main content areas */
.hero-logo {
    animation: fadeInUp 1s ease-out;
    transition: transform 0.3s ease;
    max-width: 100%;
    /* Default size for desktop - much larger than navbar logo */
    height: 120px !important;
    width: auto;
}

.hero-logo:hover {
    transform: scale(1.05);
}

/* Responsive logo sizes for different screen sizes */
/* Extra small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .navbar-brand img,
    .navbar-logo {
        height: 20px !important;
        width: auto;
        max-height: 20px !important;
    }
    
    .hero-logo {
        height: 80px !important;
        width: auto;
    }
    
    .navbar-brand {
        font-size: 0.95rem;
    }
    
    .navbar {
        padding: 0.25rem 0;
        min-height: 50px;
    }
    
    body {
        padding-top: 60px; /* Smaller navbar on mobile */
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Adjust display headings for mobile */
    .display-1, .display-2, .display-3, .display-4 {
        font-size: calc(1.375rem + 1.5vw);
    }
    
    /* Better spacing for buttons on mobile */
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    /* Responsive card grids */
    .col-md-6.col-lg-3 {
        margin-bottom: 1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .navbar-brand img,
    .navbar-logo {
        height: 22px !important;
        width: auto;
        max-height: 22px !important;
    }
    
    .hero-logo {
        height: 90px !important;
        width: auto;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-brand img,
    .navbar-logo {
        height: 24px !important;
        width: auto;
        max-height: 24px !important;
    }
    
    .hero-logo {
        height: 100px !important;
        width: auto;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-brand img,
    .navbar-logo {
        height: 26px !important;
        width: auto;
        max-height: 26px !important;
    }
    
    .hero-logo {
        height: 110px !important;
        width: auto;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .navbar-brand img,
    .navbar-logo {
        height: 28px !important;
        width: auto;
        max-height: 28px !important;
    }
    
    .hero-logo {
        height: 120px !important;
        width: auto;
    }
}

/* Body padding for fixed navbar */
body {
    padding-top: 70px; /* Space for fixed navbar */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Prevent logo from breaking layout on very small screens */
@media (max-width: 320px) {
    .navbar-brand img,
    .navbar-logo {
        height: 18px !important;
        width: auto;
        max-height: 18px !important;
    }
    
    .hero-logo {
        height: 70px !important;
        width: auto;
    }
    
    .navbar-brand {
        font-size: 0.85rem;
    }
    
    body {
        padding-top: 55px;
    }
    
    .navbar {
        padding: 0.15rem 0;
        min-height: 45px;
    }
}

/* General responsive image handling for all images */
img {
    max-width: 100%;
    height: auto;
}

/* Exclude navbar and hero logos from global img rules */
.navbar-brand img,
.navbar-logo,
.hero-logo {
    max-width: none !important; /* Override global rule */
}

/* Ensure logos don't inherit card or content image styles */
.navbar-brand img:not(.card img):not(.content img),
.navbar-logo:not(.card img):not(.content img),
.hero-logo:not(.card img):not(.content img) {
    display: inline-block !important;
    margin: 0 !important;
}

/* Maximum specificity override - Final logo size enforcement */
body .navbar .navbar-brand img[src*="learnmate-logo"],
body .navbar .navbar-brand .navbar-logo[src*="learnmate-logo"] {
    height: 28px !important;
    width: auto !important;
    max-height: 28px !important;
    min-height: 28px !important;
}

body .hero-logo[src*="learnmate-logo"] {
    height: 120px !important;
    width: auto !important;
    max-height: 120px !important;
    min-height: 120px !important;
}

/* Mobile-specific overrides with maximum specificity */
@media (max-width: 575.98px) {
    body .navbar .navbar-brand img[src*="learnmate-logo"],
    body .navbar .navbar-brand .navbar-logo[src*="learnmate-logo"] {
        height: 20px !important;
        width: auto !important;
        max-height: 20px !important;
        min-height: 20px !important;
    }
    
    body .hero-logo[src*="learnmate-logo"] {
        height: 80px !important;
        width: auto !important;
        max-height: 80px !important;
        min-height: 80px !important;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    body .navbar .navbar-brand img[src*="learnmate-logo"],
    body .navbar .navbar-brand .navbar-logo[src*="learnmate-logo"] {
        height: 22px !important;
        width: auto !important;
        max-height: 22px !important;
        min-height: 22px !important;
    }
    
    body .hero-logo[src*="learnmate-logo"] {
        height: 90px !important;
        width: auto !important;
        max-height: 90px !important;
        min-height: 90px !important;
    }
}

/* Ensure card images are responsive */
.card img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Responsive adjustments for content images */
.content img, 
.card-body img, 
.text-center img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

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

:root {
    --hover-transform: translateY(-2px);
    --transition-duration: 0.3s;
}

/* Main content area */

main {
    flex: 1;
}

/* Hover effects for cards */
.hover-card {
    transition: transform var(--transition-duration) ease, box-shadow var(--transition-duration) ease;
}

.hover-card:hover {
    transform: var(--hover-transform);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Custom button styles */
.btn-group .dropdown-toggle-split {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* File upload styles */
.form-control[type="file"] {
    padding: 0.375rem 0.75rem;
}

/* Badge improvements */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Card title links */
.card-title a {
    color: inherit;
    transition: color var(--transition-duration) ease;
}

.card-title a:hover {
    color: var(--bs-primary);
}

/* Pagination improvements */
.pagination .page-link {
    transition: all var(--transition-duration) ease;
}

/* Search form improvements */
.navbar .form-control {
    transition: width var(--transition-duration) ease;
}

.navbar .form-control:focus {
    width: 250px !important;
}

/* Alert improvements */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .btn-group {
        width: 100%;
    }
    
    .btn-group .btn {
        flex: 1;
    }
    
    /* Stack cards on mobile */
    .card-body .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .card-body .d-flex > * {
        margin-bottom: 0.5rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .pagination,
    .card-header {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* Accessibility improvements */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Dark theme scrollbar */
[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bs-gray-800);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Empty state improvements */
.text-center i.fa-4x {
    opacity: 0.6;
}

/* Tag cloud effect */
.badge.bg-secondary {
    transition: all var(--transition-duration) ease;
}

.badge.bg-secondary:hover {
    background-color: var(--bs-primary) !important;
    transform: scale(1.05);
}

/* File info alert styling */
#fileInfo .alert {
    font-size: 0.875rem;
}

/* Sticky sidebar positioning */
.sticky-top {
    top: 100px !important;
}

/* List group item hover effects */
.list-group-item {
    transition: background-color var(--transition-duration) ease;
}

/* Upload form improvements */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-text {
    font-size: 0.825rem;
    margin-top: 0.25rem;
}

/* Breadcrumb improvements */
.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-weight: bold;
}

/* Statistics cards on homepage */
.card.h-100 {
    transition: all var(--transition-duration) ease;
}

.card.h-100:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Icon improvements */
.fas, .far {
    width: 1em;
    text-align: center;
}

/* Form validation styles */
.is-invalid {
    border-color: var(--bs-danger);
}

.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: var(--bs-danger);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.3rem solid rgba(255, 255, 255, 0.3);
    border-top: 0.3rem solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Paper details section fixes */
.paper-detail-header {
    flex-wrap: wrap;
    gap: 1rem;
}

.paper-detail-header .paper-info {
    flex: 1;
    min-width: 250px;
}

.paper-detail-header .paper-actions {
    flex-shrink: 0;
}

/* Button groups in paper details */
.paper-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.paper-detail-actions .btn-group {
    flex-shrink: 0;
}

/* Paper metadata layout */
.paper-metadata .list-group-item {
    border: none;
    padding: 0.5rem 0;
    background: transparent;
}

.paper-metadata .list-group-item:last-child {
    border-bottom: none;
}

/* PDF viewer container */
.pdf-viewer-container {
    position: relative;
    background: var(--bs-dark);
    border: 1px solid var(--bs-gray-700);
    border-radius: 0.375rem;
    overflow: hidden;
}

/* Dark theme PDF viewer */
[data-bs-theme="dark"] .pdf-viewer-container {
    background: var(--bs-gray-900);
    border-color: var(--bs-gray-700);
}

.pdf-viewer-container iframe {
    width: 100%;
    min-height: 600px;
    border: none;
}

/* Comment section styling */
.comment-section {
    border-top: 1px solid var(--bs-gray-600);
    margin-top: 2rem;
    padding-top: 2rem;
}

.comment-item {
    border-left: 3px solid var(--bs-gray-600);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.comment-item.reply {
    margin-left: 2rem;
    border-left-color: var(--bs-gray-500);
}

/* Dark theme comment styling */
[data-bs-theme="dark"] .comment-section {
    border-top-color: var(--bs-gray-700);
}

[data-bs-theme="dark"] .comment-item {
    border-left-color: var(--bs-gray-700);
}

[data-bs-theme="dark"] .comment-item.reply {
    border-left-color: var(--bs-gray-600);
}

/* Responsive fixes for paper details */
@media (max-width: 992px) {
    .paper-detail-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .paper-detail-header .paper-actions {
        justify-content: center;
    }
    
    .paper-detail-actions {
        justify-content: center;
    }
    
    .paper-detail-actions .btn-group {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .paper-detail-actions .btn-group .btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .paper-metadata .row {
        flex-direction: column;
    }
    
    .paper-metadata .col-md-6 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Stack buttons vertically on mobile */
    .paper-detail-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .paper-detail-actions .btn,
    .paper-detail-actions .btn-group {
        width: 100%;
    }
    
    .pdf-viewer-container iframe {
        min-height: 400px;
    }
}

/* Sidebar improvements */
.paper-sidebar .card {
    margin-bottom: 1.5rem;
}

.paper-sidebar .list-group-item {
    transition: background-color var(--transition-duration) ease;
}

.paper-sidebar .list-group-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Badge improvements in paper details */
.paper-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.paper-badges .badge {
    font-size: 0.8em;
    padding: 0.4em 0.6em;
}

/* Fix for dropdown menu positioning */
.paper-detail-header .dropdown-menu {
    right: 0;
    left: auto;
}

/* Enhanced comment styling */
.comment-item .avatar-circle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comment-item .comment-author {
    font-size: 0.95rem;
}

.comment-item .comment-content {
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* Paper detail responsive improvements */
@media (max-width: 576px) {
    .paper-detail-header .paper-info h1 {
        font-size: 1.25rem;
    }
    
    .paper-badges .badge {
        font-size: 0.7em;
        padding: 0.3em 0.5em;
    }
    
    .paper-metadata .list-group-item {
        padding: 0.75rem 0;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.25rem;
    }
    
    .paper-metadata .list-group-item strong {
        margin-top: 0.25rem;
    }
    
    .comment-item {
        padding: 1rem !important;
    }
    
    .comment-item .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }
}

/* Better spacing for paper information cards */
.paper-sidebar .card-body .list-group-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--bs-gray-600);
}

.paper-sidebar .card-body .list-group-item:last-child {
    border-bottom: none;
}

/* Dark theme paper sidebar */
[data-bs-theme="dark"] .paper-sidebar .card-body .list-group-item {
    border-bottom-color: var(--bs-gray-700);
    background-color: transparent;
}

/* Improved button spacing in mobile */
@media (max-width: 767px) {
    .paper-detail-actions .btn-group {
        margin-bottom: 0.75rem;
    }
    
    .paper-detail-actions .btn-group:last-child {
        margin-bottom: 0;
    }
}

/* Quiz-specific dark theme improvements */
.quiz-timer {
    background: var(--bs-gray-800) !important;
    color: var(--bs-light);
    border: 1px solid var(--bs-gray-600);
}

[data-bs-theme="dark"] .quiz-timer {
    background: var(--bs-gray-900) !important;
    border-color: var(--bs-gray-700);
}

/* Question navigation buttons */
.question-nav-btn {
    background: var(--bs-gray-700);
    border: 1px solid var(--bs-gray-600);
    color: var(--bs-light);
}

.question-nav-btn:hover {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}

.question-nav-btn.answered {
    background: var(--bs-success);
    border-color: var(--bs-success);
    color: white;
}

.question-nav-btn.flagged {
    background: var(--bs-warning);
    border-color: var(--bs-warning);
    color: var(--bs-dark);
}

/* Modal dark theme */
[data-bs-theme="dark"] .modal-content {
    background-color: var(--bs-gray-900);
    border: 1px solid var(--bs-gray-700);
}

[data-bs-theme="dark"] .modal-header {
    border-bottom: 1px solid var(--bs-gray-700);
}

[data-bs-theme="dark"] .modal-footer {
    border-top: 1px solid var(--bs-gray-700);
}

/* Form controls in dark theme */
[data-bs-theme="dark"] .form-control {
    background-color: var(--bs-gray-800);
    border-color: var(--bs-gray-600);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: var(--bs-gray-800);
    border-color: var(--bs-primary);
    color: var(--bs-light);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

[data-bs-theme="dark"] .form-select {
    background-color: var(--bs-gray-800);
    border-color: var(--bs-gray-600);
    color: var(--bs-light);
}

/* Quiz cards styling */
.quiz-question-card {
    background: var(--bs-gray-900);
    border: 1px solid var(--bs-gray-700);
}

[data-bs-theme="dark"] .quiz-question-card {
    background: var(--bs-gray-900);
    border-color: var(--bs-gray-700);
}

/* Alert improvements for dark theme */
[data-bs-theme="dark"] .alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.2);
    color: var(--bs-info);
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
    color: var(--bs-warning);
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.2);
    color: var(--bs-success);
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
    color: var(--bs-danger);
}

/* Progress bar dark theme */
[data-bs-theme="dark"] .progress {
    background-color: var(--bs-gray-700);
}

/* List group items dark theme */
[data-bs-theme="dark"] .list-group-item {
    background-color: var(--bs-gray-800);
    border-color: var(--bs-gray-700);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .list-group-item:hover {
    background-color: var(--bs-gray-700);
}

/* Table dark theme */
[data-bs-theme="dark"] .table {
    --bs-table-bg: var(--bs-gray-900);
    --bs-table-border-color: var(--bs-gray-700);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Card header and footer improvements */
[data-bs-theme="dark"] .card-header {
    background-color: var(--bs-gray-800);
    border-bottom: 1px solid var(--bs-gray-700);
}

[data-bs-theme="dark"] .card-footer {
    background-color: var(--bs-gray-800);
    border-top: 1px solid var(--bs-gray-700);
}

/* Dropdown menu dark theme */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--bs-gray-800);
    border: 1px solid var(--bs-gray-700);
}

[data-bs-theme="dark"] .dropdown-item {
    color: var(--bs-light);
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: var(--bs-gray-700);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .dropdown-divider {
    border-top: 1px solid var(--bs-gray-700);
}

/* Pagination dark theme */
[data-bs-theme="dark"] .page-link {
    background-color: var(--bs-gray-800);
    border-color: var(--bs-gray-700);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .page-link:hover {
    background-color: var(--bs-gray-700);
    border-color: var(--bs-gray-600);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* AI Quiz Generation specific styles */
.ai-quiz-topics {
    background-color: var(--bs-gray-800) !important;
    border: 1px solid var(--bs-gray-600);
    border-radius: 0.375rem;
    padding: 1rem;
}

[data-bs-theme="dark"] .ai-quiz-topics {
    background-color: var(--bs-gray-900) !important;
    border-color: var(--bs-gray-700);
}

.ai-quiz-topics .form-check-input {
    background-color: var(--bs-gray-700);
    border-color: var(--bs-gray-600);
}

[data-bs-theme="dark"] .ai-quiz-topics .form-check-input {
    background-color: var(--bs-gray-800);
    border-color: var(--bs-gray-700);
}

.ai-quiz-topics .form-check-label {
    color: var(--bs-light) !important;
}

/* Answer later functionality styles */
.answer-later-btn {
    background-color: var(--bs-warning);
    border-color: var(--bs-warning);
    color: var(--bs-dark);
}

.answer-later-btn:hover {
    background-color: #ffca2c;
    border-color: #ffc720;
    color: var(--bs-dark);
}

.flagged-question {
    border-left: 4px solid var(--bs-warning) !important;
    background-color: rgba(255, 193, 7, 0.1);
}

[data-bs-theme="dark"] .flagged-question {
    background-color: rgba(255, 193, 7, 0.05);
}

/* Navigation Improvements */
.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-top: 4px;
    min-width: 220px;
}

.navbar-nav .dropdown-item {
    padding: 8px 16px;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 2px 4px;
}

.navbar-nav .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    transform: translateX(4px);
}

.navbar-nav .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Ensure dropdowns work on mobile */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none;
        box-shadow: none;
        border: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0;
        margin-left: 1rem;
        border-radius: 4px;
    }
    
    .navbar-nav .dropdown-item:hover {
        transform: none;
    }
}

/* Fix navbar toggle button */
.navbar-toggler {
    border: none;
    padding: 4px 8px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Smooth navbar collapse */
.navbar-collapse {
    transition: height 0.3s ease;
}

/* Active navigation states */
.nav-link.active {
    color: #0d6efd !important;
    font-weight: 500;
}

/* Hover effects for navigation */
.nav-link {
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 0 2px;
}

.nav-link:hover {
    color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.1);
}

/* Dropdown arrow animation */
.dropdown-toggle::after {
    transition: transform 0.2s ease;
}

.dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Bootstrap dropdown enhancement */
.dropdown-menu.show {
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

