body {
    background: #f8f9fa;
}

/* Header */
header {
    background: #0d6efd;
    padding: 10px 0;
}

header .navbar-brand {
    color: #fff !important;
    font-weight: bold;
}

header .nav-link,
header .dropdown-item {
    color: #fff;
}

header .nav-link:hover,
header .dropdown-item:hover {
    background: #ccdbf8;
    color: #fff;
}

/* Footer */
footer {
    background: #0d6efd;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
}

/* Card */
.card {
    border-radius: 10px;
}

@media (max-width: 991px) {
    /* Navbar Container: Prevent wrapping so menu stays on the right */
    header .container {
        flex-wrap: nowrap !important;
    }

    header .navbar-brand {
        font-size: 16px; /* Slightly smaller main text */
        padding-left: 15px; 
        max-width: 80%; /* Limit width to leave room for toggler */
        white-space: normal; /* Allow text to wrap lines if needed inside the brand */
    }
    
    /* Reduce size of 'Affiliated to...' text */
    header .navbar-brand small {
        font-size: 10px !important;
        line-height: 1.2;
        display: block; /* Ensure it breaks to new line if meant to be subtitle */
    }

    /* Logo Image Size */
    header .navbar-brand img {
        height: 40px !important; /* Slightly smaller logo */
        width: 40px !important;
    }

    /* Fix Toggle Button touching right */
    header .navbar-toggler {
        margin-right: 15px;
        min-width: 50px; /* Prevent it from shrinking */
    }
    
    /* Fix Menu items touching left when expanded */
    .navbar-collapse {
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 15px;
        /* Ensure collapse takes full width when open */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0d6efd; /* Match header background */
        z-index: 1000;
        width: 100%;
    }
    
    header .nav-item {
        padding-left: 10px; 
    }

    footer p {
        font-size: 14px;
    }

    main.container {
        padding-left: 15px;
        padding-right: 15px;
    }
}
