body, html {
    font-family: 'Roboto', sans-serif;
    height: 100%;
}

/* Navigation link colors */
.nav-link, .dropdown-toggle .h2 {
    color: #000000 !important;
}

.dropdown-item {
    color: #000000 !important;
}

/* Custom hamburger icon for mobile menu */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Dropdown menu hover effects */
.dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Container spacing for fixed header */
.container-after-header {
    margin-top: 120px; /* Adjust to the actual height of your fixed header */
}

/* Custom card hover effects */
.custom-card:hover {
    background-color: #FFFFFF; /* This is a lighter shade */
    transition: background-color 0.3s ease; /* Smooth transition */
}

/* Ensure that card-link inherits the hover color effect */
.card-link:hover .custom-card {
    background-color: #FFFFFF;
}

/* Community resources navbar styles */
#community-resources-navbar {
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for separation */
    padding: 10px 0;
}

/* Default: Items in a row */
#community-resources-navbar .navbar-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Default: Horizontal Layout */
#community-resources-navbar .nav-item {
    display: inline-block;
}

/* Mobile Responsive Styles */
@media (max-width: 991px) {
    /* Adjust body padding for mobile */
    body {
        padding-top: 100px !important;
    }
    
    /* Mobile navbar brand size */
    .navbar-brand img {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* Mobile navbar styles */
    #app-header {
        padding: 0.5rem 0 !important;
    }
    
    /* Mobile container margin */
    .container-after-header {
        margin-top: 80px;
    }
    
    /* Mobile dropdown menu full width */
    .navbar-collapse .dropdown-menu {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
    
    /* Mobile nav items spacing */
    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }
    
    /* Remove right margin on mobile */
    .navbar-nav .nav-item.me-3 {
        margin-right: 0 !important;
    }
}

/* Responsive: One Item Per Line on Small Screens */
@media (max-width: 768px) {
    #community-resources-navbar .navbar-nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    #community-resources-navbar .nav-item {
        width: 100%;
        text-align: center;
    }
    
    /* Mobile dashboard cards */
    .stat-card {
        margin-bottom: 1rem !important;
    }
    
    .action-card {
        margin-bottom: 1rem !important;
    }
    
    /* Mobile headers */
    .builder-header, .supervisor-header, .admin-header, .inspector-header {
        padding: 1rem 0 !important;
    }
    
    .builder-header h1, .supervisor-header h1, .admin-header h1, .inspector-header h1 {
        font-size: 1.75rem !important;
    }
    
    .builder-header .lead, .supervisor-header .lead, .admin-header .lead, .inspector-header .lead {
        font-size: 0.9rem !important;
    }
}

/* Extra small devices (phones, 576px and down) */
@media (max-width: 576px) {
    /* Smaller padding on mobile */
    .stat-card, .action-card, .welcome-card, .quick-stats, .company-info {
        padding: 1rem !important;
    }
    
    /* Smaller stat numbers on mobile */
    .stat-number {
        font-size: 2rem !important;
    }
    
    /* Smaller icons on mobile */
    .stat-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }
    
    .action-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
    }
    
    /* Stack columns on mobile */
    .row .col-sm-4, .row .col-sm-8 {
        width: 100% !important;
        text-align: left !important;
    }
    
    /* Remove borders between stats on mobile */
    .border-right {
        border-right: none !important;
    }
}

/* Ensure dropdown menus work properly on mobile */
.dropdown-toggle::after {
    margin-left: 0.5rem;
}

/* Fix Bootstrap 5 navbar collapse animation */
.navbar-collapse {
    transition: height 0.3s ease-in-out;
}

/* Improve mobile menu visibility */
@media (max-width: 991px) {
    .navbar-collapse.show {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
}

/* Fix for iOS Safari navbar issues */
@supports (-webkit-touch-callout: none) {
    .fixed-top {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* Accessibility improvements */
.navbar-toggler:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Dropdown arrow rotation when open */
.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.dropdown-toggle::after {
    transition: transform 0.3s ease;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Print styles */
@media print {
    #app-header, #footer {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
    }
    
    .container-after-header {
        margin-top: 0 !important;
    }
}
