:root {
    --brand: #12634f;
    --brand-dark: #0b3f34;
    --accent: #f5b942;
    --ink: #17212b;
}

body {
    color: var(--ink);
    background: #f6f8fa;
}

.topbar, .main-nav, .footer {
    background: var(--brand-dark);
    color: #fff;
}

.main-nav .nav-link {
    color: rgba(255, 255, 255, .88);
    font-weight: 500;
}

.main-nav .nav-link:hover {
    color: #fff;
}

.logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    flex: 0 0 auto;
}

.site-header h1 {
    overflow-wrap: anywhere;
}

.notice-marquee {
    background: #fff8e1;
    border-bottom: 1px solid #f2dfaa;
}

.notice-marquee a {
    color: var(--brand-dark);
    font-weight: 600;
    text-decoration: none;
}

.hero-slide {
    min-height: 440px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 32, 28, .82), rgba(8, 32, 28, .35));
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 680px;
    margin: 0 auto;
    padding: 110px 72px;
    text-align: center;
}

.section-title {
    color: var(--brand-dark);
    font-weight: 800;
}

.feature-card, .content-card, .admin-card {
    border: 1px solid #e1e7ea;
    border-radius: 8px;
    background: #fff;
}

.feature-card {
    height: 100%;
    padding: 24px;
}

.service-link-card {
    min-height: 180px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 22px;
    border: 1px solid #dfe7ea;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}

.service-link-card:hover {
    border-color: var(--brand);
    color: var(--ink);
    box-shadow: 0 12px 28px rgba(18, 99, 79, .12);
}

.service-link-card span {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: #e8f4f0;
    color: var(--brand);
    font-size: 1.35rem;
}

.service-link-card strong {
    color: var(--brand-dark);
    font-size: 1.05rem;
}

.service-link-card small {
    color: #667780;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: #e8f4f0;
    color: var(--brand);
    font-size: 1.4rem;
}

.notice-list .list-group-item {
    border-left: 0;
    border-right: 0;
}

.footer a {
    color: #f5d78a;
    text-decoration: none;
}

.developer-credit-btn {
    border: 0;
    padding: 0;
    background: transparent;
    color: #f5d78a;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.developer-credit-btn:hover {
    color: #fff;
}

.developer-modal .modal-content {
    border: 0;
    border-radius: 8px;
    overflow: hidden;
}

.developer-modal-header {
    background: linear-gradient(135deg, #0d86ff, #0757b5);
    color: #fff;
    padding: 20px 24px;
}

.developer-modal-header .modal-title {
    font-size: 1.3rem;
}

.developer-modal-body {
    background: #f7f7fa;
    padding: 34px 32px;
}

.developer-photo {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 18px;
    border: 4px solid #e7e8ec;
    display: block;
    object-fit: cover;
    box-shadow: 0 14px 30px rgba(24, 34, 45, .12);
}

.developer-name {
    margin-bottom: 2px;
    color: #21262c;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 850;
}

.developer-role {
    color: #6c757d;
    font-size: 1.08rem;
    margin-bottom: 18px;
}

.developer-bio {
    color: #555;
    font-size: .95rem;
    line-height: 1.65;
    text-align: justify;
}

.developer-contact-box {
    margin-top: 22px;
    padding: 18px 22px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(24, 34, 45, .08);
}

.developer-contact-box div {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 10px;
    font-size: .95rem;
}

.developer-contact-box div:last-child {
    margin-bottom: 0;
}

.developer-contact-box strong {
    color: #21262c;
}

.developer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

.developer-social {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1.05rem;
    text-decoration: none;
}

.developer-social:hover {
    color: #fff;
    transform: translateY(-2px);
}

.developer-social.facebook {
    background: #385898;
}

.developer-social.email {
    background: #e63145;
}

.developer-social.phone {
    background: #24a547;
}

.developer-social.whatsapp {
    background: #25d366;
}

.teacher-photo, .gallery-img {
    width: 100%;
    aspect-ratio: 6.5 / 8;
    object-fit: cover;
}

.homepage-intro-section {
    padding-bottom: 4.5rem !important;
}

.homepage-intro-col {
    display: flex;
    flex-direction: column;
}

.homepage-intro-col > .section-title {
    min-height: 34px;
    display: flex;
    align-items: center;
}

.principal-profile {
    height: 100%;
    background: #f5f8f7;
    border: 1px solid #dfe8e5;
    border-radius: 8px;
    padding: 12px;
}

.principal-photo {
    width: 100%;
    aspect-ratio: 6.5 / 8;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d7e2df;
    background: #edf2f4;
}

.principal-profile-caption {
    padding: 12px 4px 2px;
}

.principal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.principal-content > p {
    color: #43515a;
}

.principal-message-box {
    margin-top: auto;
    background: #f4f8f7;
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    padding: 18px;
}

.principal-message-box h3 {
    font-size: 1.05rem;
    color: var(--brand-dark);
    font-weight: 750;
    margin-bottom: 8px;
}

.principal-message-box p {
    margin-bottom: 0;
    color: #40505b;
}

.homepage-panel {
    flex: 1 1 auto;
    min-height: 0;
}

.notice-list.homepage-panel {
    display: flex;
    flex-direction: column;
}

.homepage-notice-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: 440px;
}

.homepage-notice-scroll .list-group-item {
    padding-top: 12px;
    padding-bottom: 12px;
}

.homepage-panel-stack {
    height: calc(100% - 52px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.homepage-panel-stack > .content-card {
    flex: 1 1 0;
}

.department-hero {
    background-size: cover;
    background-position: center;
    background-color: #173c36;
    position: relative;
    border-bottom: 1px solid #dfe8e5;
}

.department-hero-overlay {
    min-height: 440px;
    display: flex;
    align-items: center;
    padding: 72px 0;
    background: linear-gradient(90deg, rgba(7, 28, 25, .88), rgba(7, 28, 25, .58) 55%, rgba(7, 28, 25, .3));
}

.department-hero-content {
    max-width: 820px;
    color: #fff;
}

.department-kicker,
.section-eyebrow {
    color: var(--brand);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
    margin-bottom: 8px;
}

.department-title {
    color: var(--brand-dark);
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 850;
    line-height: 1.08;
    margin-bottom: 18px;
}

.department-summary {
    font-size: 1.08rem;
    color: #40505b;
    max-width: 720px;
}

.department-hero .department-kicker,
.department-hero .department-title,
.department-hero .department-summary {
    color: #fff;
}

.department-hero .department-summary {
    max-width: 760px;
    color: rgba(255, 255, 255, .9);
}

.department-hero-info {
    max-width: 780px;
    padding: 18px 20px;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
}

.department-info-label {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.department-hero-info .department-summary {
    margin-bottom: 0;
    line-height: 1.75;
}

.department-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.department-meta span,
.department-contact-grid span,
.teacher-contact-list span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.department-meta span {
    background: #fff;
    border: 1px solid #dce8e4;
    color: var(--brand-dark);
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: 600;
}

.department-hero .department-meta span {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
    backdrop-filter: blur(8px);
}

.section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.department-head-card {
    border: 1px solid #dfe8e5;
    border-left: 5px solid var(--brand);
    border-radius: 8px;
    background: #fff;
    padding: 24px;
}

.department-head-photo {
    width: 100%;
    aspect-ratio: 6.5 / 8;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dce4e8;
    background: #f2f5f7;
}

.department-contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.department-contact-grid span {
    background: #f3f7f6;
    color: #263742;
    border: 1px solid #e1e8e6;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: .94rem;
}

.department-teacher-card {
    height: 100%;
    background: #fff;
    border: 1px solid #dfe7ea;
    border-radius: 8px;
    overflow: hidden;
}

.department-teacher-photo {
    width: 100%;
    aspect-ratio: 6.5 / 8;
    object-fit: cover;
    background: #edf2f4;
}

.department-teacher-body {
    padding: 16px;
}

.department-teacher-body h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--brand-dark);
    font-weight: 750;
}

.teacher-role {
    color: #65737c;
    font-size: .95rem;
}

.teacher-subject {
    color: #1d3c35;
    font-weight: 650;
    margin-top: 6px;
}

.teacher-qualification {
    color: #65737c;
    font-size: .9rem;
    margin-top: 4px;
}

.teacher-contact-list {
    display: grid;
    gap: 5px;
    margin-top: 12px;
    color: #4d5b63;
    font-size: .9rem;
}

.admin-sidebar {
    min-height: 100vh;
    background: var(--brand-dark);
}

.admin-mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--brand-dark);
    color: #fff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .18);
}

.admin-sidebar-backdrop {
    display: none;
}

.admin-sidebar a {
    color: rgba(255,255,255,.82);
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    border-radius: 6px;
}

.admin-sidebar a:hover, .admin-sidebar a.active {
    color: #fff;
    background: rgba(255,255,255,.12);
}

.admin-menu-toggle {
    width: 100%;
    border: 0;
    color: rgba(255,255,255,.9);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 6px;
    font-weight: 600;
}

.admin-menu-toggle:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.admin-submenu {
    margin: 2px 0 8px 12px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,.16);
}

.admin-submenu a {
    padding: 8px 12px;
    font-size: .94rem;
}

.admin-loader {
    min-height: 260px;
    display: grid;
    place-content: center;
}

.admin-table-panel {
    overflow: hidden;
}

.admin-table-panel .dt-container {
    width: 100%;
}

.dt-container {
    position: relative;
}

#adminDataTable th,
#adminDataTable td {
    white-space: nowrap;
    vertical-align: middle;
}

#adminDataTable td {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-notice-title {
    max-width: min(620px, 70vw);
    display: inline-block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.admin-table-thumb {
    width: 54px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #d9e1e5;
    background: #f4f6f8;
}

div.dt-processing {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 20;
    min-width: 180px;
    margin: 0;
    padding: 18px 22px;
    transform: translate(-50%, -50%);
    border: 1px solid #dfe7ea;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 34px rgba(24, 34, 45, .14);
    color: var(--brand-dark);
    font-weight: 700;
    text-align: center;
}

div.dt-processing::before {
    content: "";
    width: 2rem;
    height: 2rem;
    display: block;
    margin: 0 auto 10px;
    border: .22rem solid #dce8e4;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: dt-loader-spin .75s linear infinite;
}

div.dt-processing > div {
    display: none;
}

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

@media (max-width: 767px) {
    .topbar .container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px !important;
        text-align: center;
        line-height: 1.45;
    }

    .topbar span {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .site-header > .container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 10px !important;
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    .logo {
        width: 62px;
        height: 62px;
    }

    .site-header h1 {
        font-size: 1.25rem;
        line-height: 1.25;
        margin-bottom: 4px !important;
    }

    .site-header .text-muted {
        font-size: .92rem;
        line-height: 1.35;
    }

    .developer-modal-header {
        padding: 16px 18px;
    }

    .developer-modal-header .modal-title {
        font-size: 1.05rem;
    }

    .developer-modal-body {
        padding: 22px 16px;
    }

    .developer-photo {
        max-width: 220px;
    }

    .developer-role {
        font-size: .98rem;
    }

    .developer-bio {
        text-align: left;
        font-size: .9rem;
    }

    .developer-contact-box {
        padding: 16px;
    }

    .developer-contact-box div {
        grid-template-columns: 1fr;
        gap: 3px;
        font-size: .9rem;
    }

    .developer-socials {
        justify-content: center;
        gap: 14px;
    }

    .developer-social {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .hero-slide {
        min-height: 360px;
    }
    .hero-content {
        padding: 70px 48px;
    }
    .department-hero-overlay {
        min-height: 380px;
        padding: 56px 0;
        background: linear-gradient(180deg, rgba(7, 28, 25, .82), rgba(7, 28, 25, .62));
    }
    .department-summary {
        font-size: 1rem;
    }
    .department-hero-info {
        padding: 14px 16px;
    }
    .department-hero-info .department-summary {
        line-height: 1.6;
    }
}

@media (max-width: 991.98px) {
    .homepage-intro-col > .section-title {
        min-height: auto;
    }

    .homepage-panel {
        height: auto !important;
    }
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(84vw, 320px);
        z-index: 1055;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 12px 0 36px rgba(0, 0, 0, .28);
    }

    .admin-main {
        width: 100%;
        padding: 18px !important;
    }

    .admin-sidebar-open {
        overflow: hidden;
    }

    .admin-sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-open .admin-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1050;
        background: rgba(0, 0, 0, .42);
    }

    .admin-menu-toggle,
    .admin-sidebar a {
        min-height: 44px;
    }
}
