/* ===============================================
   Tamirul Ummah Madrasa Frontend Styles
   Modern Islamic Educational Theme
   =============================================== */

:root {
    /* Primary Color Scheme - Islamic Green */
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;

    /* Secondary Color Scheme - Navy Blue */
    --secondary-color: #1e3a8a;
    --secondary-dark: #1e40af;
    --secondary-light: #3b82f6;

    /* Accent Colors */
    --accent-gold: #f59e0b;
    --accent-orange: #ea580c;

    /* Neutral Colors */
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;

    /* Spacing */
    --section-padding: 5rem 0;
    --card-padding: 2rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* ===============================================
   GLOBAL STYLES
   =============================================== */

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.section-padding {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.why-choose-us-section {
    background-color: #f5f8fc;
}

.why-choose-us-heading {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.why-choose-us-stars {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    color: #e6ad45;
    font-size: 0.8rem;
}

.why-choose-us-title {
    margin-bottom: 0.75rem;
    color: #172b4d;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.4;
}

.why-choose-us-subtitle {
    margin-bottom: 0;
    color: #65758b;
    font-size: 1.05rem;
    line-height: 1.7;
}

.why-choose-us-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.why-choose-us-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
    height: 100%;
    padding: 1.5rem;
    border: 1px solid #e4eaf2;
    border-radius: 0.85rem;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.why-choose-us-card:hover {
    transform: translateY(-3px);
    border-color: #cbd9e8;
    box-shadow: 0 8px 20px rgba(23, 43, 77, 0.07);
}

.why-choose-us-icon {
    display: flex;
    flex: 0 0 3.25rem;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.75rem;
    background-color: #eaf3ff;
    color: #2874bd;
    font-size: 1.55rem;
}

.why-choose-us-card:nth-child(6n + 2) .why-choose-us-icon,
.why-choose-us-card:nth-child(6n + 5) .why-choose-us-icon {
    background-color: #e8f7f1;
    color: #15936e;
}

.why-choose-us-card:nth-child(6n + 3) .why-choose-us-icon,
.why-choose-us-card:nth-child(6n + 6) .why-choose-us-icon {
    background-color: #fff4e5;
    color: #c47b20;
}

.why-choose-us-card-content {
    min-width: 0;
}

.why-choose-us-card-title {
    margin: 0 0 0.55rem;
    color: #172b4d;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
}

.why-choose-us-card-description {
    margin: 0;
    color: #65758b;
    font-size: 0.92rem;
    line-height: 1.7;
}

@media (max-width: 991.98px) {
    .why-choose-us-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .why-choose-us-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .why-choose-us-card {
        padding: 1.25rem;
    }
}

.admission-cta-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: #073d2d;
}

.admission-cta-section::before {
    position: absolute;
    z-index: -1;
    inset: -8px;
    background-image:
        linear-gradient(110deg, rgba(2, 39, 29, 0.78), rgba(4, 76, 49, 0.68)),
        var(--admission-cta-image);
    background-position: center;
    background-size: cover;
    content: "";
    filter: blur(3px);
}

.admission-cta-card {
    width: min(100%, 980px);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem);
    border: 1px solid rgba(221, 245, 232, 0.2);
    border-radius: 1.25rem;
    background-color: rgba(3, 48, 36, 0.94);
    box-shadow: 0 18px 48px rgba(0, 23, 16, 0.28);
    color: #fff;
    text-align: center;
}

.admission-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(224, 248, 232, 0.35);
    border-radius: 999px;
    background-color: rgba(236, 253, 245, 0.08);
    color: #e4f6e9;
    font-size: 0.9rem;
    font-weight: 600;
}

.admission-cta-heading {
    max-width: 760px;
    margin: 0 auto 1.75rem;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.admission-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
}

.admission-cta-button {
    display: inline-flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.8rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.admission-cta-button:hover {
    transform: translateY(-2px);
}

.admission-cta-button-primary {
    background-color: #fff;
    color: #07543b;
}

.admission-cta-button-primary:hover {
    background-color: #e8f5ed;
    color: #043b2b;
}

.admission-cta-button-secondary {
    border-color: rgba(255, 255, 255, 0.58);
    background-color: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.admission-cta-button-secondary:hover {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.14);
    color: #fff;
}

@media (max-width: 575.98px) {
    .admission-cta-card {
        padding: 2rem 1.25rem;
    }

    .admission-cta-heading {
        font-size: 17px;
    }

    .admission-cta-actions {
        flex-direction: column;
    }

    .admission-cta-button {
        width: 100%;
        min-height: 3.5rem;
    }
}

.homepage-about-section {
    overflow: hidden;
}

.homepage-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(2.5rem, 6vw, 5.5rem);
}

.homepage-about-media {
    position: relative;
    min-width: 0;
    min-height: 490px;
}

.homepage-about-primary-image,
.homepage-about-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 78%;
    height: 420px;
    border-radius: 1.1rem;
    box-shadow: 0 18px 40px rgba(27, 55, 42, 0.16);
    object-fit: cover;
}

.homepage-about-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e1eee5, #c9dbce);
    color: #38734c;
    font-size: 4rem;
}

.homepage-about-secondary-image {
    position: absolute;
    right: 0;
    bottom: 1.25rem;
    width: 52%;
    height: 245px;
    border: 8px solid #fff;
    border-radius: 1.1rem;
    box-shadow: 0 14px 34px rgba(27, 55, 42, 0.18);
    object-fit: cover;
}

.homepage-about-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 1;
    max-width: 70%;
    padding: 1rem 1.25rem;
    border-radius: 0.85rem;
    background: linear-gradient(120deg, #075b3a, #5cae36);
    box-shadow: 0 10px 24px rgba(7, 91, 58, 0.24);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
}

.homepage-about-copy {
    min-width: 0;
}

.homepage-about-label {
    margin: 0 0 0.8rem;
    color: #16834d;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.035em;
}

.homepage-about-heading {
    margin: 0 0 1.25rem;
    color: #172b3b;
    font-size: clamp(1.8rem, 3.2vw, 2.65rem);
    font-weight: 750;
    line-height: 1.45;
}

.homepage-about-highlight {
    color: #14834d;
}

.homepage-about-description {
    margin: 0 0 1.5rem;
    color: #657487;
    font-size: 1rem;
    line-height: 1.9;
}

.homepage-about-feature-list {
    display: grid;
    gap: 0.85rem;
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
}

.homepage-about-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    color: #263648;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.7;
}

.homepage-about-feature-icon {
    display: inline-flex;
    flex: 0 0 1.65rem;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    margin-top: 0.12rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #168b52, #68b745);
    color: #fff;
    font-size: 0.85rem;
}

.homepage-about-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.9rem 1.4rem;
    border-radius: 0.7rem;
    background: linear-gradient(120deg, #087246, #4da937);
    box-shadow: 0 8px 18px rgba(8, 114, 70, 0.2);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.homepage-about-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(8, 114, 70, 0.28);
    color: #fff;
}

@media (max-width: 991.98px) {
    .homepage-about-grid {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
        gap: 2rem;
    }

    .homepage-about-media {
        min-height: 400px;
    }

    .homepage-about-primary-image,
    .homepage-about-image-placeholder {
        height: 345px;
    }

    .homepage-about-secondary-image {
        height: 190px;
    }

    .homepage-about-heading {
        font-size: clamp(1.6rem, 3.2vw, 2rem);
    }
}

@media (max-width: 767.98px) {
    .homepage-about-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .homepage-about-media {
        width: min(100%, 520px);
        min-height: 370px;
        margin: 0 auto;
    }

    .homepage-about-primary-image,
    .homepage-about-image-placeholder {
        width: 80%;
        height: 315px;
    }

    .homepage-about-secondary-image {
        width: 48%;
        height: 175px;
    }

    .homepage-about-badge {
        max-width: 65%;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .homepage-about-heading {
        font-size: clamp(1.55rem, 6vw, 2rem);
    }
}

.principal-message-section {
    padding: clamp(3rem, 7vw, 5.5rem) 0;
    background: #f8f9fa;
}

.principal-message-grid {
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
    align-items: center;
    gap: clamp(2.5rem, 7vw, 6rem);
    max-width: 1100px;
    margin: 0 auto;
}

.principal-message-portrait-wrap {
    display: flex;
    justify-content: center;
}

.principal-message-portrait,
.principal-message-portrait-fallback {
    width: clamp(220px, 27vw, 340px);
    height: clamp(220px, 27vw, 340px);
    border: 6px solid #fff;
    border-radius: 50%;
    background: #e8eef0;
    box-shadow: 0 0 0 1px rgba(20, 131, 77, 0.12), 0 14px 42px rgba(24, 55, 75, 0.17);
    object-fit: cover;
}

.principal-message-portrait-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #77908a;
    font-size: 5rem;
}

.principal-message-portrait-fallback[hidden] {
    display: none;
}

.principal-message-designation {
    margin: 0 0 0.7rem;
    color: #14834d;
    font-size: 0.95rem;
    font-weight: 700;
}

.principal-message-heading {
    margin: 0 0 1rem;
    color: #172b3b;
    font-size: clamp(1.7rem, 3.2vw, 2.45rem);
    font-weight: 750;
    line-height: 1.35;
}

.principal-message-text {
    color: #657487;
    font-size: 1rem;
    line-height: 1.9;
    text-align: justify;
    white-space: normal;
}

.principal-message-name {
    margin: 1.5rem 0 0.2rem;
    color: #172b3b;
    font-size: 1.1rem;
    font-weight: 700;
}

.principal-message-name-designation {
    margin: 0;
    color: #657487;
    font-size: 0.92rem;
}

@media (max-width: 767.98px) {
    .principal-message-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.75rem;
    }

    .principal-message-portrait,
    .principal-message-portrait-fallback {
        width: clamp(190px, 56vw, 250px);
        height: clamp(190px, 56vw, 250px);
    }

    .principal-message-content {
        text-align: center;
    }

    .principal-message-text {
        text-align: justify;
    }

    .principal-message-heading {
        font-size: clamp(1.55rem, 6vw, 2rem);
    }
}

/* ===============================================
   NAVIGATION
   =============================================== */

.layout-navbar {
    background-color: var(--bg-white) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition-base);
    padding: 0.75rem 0;
    /* Override theme .layout-navbar-fixed fixed positioning on frontend */
    position: sticky !important;
    top: 0 !important;
    right: auto !important;
    left: auto !important;
    width: 100%;
}

.layout-navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    transition: var(--transition-fast);
}

.navbar-brand:hover {
    color: var(--primary-dark) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-fast);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    transform: translateX(-50%) scaleX(1);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(16, 185, 129, 0.05);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
}

/* ===============================================
   HERO SECTION
   =============================================== */

.hero-carousel {
    position: relative;
    z-index: 1;
    margin-top: 0;
    overflow: hidden;
}

/* 20% shorter than the 1920x720 (8:3) banner ratio */
.hero-carousel .carousel-item {
    aspect-ratio: 10 / 3;
}

.hero-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-carousel .carousel-caption {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1rem;
}

.hero-overlay {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 5rem 0;
}

.hero-overlay h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
}

/* ===============================================
   STATISTICS SECTION
   =============================================== */

.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition-base);
    border: none;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transition: var(--transition-base);
}

.stats-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.stats-card:hover::before {
    top: -30%;
    right: -30%;
}

.stats-card .stats-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stats-card .stats-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-card .stats-label {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 500;
}

.stats-card.bg-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stats-card.bg-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stats-card.bg-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* ===============================================
   CARD COMPONENTS
   =============================================== */

.modern-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
    height: 100%;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.modern-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: var(--transition-base);
}

.modern-card:hover .card-img-top {
    transform: scale(1.05);
}

.modern-card .card-body {
    padding: 1.5rem;
}

.modern-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.modern-card .card-text {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Teacher Cards */
.teacher-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
    background: white;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.teacher-card .teacher-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition-base);
}

.teacher-card:hover .teacher-image {
    transform: scale(1.05);
}

.teacher-card .card-body {
    padding: 1.5rem;
}

.teacher-card .teacher-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.teacher-card .teacher-designation {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.teacher-card .teacher-subject {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Student Cards */
.student-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    background: white;
    text-align: center;
}

.student-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.student-card .student-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 1.5rem auto 1rem;
    border: 4px solid var(--primary-color);
}

/* Success Story Cards */
.story-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    background: white;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.story-card .story-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.story-card .badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Notice Cards */
.notice-card {
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    transition: var(--transition-base);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.notice-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.notice-card.featured {
    border-left-color: var(--accent-gold);
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

.notice-date {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
}

/* ===============================================
   BUTTONS
   =============================================== */

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition-base);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition-base);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 10px;
}

/* ===============================================
   FOOTER
   =============================================== */

.footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.75rem;
    transition: var(--transition-base);
}

.footer .social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* ===============================================
   GALLERY
   =============================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    aspect-ratio: 4/3;
    background-color: #f8f9fa;
    transition: var(--transition-base);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: var(--transition-base);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transition: var(--transition-base);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h5 {
    color: white;
    margin: 0;
}

/* ===============================================
   CONTACT FORM
   =============================================== */

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.contact-form .form-control,
.contact-form .form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.contact-info-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.contact-info-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ===============================================
   ABOUT PAGE
   =============================================== */

.about-section {
    position: relative;
}

.about-image {
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mission-vision-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.mission-vision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-dark));
}

.mission-vision-card h3 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* ===============================================
   PRINCIPAL PROFILE
   =============================================== */

.principal-profile {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.principal-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.principal-info {
    padding: 2.5rem;
}

.principal-quote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
}

/* ===============================================
   PAGINATION
   =============================================== */

.pagination {
    gap: 0.5rem;
}

.page-link {
    border: none;
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: var(--transition-fast);
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background: var(--primary-color);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

/* ===============================================
   BADGES
   =============================================== */

.badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-color);
}

.badge-success {
    background: #10b981;
}

.badge-warning {
    background: var(--accent-gold);
}

.badge-info {
    background: var(--secondary-light);
}

/* ===============================================
   LOADING ANIMATION
   =============================================== */

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(16, 185, 129, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */

@media (max-width: 1024px) and (min-width: 769px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-overlay h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .stats-card {
        margin-bottom: 1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-item {
        aspect-ratio: 16/9;
    }

    .gallery-overlay h5 {
        font-size: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .notice-card .notice-date {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .notice-card h4 {
        font-size: 1.1rem;
    }
}


/* ===============================================
   ANIMATIONS
   =============================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-light-primary {
    background-color: rgba(16, 185, 129, 0.1);
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

/* Homepage programs */
.homepage-programs-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.homepage-programs-header {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.homepage-programs-subtitle {
    display: inline-block;
    margin-bottom: 10px;
    color: #198754;
    font-size: 15px;
    font-weight: 700;
}

.homepage-programs-heading {
    margin: 0 0 12px;
    color: #14213d;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
}

.homepage-programs-description {
    margin: 0;
    color: #667085;
    font-size: 1rem;
    line-height: 1.8;
}

.homepage-program-card {
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(20, 33, 61, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.homepage-program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(20, 33, 61, 0.14);
}

.homepage-program-card--featured {
    outline: 2px solid rgba(25, 135, 84, 0.3);
}

.homepage-program-card-media {
    display: flex;
    height: 220px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #eaf3ef, #f1f3f5);
}

.homepage-program-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.homepage-program-card-placeholder {
    color: #198754;
    font-size: 3rem;
}

.homepage-program-card-body {
    padding: 22px 24px 24px;
}

.homepage-program-card-category {
    display: inline-block;
    margin-bottom: 9px;
    color: #198754;
    font-size: 0.82rem;
    font-weight: 700;
}

.homepage-program-card-title {
    margin: 0 0 10px;
    color: #14213d;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.5;
}

.homepage-program-card-description {
    margin: 0;
    color: #667085;
    font-size: 0.95rem;
    line-height: 1.75;
}

@media (max-width: 767.98px) {
    .homepage-programs-section {
        padding: 56px 0;
    }

    .homepage-programs-header {
        margin-bottom: 30px;
    }

    .homepage-program-card-media {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

@media (prefers-reduced-motion: reduce) {
    .homepage-program-card {
        transition: none;
    }

    .homepage-program-card:hover {
        transform: none;
    }
}

/* ===============================================
   BLOG, EVENT & NEWS
   =============================================== */

.update-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(20, 33, 61, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.update-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(20, 33, 61, 0.14);
}

.update-card-media {
    position: relative;
    display: block;
    flex-shrink: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #eaf3ef, #f1f3f5);
}

.update-card-media img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.update-card:hover .update-card-media img {
    transform: scale(1.04);
}

.update-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #198754;
    font-size: 3rem;
}

.update-card-placeholder .ti {
    font-size: 3rem;
    opacity: 0.6;
}

.update-card-type {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 4px 12px;
    border-radius: 999px;
    background: #198754;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.update-card--event .update-card-type {
    background: #d97706;
}

.update-card--news .update-card-type {
    background: #1d4ed8;
}

.update-card-event-date {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    display: flex;
    min-width: 64px;
    flex-direction: column;
    align-items: center;
    padding: 6px 10px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(20, 33, 61, 0.2);
    color: #14213d;
    line-height: 1.1;
    text-align: center;
}

.update-card-event-day {
    color: #d97706;
    font-size: 1.6rem;
    font-weight: 800;
}

.update-card-event-month {
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.update-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px 22px 22px;
}

.update-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-bottom: 10px;
    color: #667085;
    font-size: 0.85rem;
}

.update-card-meta i {
    margin-right: 5px;
    color: #198754;
}

.update-card-location {
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.update-card-title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 10px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.update-card-title a {
    color: #14213d;
    text-decoration: none;
}

.update-card-title a:hover {
    color: #198754;
}

.update-card-excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 16px;
    color: #667085;
    font-size: 0.95rem;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.update-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: #198754;
    font-weight: 700;
    text-decoration: none;
}

.update-card-link i {
    transition: transform 0.2s ease;
}

.update-card-link:hover i {
    transform: translateX(3px);
}

/* Home page: Latest Updates row */
.homepage-updates-section {
    padding: 80px 0;
    background: #fff;
}

.homepage-updates-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.homepage-updates-subtitle {
    display: inline-block;
    margin-bottom: 10px;
    color: #198754;
    font-size: 15px;
    font-weight: 700;
}

.homepage-updates-heading {
    margin: 0 0 10px;
    color: #14213d;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
}

.homepage-updates-description {
    max-width: 640px;
    margin: 0;
    color: #667085;
    line-height: 1.8;
}

.homepage-updates-actions {
    display: flex;
    flex-shrink: 0;
    gap: 10px;
}

.homepage-updates-nav {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0d5dd;
    border-radius: 50%;
    background: #fff;
    color: #14213d;
    font-size: 1.25rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.homepage-updates-nav[hidden] {
    display: none;
}

.homepage-updates-nav:hover:not(:disabled) {
    border-color: #198754;
    background: #198754;
    color: #fff;
}

.homepage-updates-nav:disabled {
    opacity: 0.4;
    cursor: default;
}

.homepage-updates-row {
    display: flex;
    gap: 24px;
    margin: 0 -8px;
    padding: 8px 8px 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.homepage-updates-row:focus-visible {
    outline: 2px solid #198754;
    outline-offset: 2px;
}

.homepage-updates-item {
    flex: 0 0 calc((100% - 72px) / 4);
    scroll-snap-align: start;
}

@media (max-width: 1199.98px) {
    .homepage-updates-item {
        flex-basis: calc((100% - 48px) / 3);
    }
}

@media (max-width: 991.98px) {
    .homepage-updates-item {
        flex-basis: calc((100% - 24px) / 2);
    }
}

@media (max-width: 575.98px) {
    .homepage-updates-section {
        padding: 56px 0;
    }

    .homepage-updates-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .homepage-updates-actions {
        display: none;
    }

    .homepage-updates-item {
        flex-basis: 85%;
    }
}

/* Listing page */
.updates-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
}

.updates-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.updates-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #fff;
    color: #344054;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.updates-filter:hover {
    border-color: #198754;
    color: #198754;
}

.updates-filter.is-active {
    border-color: #198754;
    background: #198754;
    color: #fff;
}

.updates-filter-count {
    min-width: 24px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(20, 33, 61, 0.08);
    font-size: 0.78rem;
    text-align: center;
}

.updates-filter.is-active .updates-filter-count {
    background: rgba(255, 255, 255, 0.25);
}

.updates-search {
    position: relative;
    display: flex;
    flex: 0 1 420px;
    gap: 8px;
}

.updates-search > i {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #98a2b3;
    transform: translateY(-50%);
}

.updates-search input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 10px 14px 10px 40px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
}

.updates-search input[type="search"]:focus {
    border-color: #198754;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

.updates-results {
    transition: opacity 0.2s ease;
}

.updates-results.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

.updates-results-summary {
    margin-bottom: 20px;
    color: #667085;
    font-weight: 600;
}

.updates-empty {
    padding: 64px 20px;
    border: 1px dashed #d0d5dd;
    border-radius: 14px;
    color: #667085;
    text-align: center;
}

.updates-empty i {
    color: #198754;
    font-size: 3rem;
}

.updates-empty h3 {
    margin: 14px 0 6px;
    color: #14213d;
    font-size: 1.3rem;
}

.updates-empty p {
    margin: 0;
}

@media (max-width: 767.98px) {
    .updates-filters {
        flex-wrap: nowrap;
        width: 100%;
        overflow-x: auto;
    }

    .updates-filter {
        flex-shrink: 0;
    }

    .updates-search {
        flex-basis: 100%;
    }
}

/* Detail page */
.update-detail-header {
    padding: 48px 0 32px;
    background: linear-gradient(135deg, #eaf3ef, #f8f9fa);
}

.update-detail-header .breadcrumb a {
    color: #198754;
}

.update-detail-type {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 14px;
    border-radius: 999px;
    background: #198754;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

.update-detail-type--event {
    background: #d97706;
}

.update-detail-type--news {
    background: #1d4ed8;
}

.update-detail-title {
    max-width: 900px;
    margin: 0 0 16px;
    color: #14213d;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.35;
}

.update-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    color: #667085;
    list-style: none;
}

.update-detail-meta i {
    margin-right: 6px;
    color: #198754;
}

.update-detail {
    padding: 48px 0 64px;
}

.update-detail-image {
    margin: 0 0 32px;
    overflow: hidden;
    border-radius: 14px;
}

.update-detail-image img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
}

.update-detail-content {
    color: #344054;
    font-size: 1.05rem;
    line-height: 1.9;
    overflow-wrap: break-word;
}

.update-detail-content img,
.update-detail-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.update-detail-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.update-detail-content h2,
.update-detail-content h3 {
    margin: 1.6em 0 0.6em;
    color: #14213d;
}

.update-detail-content blockquote {
    margin: 1.5em 0;
    padding: 12px 20px;
    border-left: 4px solid #198754;
    background: #f6faf8;
}

.update-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.update-detail-tag {
    padding: 4px 12px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 0.85rem;
    text-decoration: none;
}

.update-detail-tag:hover {
    background: #198754;
    color: #fff;
}

.update-detail-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eaecf0;
}

.update-detail-share-label {
    color: #14213d;
    font-weight: 700;
}

.share-btn {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.share-btn[hidden] {
    display: none;
}

.share-btn:hover {
    color: #fff;
    opacity: 0.9;
    transform: translateY(-2px);
}

.share-btn--facebook { background: #1877f2; }
.share-btn--x { background: #111; }
.share-btn--whatsapp { background: #25d366; }
.share-btn--linkedin { background: #0a66c2; }
.share-btn--copy { background: #667085; }

.update-detail-copied {
    color: #198754;
    font-size: 0.9rem;
    font-weight: 600;
}

.update-event-box {
    margin-bottom: 20px;
    padding: 24px;
    border: 1px solid #fde4c3;
    border-radius: 14px;
    background: #fffaf2;
}

.update-event-box h2 {
    margin: 0 0 16px;
    color: #14213d;
    font-size: 1.2rem;
    font-weight: 700;
}

.update-event-box dl {
    margin: 0 0 20px;
}

.update-event-box dt {
    color: #667085;
    font-size: 0.85rem;
    font-weight: 600;
}

.update-event-box dt i {
    margin-right: 6px;
    color: #d97706;
}

.update-event-box dd {
    margin: 2px 0 14px;
    color: #14213d;
    font-weight: 700;
}

.update-related {
    padding: 64px 0;
    background: #f8f9fa;
}

.update-related-heading {
    margin-bottom: 28px;
    color: #14213d;
    font-size: 1.6rem;
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .update-card,
    .update-card-media img,
    .update-card-link i,
    .share-btn {
        transition: none;
    }

    .update-card:hover,
    .update-card:hover .update-card-media img {
        transform: none;
    }

    .homepage-updates-row {
        scroll-behavior: auto;
    }
}

/* Quill editor output */
.update-detail-content .ql-align-center { text-align: center; }
.update-detail-content .ql-align-right { text-align: right; }
.update-detail-content .ql-align-justify { text-align: justify; }
.update-detail-content .ql-indent-1 { padding-left: 3em; }
.update-detail-content .ql-indent-2 { padding-left: 6em; }
.update-detail-content .ql-indent-3 { padding-left: 9em; }

/* ===============================================
   PAGE HEADER BANNER (all inner pages)
   =============================================== */

/* Doubled class so page-specific hero styles (FAQ, Students) cannot override it. */
.page-header.page-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #17642c 0%, #1a6d30 55%, #1f7a37 100%);
    color: #fff;
}

/* Soft vertical light streaks on the right, fading out towards the text. */
.page-header.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 42%;
    background: repeating-linear-gradient(90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.07) 16px,
        rgba(255, 255, 255, 0) 34px,
        rgba(0, 0, 0, 0.07) 50px,
        rgba(255, 255, 255, 0) 68px);
    background-size: auto;
    opacity: 1;
    filter: blur(3px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
    mask-image: linear-gradient(90deg, transparent, #000 40%);
    pointer-events: none;
}

.page-header.page-header > .container {
    position: relative;
    z-index: 1;
}

.page-header h1,
.page-header .lead,
.page-header p,
.page-header .breadcrumb-item,
.page-header .breadcrumb-item a,
.page-header .breadcrumb-item.active {
    color: #fff;
}

.page-header .breadcrumb-item a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.page-header .breadcrumb {
    /* White version of the theme's chevron divider */
    --bs-breadcrumb-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='24' viewBox='0 0 24 24' stroke-width='1.75' stroke='%23ffffff' stroke-opacity='0.75' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 6 15 12 9 18'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Blog / Event / News detail header on the green banner */
.page-header .update-detail-title {
    color: #fff;
}

.page-header .update-detail-meta,
.page-header .update-detail-meta i {
    color: rgba(255, 255, 255, 0.88);
}

.page-header .update-detail-type {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

@media (max-width: 767.98px) {
    .page-header.page-header::before {
        width: 60%;
    }
}

/* ===============================================
   HOME: COMPACT NOTICE BOARD
   =============================================== */

.home-notice-board {
    overflow: hidden;
    border: 1px solid #eaecf0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(20, 33, 61, 0.06);
}

.home-notice-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    transition: background-color 0.2s ease;
}

.home-notice-item + .home-notice-item {
    border-top: 1px solid #eaecf0;
}

.home-notice-item:hover {
    background: #f6faf8;
}

.home-notice-date {
    display: flex;
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #17642c, #1f7a37);
    color: #fff;
    line-height: 1.1;
}

.home-notice-day {
    font-size: 1.3rem;
    font-weight: 800;
}

.home-notice-month {
    font-size: 0.75rem;
    font-weight: 600;
}

.home-notice-body {
    min-width: 0;
    flex: 1;
}

.home-notice-title {
    overflow: hidden;
    margin: 0 0 4px;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-notice-title a {
    color: #14213d;
    text-decoration: none;
}

.home-notice-title a:hover {
    color: #198754;
}

.home-notice-meta {
    overflow: hidden;
    margin: 0;
    color: #667085;
    font-size: 0.85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-notice-meta time {
    color: #198754;
    font-weight: 600;
}

.home-notice-excerpt::before {
    content: '·';
    margin: 0 8px;
}

.home-notice-file {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eaf3ef;
    color: #198754;
    font-size: 1.1rem;
}

.home-notice-file:hover {
    background: #198754;
    color: #fff;
}

@media (max-width: 575.98px) {
    .home-notice-item {
        padding: 12px 14px;
    }

    .home-notice-excerpt {
        display: none;
    }
}

/* ===============================================
   HOME: GALLERY CAROUSEL
   =============================================== */

.home-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    background: #eaf3ef;
    box-shadow: 0 6px 20px rgba(20, 33, 61, 0.1);
}

.home-gallery-carousel .home-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.home-gallery-item:hover img {
    transform: scale(1.05);
}

.home-gallery-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 28px 16px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
    color: #fff;
    font-weight: 600;
}

.home-gallery-carousel .owl-stage-outer {
    padding: 6px 0 14px;
}

@media (prefers-reduced-motion: reduce) {
    .home-notice-item,
    .home-gallery-carousel .home-gallery-item img {
        transition: none;
    }

    .home-gallery-item:hover img {
        transform: none;
    }
}
