.mobile-hide {
    @media (max-width: 992px) {
        display: none;
    }
}


.mobile-width {
    width: 100%;

    @media (max-width: 992px) {
        width: 75%;
    }
}


body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f4f7fb;
}

.page-content {
    flex: 1;
}

.site-footer {
    margin-top: auto;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: #f1f5ff;
    padding: 2.5rem 0 1.5rem;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.15);
}

.site-footer a {
    color: #f1f5ff;
}

#footer-logo {
    width: 100px;
    height: auto;
    border-radius: 8px;
}

.footer-tagline {
    font-weight: 600;
    color: #f1f5ff;
}

.footer-heading {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    text-underline-offset: 4px;
}

.footer-link {
    text-decoration: none;
    transition: opacity 0.15s ease-in-out;
}

.footer-link:hover {
    opacity: 0.75;
    text-decoration: underline;
}

.class-agenda {
    transform: translateX(88px);
}

@media (max-width: 992px) {
    .class-agenda {
        transform: none;
    }
}


#logo {
    width: 150px;
    height: 50px;
}

.dropdown-item.text-danger:hover,
.dropdown-item.text-danger:focus {
    background-color: #f8d7da;
    color: #b02a37 !important;
}

/* ---------- Navbar ---------- */

.site-navbar {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    box-shadow: 0 2px 20px rgba(13, 110, 253, 0.25);
}

.site-navbar .navbar-toggler {
    flex-shrink: 0;
}

.site-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    transition: opacity 0.15s ease;
}

.site-navbar .navbar-brand:hover {
    opacity: 0.88;
}

.site-navbar .navbar-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    line-height: 1.25;
}

.site-navbar .navbar-brand-title {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 420px) {
    .site-navbar .navbar-brand-title {
        font-size: 0.8rem;
    }
}

.site-navbar .navbar-brand-tagline {
    display: none;
    font-weight: 400;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
    margin-top: 0.15rem;
}

@media (min-width: 576px) {
    .site-navbar .navbar-brand-tagline {
        display: block;
    }
}

.site-navbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.15s ease;
}

.site-navbar .navbar-nav .nav-link:hover,
.site-navbar .navbar-nav .nav-link:focus {
    color: #fff;
}

.site-navbar .navbar-nav .nav-link:not(.dropdown-toggle) {
    position: relative;
}

.site-navbar .navbar-nav .nav-link:not(.dropdown-toggle)::after {
    content: "";
    position: absolute;
    right: 0.5rem;
    left: 0.5rem;
    bottom: -2px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.site-navbar .navbar-nav .nav-link:not(.dropdown-toggle):hover::after {
    transform: scaleX(1);
}

.site-navbar .dropdown-item {
    border-radius: 0.4rem;
    padding-block: 0.5rem;
}

.site-navbar .dropdown-item:hover,
.site-navbar .dropdown-item:focus {
    background-color: rgba(13, 110, 253, 0.08);
    color: #0a58ca;
}

.site-navbar .btn-outline-light,
.site-navbar .btn-light {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.site-navbar .btn-outline-light:hover {
    transform: translateY(-1px);
}

.site-navbar .btn-light:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-profile-card {
    background: #fff;
    border-radius: 0.9rem;
    overflow: hidden;
    margin: 0.5rem 0 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.mobile-profile-header {
    padding: 0.9rem 1rem;
    background: #f4f7fb;
}

.mobile-profile-links {
    padding: 0.4rem;
}

.mobile-profile-links.border-top {
    border-top: 1px solid #eef1f6 !important;
}

.mobile-profile-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    color: #1a2230;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.mobile-profile-link:hover {
    background-color: rgba(13, 110, 253, 0.06);
    color: #0a58ca;
}

.mobile-profile-link.text-danger:hover {
    background-color: #f8d7da;
    color: #b02a37 !important;
}


@media (max-width: 420px) {
    #logo {
        width: 90px;
        height: 30px;
    }
}

/* ---------- Content cards (home + subject pages) ---------- */

.content-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 4px 18px rgba(13, 30, 60, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(13, 30, 60, 0.12);
}

.content-card .card-header {
    background: #fff;
    border-bottom: 1px solid #eef1f6;
    padding: 1rem 1.25rem 0.6rem;
}

.content-card .card-body {
    padding: 1.1rem 1.25rem 1.4rem;
}

.content-card img.card-img {
    display: block;
    margin: 0.75rem auto 0;
    width: 100%;
    height: 260px;
    object-fit: contain;
    border-radius: 0.75rem;
}

.card-empty {
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
    padding: 1.25rem 0;
}

.section-badge {
    display: inline-block;
    background: rgba(13, 110, 253, 0.1);
    color: #0a58ca;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 50rem;
}

/* ---------- Home hero ---------- */

.home-hero {
    background: linear-gradient(180deg, #eaf1ff 0%, #f4f7fb 100%);
    border-radius: 1.25rem;
    padding: 3rem 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.home-hero h1 {
    font-weight: 700;
    color: #0a2540;
}

.home-hero p {
    color: #51607a;
    max-width: 40rem;
    margin: 0.75rem auto 1.5rem;
}

/* ---------- Subject page ---------- */

.subject-header {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    border-radius: 1.25rem;
    padding: 1.75rem;
    color: #fff;
    margin-bottom: 1.75rem;
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.2);
}

.subject-header h1 {
    font-weight: 700;
    margin: 0;
}

.resource-section {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 4px 18px rgba(13, 30, 60, 0.06);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.resource-section .accordion-button {
    background: #fff;
    font-weight: 700;
    padding: 1rem 1.25rem;
    box-shadow: none;
    gap: 0.75rem;
}

.subject-filter-bar {
    gap: 0.5rem;
}

.resource-section .accordion-button:not(.collapsed) {
    background: rgba(13, 110, 253, 0.06);
    color: #0a58ca;
    box-shadow: none;
    border-bottom: 1px solid #eef1f6;
}

.resource-section .accordion-button:focus {
    box-shadow: none;
}

.resource-section .accordion-button .badge {
    font-weight: 500;
}

.resource-section .list-group-item {
    border: 0;
    border-bottom: 1px solid #f1f4f8;
    padding: 0.85rem 1.25rem;
    transition: background-color 0.15s ease;
}

.resource-section .list-group-item:last-child {
    border-bottom: 0;
}

.resource-section .list-group-item:hover {
    background-color: rgba(13, 110, 253, 0.04);
}

.resource-section table a:hover {
    color: #0a58ca;
}

.resource-empty {
    color: #94a3b8;
    text-align: center;
    padding: 1.25rem;
    font-size: 0.9rem;
}