/* Little Jewels School — frontend theme */
:root {
    --brand-primary: #0047AB;
    --brand-dark: #003380;
    --brand-darker: #002858;
    --brand-light: #1a5fc4;
    --brand-lighter: #4d8fd9;
    --brand-pale: #e8f0fa;
    --page-tint: #eef3fb;
    --green-dark: var(--brand-dark);
    --green-main: var(--brand-primary);
    --green-light: var(--brand-light);
    --green-nav: var(--brand-primary);
    --red-fee: #dc3545;
    --orange-login: #e85d04;
    --teal-header: var(--brand-primary);
    --teal-header-light: var(--brand-lighter);
    --white: #fff;
    --gray-light: #f5f5f5;
    --gray-bg: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    overflow-x: hidden;
}

.text-success {
    color: var(--brand-primary) !important;
}

/* Main Header */
.main-header {
    background: var(--white);
    color: #333;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 71, 171, 0.06);
}

.main-header a:has(.school-logo) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 0;
    max-width: 76px;
    max-height: 76px;
}

.school-logo {
    width: auto;
    height: auto;
    max-width: 72px;
    max-height: 72px;
    object-fit: contain;
    object-position: center;
    border-radius: 6px;
    display: block;
}

.estd-text {
    color: var(--brand-primary);
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
    font-weight: 600;
}

.school-title {
    font-size: 2.35rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

.school-address {
    font-size: 1.05rem;
    color: var(--brand-primary);
    margin-bottom: 0;
}

.header-eiin {
    font-size: 1.08rem;
    color: var(--brand-primary);
    font-weight: 500;
}

.header-contact {
    font-size: 1.02rem;
    color: var(--brand-primary);
    line-height: 1.55;
}

.header-contact a {
    color: var(--brand-primary) !important;
    text-decoration: none;
}

.header-contact a:hover {
    color: var(--brand-dark) !important;
    text-decoration: underline;
}

.header-contact i {
    color: var(--brand-primary);
}

.main-header .btn-fee {
    background: var(--red-fee);
    color: var(--white) !important;
    padding: 0.35rem 1rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.main-header .btn-login {
    background: var(--orange-login);
    color: var(--white) !important;
    padding: 0.35rem 1rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.main-header .btn-fee:hover,
.main-header .btn-login:hover {
    opacity: 0.9;
    color: var(--white) !important;
}

@media (max-width: 768px) {
    .main-header .row > div {
        text-align: center !important;
    }
    .main-header a:has(.school-logo) {
        max-width: 64px;
        max-height: 64px;
    }
    .school-logo {
        max-width: 60px;
        max-height: 60px;
    }
    .school-title { font-size: 1.75rem; }
    .school-address { font-size: 0.95rem; }
}

/* Navigation - Green */
.main-nav {
    background: var(--green-nav);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0.5rem 0;
    gap: 0;
    justify-content: space-evenly;
    flex: 1;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background: rgba(255, 255, 255, 0.5);
}

.nav-menu > li > a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--white) !important;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background: rgba(255, 255, 255, 0.2);
}

.nav-menu .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    z-index: 100;
    border-radius: 4px;
}

.nav-menu > li.dropdown:hover > .dropdown-menu {
    display: block;
}

.nav-menu .dropdown-menu .dropdown-submenu {
    position: relative;
}

.nav-menu .dropdown-menu .submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 2px;
    background: var(--white);
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    z-index: 110;
    border-radius: 4px;
}

.nav-menu .dropdown-submenu:hover > .submenu {
    display: block;
}

.nav-menu .dropdown-menu .dropdown-submenu > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.nav-menu .dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333 !important;
    text-decoration: none;
}

.nav-menu .dropdown-menu a:hover {
    background: var(--gray-bg);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 4px 0;
}

@media (max-width: 992px) {
    .main-nav .container { flex-wrap: wrap; justify-content: flex-end; }
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 99;
        background: rgba(0,0,0,0.15);
    }
    .nav-menu.active { display: flex; }
    .nav-menu > li:not(:last-child)::after { display: none; }
    .nav-menu .dropdown-menu {
        position: static;
        display: none;
        background: rgba(0,0,0,0.1);
    }
    .nav-menu > li.dropdown.active > .dropdown-menu { display: block; }
    .nav-menu .dropdown-menu .submenu {
        position: static;
        margin-left: 0;
        display: none;
        background: rgba(0,0,0,0.08);
    }
    .nav-menu .dropdown-submenu.active > .submenu { display: block; }
}

/* Latest Notices Ticker Bar */
.notice-ticker-bar {
    background: var(--page-tint);
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.notice-ticker-wrapper {
    display: flex;
    align-items: stretch;
    min-height: 44px;
}

.notice-ticker-label {
    background: var(--brand-primary);
    color: var(--white);
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.notice-ticker-content {
    flex: 1;
    background: var(--white);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.notice-ticker-scroll {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    animation: ticker-scroll 30s linear infinite;
}

.notice-ticker-scroll:hover {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.notice-ticker-item {
    display: inline-flex;
    align-items: center;
    color: var(--brand-primary) !important;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 0 0.5rem;
}

.notice-ticker-item:hover {
    text-decoration: underline;
}

.notice-ticker-item i {
    font-size: 0.8rem;
    margin-right: 0.35rem;
    color: var(--brand-primary);
}

.ticker-sep {
    color: #ddd;
    font-size: 0.8rem;
    padding: 0 0.25rem;
}

@media (max-width: 768px) {
    .notice-ticker-wrapper {
        flex-direction: column;
    }

    .notice-ticker-label {
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
        white-space: normal;
        text-align: center;
        padding: 0.65rem 1rem;
    }

    /* Colored ticker label: full-bleed gradient on narrow screens */
    .notice-ticker-bar .notice-ticker-label.home-ticker-label {
        background-size: 100% 100%;
    }
}

/* Section Box - Common */
.section-box {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.section-header {
    background: var(--green-main);
    color: var(--white);
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 1rem;
}

.section-header-light {
    background: #555;
    color: var(--white);
}

/* Home: section headers — brand blue */
.section-header--home-slider,
.section-header--home-notices,
.section-header--home-message,
.section-header--home-events,
.section-header--home-calendar,
.section-header--home-news,
.section-header--home-contact,
.section-header--home-gallery,
.section-header--home-history,
.section-header--home-independence,
.section-header--home-videos,
.section-header--home-visitor,
.section-header--home-teachers,
.section-header--home-links,
.section-header--home-address,
.section-header--home-accreditation {
    background: linear-gradient(135deg, var(--brand-darker) 0%, var(--brand-primary) 50%, var(--brand-light) 100%);
    color: var(--white);
}

.section-header--home-contact,
.section-header--home-accreditation {
    display: flex;
    align-items: center;
    letter-spacing: 0.02em;
}

.contact-us-box {
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 71, 171, 0.12), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    overflow: hidden;
}

.contact-us-strip {
    padding: 1.25rem 1rem 1.35rem;
    background: linear-gradient(165deg, #f5f9fd 0%, var(--page-tint) 50%, var(--brand-pale) 100%);
}

/* Home — Contact Us: three plain text columns (address / email / phone per column) */
.contact-us-strip--tri-grid {
    padding: 1.5rem 1.25rem 1.75rem;
    background: var(--white);
    overflow: visible;
}

.contact-us-strip--tri-grid .home-contact-grid > [class*="col-"] {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.home-contact-grid {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.home-contact-column__title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin: 0 0 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 71, 171, 0.15);
}

.home-contact-column {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.98rem;
    color: #333;
    line-height: 1.65;
    text-align: left;
    height: 100%;
    padding: 1.15rem 1.2rem;
    background: var(--white);
    border-radius: 10px;
    border: 1px solid rgba(0, 71, 171, 0.1);
    box-shadow: 0 4px 14px rgba(0, 71, 171, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.home-contact-column:hover {
    box-shadow: 0 10px 28px rgba(0, 71, 171, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.home-contact-line {
    margin-bottom: 0;
}

.home-contact-plain-link {
    color: inherit;
    text-decoration: none;
    font-weight: 400;
}

.home-contact-plain-link:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

@media (min-width: 768px) {
    .contact-us-strip {
        padding: 1.5rem 1.35rem 1.65rem;
    }
}

.contact-us-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .contact-us-row {
        flex-direction: row;
        align-items: stretch;
        gap: 1.1rem;
    }

    .contact-us-item {
        flex: 1 1 0;
        min-width: 0;
        padding: 0;
        border-right: none;
    }

    .contact-us-item:first-child,
    .contact-us-item:last-child {
        padding-left: 0;
        padding-right: 0;
    }
}

.contact-us-item-inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
    height: 100%;
    padding: 1.15rem 1.1rem;
    border: 1px solid rgba(45, 122, 62, 0.12);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 2px 12px rgba(26, 95, 58, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.contact-us-item-inner:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(26, 95, 58, 0.12);
    border-color: rgba(45, 122, 62, 0.22);
}

.contact-us-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    font-size: 1.35rem;
    color: var(--white);
    border-radius: 12px;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.contact-us-item--address .contact-us-icon,
.contact-us-item--phone .contact-us-icon,
.contact-us-item--email .contact-us-icon {
    background: linear-gradient(145deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
}

.contact-us-body {
    flex: 1;
    min-width: 0;
    padding-top: 0.1rem;
}

.contact-us-label {
    display: block;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-primary);
    margin-bottom: 0.35rem;
}

.contact-us-lead {
    font-size: 1.02rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.55;
    margin: 0 0 0.75rem;
}

.contact-us-lead--plain {
    margin-bottom: 0;
}

.contact-us-inline-sep {
    color: #64748b;
    font-weight: 400;
}

.contact-us-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    padding: 0.4rem 0.75rem 0.4rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
    box-shadow: 0 2px 8px rgba(0, 71, 171, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.contact-us-map-link:hover {
    color: var(--white);
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 71, 171, 0.45);
}

.contact-us-map-link__arrow {
    font-size: 0.7rem;
    opacity: 0.9;
}

.contact-us-link {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    word-break: break-word;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-us-link:hover {
    color: var(--brand-dark);
    border-bottom-color: rgba(0, 71, 171, 0.45);
}

.contact-us-sep {
    margin: 0 0.35rem;
    color: #94a3b8;
    font-weight: 400;
}

.quick-links-deck .quick-links-columns {
    overflow: hidden;
}

.quick-links-deck .quick-links-col .quick-links-list {
    padding: 1rem 1.15rem 1.15rem;
    min-height: 100%;
}

@media (min-width: 768px) {
    .quick-links-deck .quick-links-col {
        border-right: 1px solid #e8e8e8;
    }

    .quick-links-deck .quick-links-col:last-child {
        border-right: none;
    }
}

@media (max-width: 767.98px) {
    .quick-links-deck .quick-links-col {
        border-bottom: 1px solid #e8e8e8;
    }

    .quick-links-deck .quick-links-col:last-child {
        border-bottom: none;
    }
}

.accreditation-columns--cards {
    overflow: visible;
}

.accreditation-item,
.accreditation-item--static {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 100%;
    height: 100%;
    padding: 1.25rem 1rem 1.35rem;
    text-align: center;
    text-decoration: none;
    color: #1e293b;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid #e8ecf4;
    box-shadow: 0 4px 14px rgba(0, 71, 171, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.22s ease, transform 0.22s ease, color 0.2s ease;
}

.accreditation-item:hover {
    color: var(--brand-primary);
    box-shadow: 0 10px 28px rgba(0, 71, 171, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.accreditation-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.45rem;
    color: var(--white);
    border-radius: 12px;
    background: linear-gradient(145deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
    box-shadow: 0 4px 12px rgba(0, 71, 171, 0.2);
    overflow: hidden;
}

.accreditation-badge__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--white);
    padding: 0.25rem;
}

.accreditation-name {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.notice-ticker-bar .notice-ticker-label.home-ticker-label {
    background: linear-gradient(135deg, #a16207 0%, #ca8a04 100%);
}

/* Home colored headers: mobile / small screens (match desktop accents, readable layout) */
@media (max-width: 767.98px) {
    .section-header[class*="section-header--home-"] {
        font-size: 0.92rem;
        line-height: 1.35;
        padding: 0.65rem 0.85rem !important;
        overflow-wrap: break-word;
        word-wrap: break-word;
        background-repeat: no-repeat;
        background-size: 100% 100%;
    }

    .teachers-scroll-box .section-header.section-header--home-teachers {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
        gap: 0.5rem;
    }

    .teachers-scroll-box .section-header.section-header--home-teachers .btn-see-all {
        align-self: center;
        margin: 0 !important;
    }
}

@media (max-width: 575.98px) {
    .section-header[class*="section-header--home-"] {
        font-size: 0.88rem;
        padding: 0.6rem 0.75rem !important;
    }
}

/* Latest Notices */
.notice-carousel-img {
    height: 380px;
    object-fit: cover;
}

.latest-notices .carousel {
    position: relative;
    /* allow controls above caption */
    --bs-carousel-caption-spacer: 1rem;
}

/* Home hero: smoother slide (respect reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
    .home-slider-section #noticeCarousel.home-carousel-autoplay {
        --bs-carousel-transition: transform 0.75s ease-in-out;
    }

    .home-slider-section #noticeCarousel.home-carousel-autoplay .carousel-item {
        transition-duration: 0.75s;
        transition-timing-function: ease-in-out;
    }
}

.latest-notices .carousel-control-prev,
.latest-notices .carousel-control-next {
    z-index: 4;
    width: 10%;
    opacity: 0.85;
}

.latest-notices .carousel-control-prev:hover,
.latest-notices .carousel-control-next:hover {
    opacity: 1;
}

.notice-carousel-caption {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem 1rem 1rem !important;
    border-radius: 0 0 4px 4px;
}

.latest-notices .notice-carousel-indicators {
    z-index: 5;
    margin-bottom: 3.25rem;
}

/* Home: full-width hero slider (edge-to-edge) */
.home-slider-section .home-slider-section__box {
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.home-slider-section .home-slider-section__img {
    border-radius: 0 !important;
}

.home-slider-section .home-slider-section__caption {
    border-radius: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.home-slider-section .home-slider-section__caption .container {
    padding-bottom: 0.25rem;
}

.notice-list {
    padding: 1rem;
}

.notice-item {
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
}

.notice-item:last-of-type {
    border-bottom: none;
}

.notice-date {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.2rem;
}

.notice-item a {
    color: #333;
    text-decoration: none;
}

.notice-item a:hover {
    color: var(--green-main);
}

.read-more {
    font-size: 0.85rem;
    color: var(--green-main) !important;
    display: inline-block;
    margin-top: 0.2rem;
}

.btn-see-all {
    display: inline-block;
    margin: 1rem;
    padding: 0.4rem 1rem;
    background: var(--brand-pale);
    color: var(--brand-primary);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-see-all:hover {
    background: #d6e6f8;
    color: var(--brand-dark);
}

@media (max-width: 768px) {
    .notice-carousel-img { height: 250px; }
}

/* History & Independence Corner */
.history-independence {
    background: var(--page-tint);
    border-top: 1px solid #e0e0e0;
}

.history-content {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem;
    align-items: flex-start;
}

.history-image {
    flex: 0 0 45%;
    min-width: 0;
}

.history-image img {
    width: 100%;
    height: auto;
    display: block;
}

.history-text {
    flex: 1;
    min-width: 0;
}

.history-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #333;
}

.btn-see-more {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    background: #2196f3;
    color: var(--white) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-see-more:hover {
    background: var(--brand-primary);
    color: var(--white) !important;
}

.independence-box .section-header {
    margin: 0;
}

.independence-image {
    padding: 0;
    overflow: hidden;
}

.independence-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

@media (max-width: 768px) {
    .history-content {
        flex-direction: column;
    }
    .history-image {
        flex: none;
        width: 100%;
    }
}

/* Message Section */
.message-section {
    background: var(--page-tint);
}

.message-section-box {
    background: #f5faf0;
    border: 1px solid #e5ecd8;
    overflow: hidden;
}

.message-section-box .section-header {
    text-align: center;
    padding: 0.75rem 1rem;
}

.message-content {
    padding: 2.5rem 2rem;
}

.message-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 0 0 1.5rem;
}

.message-card:last-child {
    padding-bottom: 0;
}

.message-card-image {
    flex-shrink: 0;
}

.message-card-content {
    flex: 1;
    min-width: 0;
}

.message-avatar {
    width: 180px;
    height: 180px;
    object-fit: cover;
    display: block;
}

.message-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.35rem;
    text-align: left;
}

.message-title {
    font-size: 0.85rem;
    font-style: italic;
    color: #444;
    margin-bottom: 1rem;
    text-align: left;
}

.message-text {
    font-size: 0.9rem;
    text-align: left;
    margin: 0 0 1rem;
    line-height: 1.75;
    color: #333;
}

.link-read-message {
    display: inline-block;
    color: var(--brand-primary) !important;
    text-decoration: underline;
    font-size: 0.9rem;
    text-align: left;
}

.link-read-message:hover {
    color: var(--brand-dark) !important;
}

@media (max-width: 768px) {
    .message-content {
        padding: 1.5rem 1rem;
    }
    .message-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .message-card-content {
        text-align: center;
    }
    .message-name,
    .message-title,
    .message-text,
    .link-read-message {
        text-align: center !important;
    }
    .message-avatar {
        width: 150px;
        height: 150px;
    }
}

/* Events & Academic Calendar Section */
.events-calendar {
    background: var(--page-tint);
}

.events-section-box,
.calendar-section-box {
    background: var(--white);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.events-section-box .section-header,
.calendar-section-box .section-header {
    padding: 0.75rem 1rem;
}

/* Events Cards */
.events-cards {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
}

.events-cards--all {
    flex-wrap: wrap;
}

.events-cards--all .event-card {
    flex: 1 1 240px;
    max-width: 100%;
}

.event-card {
    flex: 1;
    background: var(--white);
    border: 1px solid #ddd;
    overflow: hidden;
}

a.event-card {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

a.event-card:hover {
    border-color: var(--green-main);
    box-shadow: 0 2px 10px rgba(45, 122, 62, 0.12);
}

.event-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.event-card-title {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    color: #333;
}

/* Academic Calendar */
.calendar-content {
    padding: 1.25rem;
}

.calendar-legend {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.legend-item {
    margin-right: 1.25rem;
    display: inline-flex;
    align-items: center;
}

.legend-box {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 0.35rem;
}

.legend-event { background: var(--green-main); }
.legend-holiday { background: var(--red-fee); }
.legend-exam { background: var(--brand-primary); }

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-month {
    font-weight: 600;
    font-size: 1rem;
}

.calendar-nav button {
    background: var(--gray-bg);
    border: 1px solid #ddd;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.calendar-table {
    width: 100%;
    font-size: 0.9rem;
    border-collapse: collapse;
    background: var(--white);
}

.calendar-table th,
.calendar-table td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: center;
}

.calendar-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.calendar-table td {
    vertical-align: top;
}

.calendar-table .holiday {
    color: #333;
}

.calendar-table .holiday span {
    display: block;
}

.holiday-marker {
    display: block;
    width: 8px;
    height: 8px;
    background: var(--red-fee);
    margin: 2px auto 0;
    border-radius: 1px;
}

@media (max-width: 991px) {
    .events-cards {
        flex-direction: column;
    }
    .event-card-img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .event-card-img {
        height: 180px;
    }
}

/* Videos Section */
.videos-visitor {
    background: var(--page-tint);
}

.videos-section-box {
    background: #f5faf0;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.videos-section-box .section-header {
    text-align: center;
    padding: 0.75rem 1rem;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    padding: 1.5rem;
}

.video-card {
    text-decoration: none;
    color: inherit;
    display: block;
    background: var(--white);
    border: 2px solid #333;
    overflow: hidden;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-2px);
}

.video-card:nth-child(3) {
    grid-column: 1;
}

.videos-grid--fluid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.videos-grid--fluid .video-card:nth-child(n) {
    grid-column: auto;
}

.videos-grid--page {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    padding: 0;
}

.videos-grid--page .video-card:nth-child(n) {
    grid-column: auto;
}

.video-card-thumb {
    position: relative;
    overflow: hidden;
}

.video-card-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    color: #ff0000;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.video-card-title {
    padding: 0.6rem 0.75rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.video-card-subtitle {
    display: block;
    padding: 0 0.75rem 0.6rem;
    font-size: 0.8rem;
    color: #666;
}

@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
    .video-card:nth-child(3) {
        grid-column: 1;
    }
    .video-card-thumb img {
        height: 180px;
    }
}

/* Visitor */
.visitor-stats {
    padding: 1rem;
}

.visitor-item {
    display: flex;
    align-items: center;
    padding: 0.6rem;
    background: var(--gray-bg);
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.visitor-item:last-child {
    margin-bottom: 0;
}

.visitor-item i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    color: var(--green-main);
}

.visitor-item span {
    flex: 1;
}

.visitor-item strong {
    color: var(--green-dark);
}

/* Quick Links & Address */
.news-list {
    list-style: none;
    margin: 0;
    padding: 1rem;
}

.news-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ececec;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list a {
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
}

.news-list a:hover {
    color: var(--green-main);
}

.news-list i {
    color: var(--brand-primary);
}

/* Home News + Notice — equal height, 5 rows each */
.home-news-notice-row {
    align-items: stretch;
}

.home-feed-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
}

.home-feed-list {
    list-style: none;
    margin: 0;
    padding: 0.75rem 1rem;
    flex: 1 1 auto;
    display: grid;
    grid-template-rows: repeat(5, minmax(88px, 1fr));
    min-height: 440px;
}

.home-feed-item {
    display: flex;
    align-items: center;
    min-height: 88px;
    border-bottom: 1px solid #ececec;
    overflow: hidden;
}

.home-feed-item:last-child {
    border-bottom: none;
}

.home-feed-item--empty {
    visibility: hidden;
    pointer-events: none;
}

.home-feed-item--message {
    grid-row: 1 / -1;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: none;
}

.home-feed-item__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.home-feed-item__link:hover .home-feed-item__title {
    color: var(--brand-primary);
}

.home-feed-item__thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef3fb;
    border: 1px solid #e5e7eb;
}

.home-feed-item__thumb--notice {
    background: #fff8e8;
    border-color: #f0e4c8;
}

.home-feed-item__thumb--notice .home-feed-item__thumb-placeholder {
    color: #b45309;
}

.home-feed-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-feed-item__thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--brand-primary);
    font-size: 1.35rem;
}

.home-feed-item__body {
    flex: 1;
    min-width: 0;
}

.home-feed-item__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.92rem;
    color: #333;
    line-height: 1.35;
    font-weight: 500;
}

.home-feed-item__date {
    display: block;
    margin-top: 0.2rem;
    color: #6b7280;
    font-size: 0.78rem;
}

.home-feed-item__title i {
    color: var(--brand-primary);
}

.home-feed-footer {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    text-align: center;
    border-top: 1px solid #ececec;
}

@media (max-width: 991.98px) {
    .home-feed-list {
        min-height: 0;
        grid-template-rows: none;
    }

    .home-feed-item {
        min-height: 88px;
    }

    .home-feed-item--empty {
        display: none;
    }
}

.gallery-grid {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.gallery-grid img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.quick-links-list {
    list-style: none;
    padding: 1rem;
    margin: 0;
}

.quick-links-list li {
    padding: 0.4rem 0;
}

.quick-links-list a {
    color: #333;
    text-decoration: none;
}

.quick-links-list a:hover {
    color: var(--brand-primary);
}

.quick-links-list .bi-check2 {
    color: var(--brand-primary) !important;
}

.map-placeholder iframe {
    width: 100%;
    min-height: 200px;
}

.google-play-btn img {
    max-height: 40px;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-grid a.gallery-thumb {
    display: block;
}

.gallery-grid a.gallery-thumb img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.teachers-scroll-box .section-header .btn-see-all {
    background: var(--brand-pale);
    color: var(--brand-primary);
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

.teachers-scroll-box .section-header .btn-see-all:hover {
    background: #d6e6f8;
    color: var(--brand-dark);
}

.teachers-marquee-wrap {
    overflow: hidden;
    background: #fff;
    padding: 1rem 0;
}

.teachers-marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: teachers-rtl-scroll 32s linear infinite;
}

.teachers-marquee-wrap:hover .teachers-marquee-track {
    animation-play-state: paused;
}

.teacher-marquee-card {
    width: 150px;
    min-width: 150px;
    text-decoration: none;
    color: #333;
    text-align: center;
    margin: 0 0.55rem;
    padding: 0.6rem 0.55rem;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fafafa;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.teacher-marquee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.teacher-marquee-card img {
    width: 86px;
    height: 86px;
    object-fit: contain;
    object-position: center;
    border-radius: 50%;
    border: 2px solid #dfe7df;
    display: block;
    margin: 0 auto 0.5rem;
    background: #f1f4f1;
    padding: 3px;
}

.teacher-marquee-name {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes teachers-rtl-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.gallery-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-page-thumb-wrap {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}

.gallery-page-thumb-wrap img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.gallery-page-thumb:hover .gallery-page-thumb-wrap {
    outline: 2px solid var(--brand-primary);
}

/* Footer */
.main-footer {
    background: var(--green-dark);
    color: var(--white);
    text-align: center;
    font-size: 0.9rem;
}

/* Inner pages */
.inner-page .inner-main {
    background: var(--page-tint);
}

.page-banner {
    background: var(--green-dark);
    color: var(--white);
    padding: 1rem 0 1.25rem;
}

.page-banner .breadcrumb {
    padding: 0;
    margin-bottom: 0.5rem;
    background: transparent;
}

.page-banner .breadcrumb-item,
.page-banner .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
}

.page-banner .breadcrumb-item.active {
    color: var(--white);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--white);
}

.notice-table td {
    font-size: 0.9rem;
}

.gallery-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.gallery-page-item {
    margin: 0;
    background: var(--white);
    border: 1px solid #ddd;
    overflow: hidden;
}

.gallery-page-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-page-item figcaption {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: #444;
    background: #fafafa;
}

@media (max-width: 768px) {
    .teacher-marquee-card {
        width: 122px;
        min-width: 122px;
        margin: 0 0.4rem;
        padding: 0.5rem 0.4rem;
    }

    .teacher-marquee-card img {
        width: 72px;
        height: 72px;
    }

    .teacher-marquee-name {
        font-size: 0.8rem;
    }

    .teachers-marquee-track {
        animation-duration: 24s;
    }
}
