/*
Theme Name: AHIS Theme
Theme URI: https://al-hidaayah.edu.bd/
Author: Ashique Iftikhar
Author URI: https://ashiqii.com
Description: A premium WordPress theme for Al-hidaayah International School.
Version: 1.0.0
Text Domain: ahis
*/

/* Global Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--primary-color, #0d213f);
    font-family: var(--font-heading, 'Outfit', sans-serif);
}

/* 
 * Global Animations 
 * Controlled by js/animations.js via IntersectionObserver 
 */

/* Text Animation: Fade in from bottom */
.ahis-anim-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.ahis-anim-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Image Animation: Fade in from right */
.ahis-anim-image {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.ahis-anim-image.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Value Panel Animation: Staggered slide from right (maintaining scale) */
@keyframes slideInFromRightScale {
    0% {
        opacity: 0;
        transform: translateX(50px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1.02);
    }
}

.ahis-anim-panel {
    opacity: 0;
}

.ahis-anim-panel.is-visible {
    animation: slideInFromRightScale 0.8s ease-out forwards;
}

/* ==========================================
   Video Gallery System
   ========================================== */
.school-video-gallery {
    padding: 0 0 60px;
    overflow: hidden;
}

.video-gallery-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* Prevents seeing other slides partially */
}

.video-gallery-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.video-gallery-slide {
    min-width: 100%;
    flex: 0 0 100%;
    width: 100%;
}

.gallery-slide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Exact 50/50 split */
    gap: 0;
    height: 500px;
}

.gallery-featured {
    position: relative;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}

.gallery-grid-small {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0;
    height: 100%;
}

.gallery-small-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0) 100%);
    transition: background 0.3s ease;
}

.gallery-featured:hover .gallery-bg,
.gallery-small-item:hover .gallery-bg {
    transform: scale(1.05);
}

.gallery-featured:hover .gallery-overlay,
.gallery-small-item:hover .gallery-overlay {
    background: linear-gradient(to top, var(--school-color, var(--accent-color, #00A3FF)) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%);
}

.gallery-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    z-index: 2;
}

.gallery-content h3 {
    color: #fff;
    font-size: 24px;
    margin: 0;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.gallery-content-small {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.gallery-content-small h4 {
    color: #fff;
    font-size: 16px;
    margin: 0;
    line-height: 1.3;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: rgba(255, 255, 255, 0.85);
    z-index: 2;
    transition: all 0.3s ease;
}

.gallery-play-icon-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: rgba(255, 255, 255, 0.8);
    z-index: 2;
    transition: all 0.3s ease;
}

.gallery-featured:hover .gallery-play-icon,
.gallery-small-item:hover .gallery-play-icon-small {
    color: #fff;
    transform: translate(-50%, -50%) scale(1.15);
}

.vg-slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s ease;
}

.video-gallery-slider:hover .vg-slider-nav {
    opacity: 1;
}

.vg-slider-nav button {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.95);
    color: var(--school-color, var(--primary-color, #002147));
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
}

.vg-slider-nav button:hover {
    background: var(--school-color, var(--accent-color, #D4AF37));
    color: #fff;
    transform: scale(1.1);
}

/* Grid Responsive */
@media (max-width: 991px) {
    .gallery-slide-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .gallery-featured {
        height: 350px;
    }

    .gallery-grid-small {
        height: 400px;
    }

    .vg-slider-nav {
        display: none;
        /* Hide side nav on mobile for touch swipe */
    }
}

/* Video Modal */
.ahis-video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ahis-video-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.ahis-video-modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.ahis-video-container {
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
}

.ahis-video-container iframe,
.ahis-video-container video {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 991px) {
    .gallery-slide-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .gallery-featured {
        height: 400px;
    }
}

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

    .gallery-small-item {
        height: 250px;
    }
}

/* ═══════════════════════════════════
   Image Gallery Section
   ═══════════════════════════════════ */
.image-gallery-section {
    padding: 80px 0 30px;
    background: #fdfdfd;
}

.school-page .image-gallery-section {
    padding-top: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.gallery-item-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.gallery-item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item-card:hover .gallery-card-img {
    transform: scale(1.08);
}

.gallery-card-grid-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    width: 100%;
    height: 100%;
    gap: 2px;
    background: #eee;
    transition: transform 0.6s ease;
}

.gallery-item-card:hover .gallery-card-grid-preview {
    transform: scale(1.08);
}

.preview-img-cell {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.preview-img-cell.empty {
    background: #f5f5f5;
}

.gallery-item-hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(20px);
}

.gallery-load-more-wrapper {
    text-align: right;
    margin-top: 15px;
}

.ahis-gallery-load-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 0;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    color: var(--school-color, var(--primary-color));
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-dots {
    letter-spacing: 2px;
    font-weight: 700;
    margin-left: 2px;
}

.ahis-gallery-load-more:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    color: white;
}

.gallery-card-overlay h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.album-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--school-color, var(--primary-color, #002147));
    background-image: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15));
    background-blend-mode: overlay;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.album-badge i {
    font-size: 0.85rem;
}

/* --- Gallery: View All 6th Card --- */
.gallery-view-all-card {
    /* Matches .gallery-item-card sizing exactly */
    aspect-ratio: 4/3;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    /* Own display — not inheriting from gallery-item-card */
    display: flex;
    background: var(--primary-color, #0d213f);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        box-shadow 0.4s ease;
}

.gallery-view-all-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* Inner content fills the card via flex */
.gallery-view-all-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    text-align: center;
    color: #fff;
    gap: 10px;
}

.gallery-view-all-icon {
    width: 72px;
    height: 72px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.gallery-view-all-card:hover .gallery-view-all-icon {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.gallery-view-all-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.gallery-view-all-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.5;
    max-width: 150px;
}

.gallery-view-all-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    transition: background 0.3s ease, transform 0.3s ease;
    margin-top: 4px;
}

.gallery-view-all-card:hover .gallery-view-all-arrow {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
}

/* --- Lightbox --- */
.ahis-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.ahis-lightbox.active {
    display: flex;
}

/* Buttons are direct children of .ahis-lightbox — anchored to the overlay */
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    color: white;
    font-size: 28px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.25s ease, transform 0.25s ease;
    z-index: 10002;
    flex-shrink: 0;
}

.lightbox-close:hover {
    background: rgba(220, 50, 50, 0.6);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.25s ease;
    z-index: 10001;
    flex-shrink: 0;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

/* Image + caption wrapper */
.lightbox-content {
    position: relative;
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
    display: block;
}

.lightbox-caption {
    margin-top: 14px;
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    min-height: 1.2em;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 14px;
        right: 14px;
        width: 42px;
        height: 42px;
        font-size: 22px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* --- School Editor Content (Gutenberg Support) --- */
.school-editor-content {
    padding: 20px 0 20px;
    line-height: 1.7;
}

.school-editor-content .wp-block-columns {
    gap: 40px;
    margin-bottom: 40px;
}

/* Programme Welcome Style */
.programme-intro {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 80px;
}

.programme-intro h2 {
    color: #1e293b;
    /* Slate 800 */
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
    font-family: var(--font-heading, 'Outfit', sans-serif);
}

.programme-intro p {
    font-size: 18px;
    color: #475569;
    /* Slate 600 */
    margin-bottom: 24px;
    font-family: var(--font-body, 'Outfit', sans-serif);
}

.programme-intro .highlight-text {
    color: #b45309;
    /* Amber 700 */
    font-size: 20px;
    font-weight: 600;
    background: #fef3c7;
    /* Amber 100 */
    padding: 15px 25px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 10px;
}

/* Programme Details Cards - Premium Design */
.programme-detail-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-top: 4px solid var(--school-color, #002147);
    /* Can be overridden by inline styles */
    padding: 45px 40px;
    height: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    border-right: 1px solid rgba(15, 23, 42, 0.03);
    border-bottom: 1px solid rgba(15, 23, 42, 0.03);
    border-left: 1px solid rgba(15, 23, 42, 0.03);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 1;
}

/* Subtle Inner Glow */
.programme-detail-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    z-index: 2;
}

.programme-detail-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.08);
}

.programme-detail-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #0f172a;
    /* Slate 900 */
    letter-spacing: -0.5px;
    font-family: var(--font-heading, 'Outfit', sans-serif);
}

.programme-detail-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.programme-detail-card ul li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 18px;
    font-size: 16px;
    color: #334155;
    /* Slate 700 */
    font-family: var(--font-body, 'Outfit', sans-serif);
}

/* Swapped FontAwesome for robust Unicode Checkmark */
.programme-detail-card ul li::before {
    content: '\2714';
    /* Heavy Check Mark */
    position: absolute;
    left: 0;
    top: 0;
    color: #10b981;
    /* Emerald 500 */
    font-size: 16px;
    background: #ecfdf5;
    /* Emerald 50 */
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Programme Levels - Premium Design */
.programme-level-card {
    background: #ffffff;
    padding: 35px 40px;
    border-radius: 16px;
    margin-bottom: 30px;
    height: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
}

/* Subtle tinted background using color-mix (modern premium feel) */
.programme-level-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--level-color, #6366f1) 8%, transparent) 0%, transparent 100%);
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

/* The solid accent bar */
.programme-level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--level-color, #6366f1);
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.programme-level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px color-mix(in srgb, var(--level-color, #6366f1) 15%, transparent);
    border-color: color-mix(in srgb, var(--level-color, #6366f1) 30%, transparent);
}

.programme-level-card:hover::after {
    opacity: 1;
}

.programme-level-card h4 {
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--level-color, #1e293b);
    letter-spacing: -0.3px;
    font-family: var(--font-heading, 'Outfit', sans-serif);
}

.programme-level-card p {
    font-size: 15px;
    color: #475569;
    /* Slate 600 */
    margin: 0;
    line-height: 1.6;
    font-family: var(--font-body, 'Outfit', sans-serif);
}

/* Dynamic Level Colors */
.level-foundation {
    --level-color: #8b5cf6;
}

/* Violet */
.level-intermediate {
    --level-color: #f59e0b;
}

/* Amber */
.level-advanced {
    --level-color: #10b981;
}

/* Emerald */
.level-revision {
    --level-color: #3b82f6;
}

/* Blue */

/* Why Choose Us Banner */
.why-choose-us-banner {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    margin-top: 60px;
    margin-bottom: 60px;
    gap: 0 !important;
}

.why-choose-us-banner .wp-block-column {
    display: flex;
    flex-direction: column;
}

.why-choose-us-banner .wcu-left {
    position: relative;
    /* background-image: url('https://images.unsplash.com/photo-1503676260728-1c00da094a0b?q=80&w=2000&auto=format&fit=crop'); */
    background-size: cover !important;
    background-position: center !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    margin: 0 !important;
    flex: 1;
    width: 100%;
    min-height: 300px;
}

.why-choose-us-banner .wcu-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(34, 139, 34, 0.85);
    /* Green Overlay */
    z-index: 0;
}

.why-choose-us-banner .wcu-left>* {
    position: relative;
    z-index: 1;
}

.why-choose-us-banner .wcu-left h2 {
    color: white;
    font-size: 42px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -1px;
    font-family: var(--font-heading, 'Outfit', sans-serif);
}

.why-choose-us-banner .wcu-right {
    background: #ecfdf5;
    /* Emerald 50 */
    padding: 50px 60px;
    margin: 0 !important;
    flex: 1.5;
}

.why-choose-us-banner .wcu-right ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.why-choose-us-banner .wcu-right ul li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 20px;
    font-size: 18px;
    color: #064e3b;
    /* Emerald 900 */
    font-weight: 500;
    font-family: var(--font-body, 'Outfit', sans-serif);
}

.why-choose-us-banner .wcu-right ul li::before {
    content: '\2714';
    position: absolute;
    left: 0;
    top: -2px;
    color: white;
    background: #10b981;
    /* Emerald 500 */
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* Enrollment Information Banner */
.enrollment-banner {
    position: relative;
    /* background-image: url('https://images.unsplash.com/photo-1577896851231-70ef18881754?q=80&w=2000&auto=format&fit=crop'); */
    background-size: cover !important;
    background-position: center !important;
    padding: 80px 60px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    color: white;
    margin-bottom: 60px;
    overflow: hidden;
}

.enrollment-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    /* Slate Overlay */
    z-index: 0;
}

.enrollment-banner>* {
    position: relative;
    z-index: 1;
}

.enrollment-banner h2 {
    color: white;
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
    font-family: var(--font-heading, 'Outfit', sans-serif);
}

.enrollment-banner p.has-text-align-center {
    font-size: 19px;
    line-height: 1.7;
    margin-bottom: 50px;
    color: #f1f5f9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-body, 'Outfit', sans-serif);
}

.enrollment-banner .wp-block-columns {
    max-width: 850px;
    margin: 0 auto;
    gap: 30px;
}

.enrollment-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 35px 30px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    color: #0f172a;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.enrollment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 100%;
    border-radius: 12px 0 0 12px;
}

.enrollment-card.border-purple::before {
    background: #8b5cf6;
}

.enrollment-card.border-blue::before {
    background: #3b82f6;
}

.enrollment-card:hover {
    transform: translateY(-8px);
}

.enrollment-card h4 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #0f172a;
    font-family: var(--font-heading, 'Outfit', sans-serif);
}

.enrollment-card p {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #475569;
    font-family: var(--font-body, 'Outfit', sans-serif);
}

/* Moral Foundation Section */
.moral-foundation-section {
    margin-top: 80px;
    margin-bottom: 0;
}

.moral-foundation-section h2 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    color: #0f172a;
    letter-spacing: -1px;
    font-family: var(--font-heading, 'Outfit', sans-serif);
}

.moral-foundation-section p {
    font-size: 18px;
    color: #334155;
    max-width: 100%;
    margin-left: 0 !important;
    margin-bottom: 40px;
    line-height: 1.7;
    text-align: left;
    font-family: var(--font-body, 'Outfit', sans-serif);
}

.moral-card {
    border-radius: 0;
    /* Sharp corners like in original image */
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.moral-card:hover {
    transform: scale(1.02);
}

.moral-card .wp-block-cover__inner-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px !important;
    text-align: left;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.moral-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.moral-card h4 {
    color: #ffffff !important;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    font-family: var(--font-heading, 'Outfit', sans-serif);
}

.moral-card p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    position: relative;
    font-family: var(--font-body, 'Outfit', sans-serif);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .school-editor-content {
        padding: 40px 0;
    }

    .programme-intro h2 {
        font-size: 28px;
    }

    .programme-detail-card {
        padding: 30px 25px;
    }

    .programme-level-card {
        padding: 25px 20px;
    }

    .why-choose-us-banner {
        flex-direction: column;
    }

    .why-choose-us-banner .wcu-left {
        padding: 40px 20px;
    }

    .why-choose-us-banner .wcu-right {
        padding: 40px 25px;
    }

    .enrollment-banner {
        padding: 50px 30px;
    }

    .moral-foundation-section h2 {
        font-size: 38px;
    }
}

/* ==========================================
   AHIS SINGLE & ARCHIVE PAGES (NUN Style)
   ========================================== */

/* ===== Smooth Scrolling (global) ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Hero Logo — matches home page centered behavior ===== */
.page-hero-logo-wrap {
    /* Normal flex item — centered by .page-hero flexbox */
    position: relative;
    z-index: 2;
    display: block;
    text-decoration: none;
    outline: none;
    transition: opacity 0.35s ease;
}

.page-hero-logo-wrap img {
    /* Proportional to home page: 125px on 585px hero → 105px on 350px */
    max-height: 105px;
    width: auto;
    display: block;
    margin: 0 auto;
    opacity: 0.97;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.55));
    transition: transform 0.3s ease;
}

.page-hero-logo-wrap:hover img {
    transform: scale(1.03);
}

/* Fade out when sticky header appears — same as home page */
body.has-sticky-header .page-hero-logo-wrap {
    opacity: 0;
    pointer-events: none;
}

/* ===== Hero Logo — matches home page centered behavior ===== */
/*
 * Instead of position:absolute + transform (unreliable in flex containers),
 * we use padding-top on .page-hero to shift the flex center point below
 * the transparent header, then let flexbox center the logo naturally.
 */
.page-hero {
    height: 350px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #fff;
    text-align: center;
    /* Push flex center below the transparent header (~100px tall) */
    padding-top: 100px;
    box-sizing: border-box;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero .page-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    text-transform: capitalize;
    letter-spacing: -1px;
}

/* Breadcrumbs */
.breadcrumb-wrapper {
    background: #fcfcfc;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    margin-bottom: 50px;
}

.ahis-breadcrumbs {
    font-size: 0.85rem;
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #888;
}

.breadcrumb-list li::after {
    content: '>';
    margin-left: 10px;
    font-size: 0.7rem;
    vertical-align: middle;
}

.breadcrumb-list li:last-child::after {
    display: none;
}

.breadcrumb-list a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-list a:hover {
    color: var(--accent-color);
}

/* Content Grid Layout */
.content-grid {
    padding-bottom: 80px;
}

.content-grid .row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.sidebar-news {
    flex: 0 0 300px;
}

.main-news-content {
    flex: 1;
    min-width: 0;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: #fff;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 12px;
    position: sticky;
    top: 100px;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.news-mini-card {
    display: flex;
    gap: 15px;
    text-decoration: none;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
    transition: transform 0.2s;
}

.news-mini-card:last-child {
    border: none;
    margin: 0;
    padding: 0;
}

.news-mini-card:hover {
    transform: translateX(5px);
}

.mini-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 5px 0;
    color: var(--primary-color);
}

.mini-date {
    font-size: 0.75rem;
    color: #999;
}

/* Main Post Details */
.news-details .entry-title {
    font-size: 2.25rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.entry-meta {
    margin-bottom: 30px;
    color: #777;
    font-size: 0.9rem;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--body-text-color);
}

.entry-content p {
    margin-bottom: 25px;
}

/* Archive Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-card-item {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card-item:hover {
    transform: translateY(-10px);
}

.card-thumb {
    position: relative;
    height: 220px;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-date {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--accent-color);
    color: #fff;
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

.card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.3rem;
    margin: 0 0 15px 0;
}

.card-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.card-excerpt {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex: 1;
}

.read-more-link {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Pagination */
.ahis-pagination {
    text-align: center;
    margin-top: 50px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-numbers {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

.page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-numbers:hover:not(.current) {
    background: #f9f9f9;
}

@media (max-width: 991px) {
    .sidebar-news {
        flex: 1 1 100%;
    }

    .page-hero {
        height: 250px;
    }

    .page-hero .page-title {
        font-size: 2rem;
    }
}

. h e r o - l o g o - o v e r l a y    {
       d i s p l a y :    n o n e    ! i m p o r t a n t ;
       
}

     

/* ---- NUN SCHOOLS SIDEBAR STYLE (FINAL FIX) ---- */
.sidebar-news {
    padding-right: 20px !important;
}

.sidebar-widget {
    background: #fff !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 0 !important;
    margin-bottom: 30px !important;
    box-shadow: none !important;
    padding: 0 !important;
    /* Forces header and items to touch the edges */
    overflow: hidden !important;
}

.widget-title {
    background: #002147 !important;
    color: #fff !important;
    padding: 15px 20px !important;
    margin: 0 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border: none !important;
}

.latest-news-list {
    padding: 0 !important;
    margin: 0 !important;
}

.news-mini-card {
    display: flex !important;
    padding: 10px 15px !important;
    /* Reduced from 15px for tighter spacing */
    border-bottom: 1px solid #eee !important;
    text-decoration: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.news-mini-card:last-child {
    border-bottom: none !important;
}

.mini-thumb {
    flex: 0 0 70px !important;
    /* Slightly smaller thumb for compactness */
    height: 70px !important;
    margin-right: 12px !important;
    overflow: hidden !important;
    border-radius: 2px !important;
}

.mini-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.mini-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.mini-content h4 {
    margin: 0 0 2px 0 !important;
    font-size: 14px !important;
    color: #1a1a1a !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    max-height: 2.6em !important;
    /* Exactly 2 lines */
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    /* Softer, more sophisticated cubic-bezier easing */
    transition: max-height 0.6s cubic-bezier(0.23, 1, 0.32, 1), color 0.4s ease !important;
}

.news-mini-card:hover h4 {
    max-height: 300px !important;
    /* Large enough for any title */
    -webkit-line-clamp: 15 !important;
    color: #002147 !important;
}

.mini-content .mini-excerpt {
    font-size: 11px !important;
    /* Smaller excerpt */
    color: #777 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ---- Sidebar Footer Button ---- */
.sidebar-footer {
    padding: 15px !important;
    text-align: center !important;
    border-top: 1px solid #eee !important;
    background: #f9f9f9 !important;
}

.btn-sidebar-all {
    display: inline-block !important;
    padding: 10px 25px !important;
    background: #002147 !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border-radius: 2px !important;
    transition: background 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.btn-sidebar-all:hover {
    background: #00152e !important;
    color: #fff !important;
}

/* ---- BREADCRUMB CLEANUP ---- */
.breadcrumb-wrapper {
    background: transparent !important;
    border: none !important;
    padding: 20px 0 !important;
    margin-bottom: 10px !important;
    box-shadow: none !important;
}

/* ---- NUN SCHOOLS ARCHIVE PAGE STYLE ---- */
.archive-grid-container {
    padding-bottom: 80px !important;
}

.archive-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 40px !important;
    flex-wrap: wrap !important;
}

.archive-main-title {
    color: #1a2b48 !important;
    font-size: 42px !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

.archive-filters {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

.filter-label {
    font-weight: 700 !important;
    color: #333 !important;
    font-size: 16px !important;
}

.filter-select {
    padding: 10px 30px 10px 15px !important;
    border: none !important;
    border-bottom: 1px solid #ddd !important;
    background: transparent !important;
    font-size: 16px !important;
    color: #555 !important;
    cursor: pointer !important;
}

.news-grid-nun {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
    margin-bottom: 60px !important;
}

@media (max-width: 1200px) {
    .news-grid-nun {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .news-grid-nun {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .news-grid-nun {
        grid-template-columns: 1fr !important;
    }
}

.news-card-nun {
    display: flex !important;
    flex-direction: column !important;
}

.card-thumb-nun {
    width: 100% !important;
    aspect-ratio: 16 / 10 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
}

.card-thumb-nun img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease !important;
}

.news-card-nun:hover .card-thumb-nun img {
    transform: scale(1.05) !important;
}

.card-title-nun {
    margin: 0 0 10px 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

.card-title-nun a {
    color: #1a2b48 !important;
    text-decoration: none !important;
}

.card-excerpt-nun {
    font-size: 14px !important;
    color: #777 !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* ---- NUN PAGINATION ---- */
.nun-pagination ul {
    display: flex !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: center !important;
    gap: 10px !important;
}

.nun-pagination li span,
.nun-pagination li a {
    display: flex !important;
    width: 45px !important;
    height: 45px !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #eee !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    color: #555 !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.nun-pagination li span.current {
    background: #002147 !important;
    color: #fff !important;
    border-color: #002147 !important;
}

.nun-pagination li a:hover {
    background: #f5f5f5 !important;
    border-color: #002147 !important;
    color: #002147 !important;
}


/* ---- NUN SCHOOLS SINGLE ARTICLE STYLE ---- */
.content-single-article {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding-bottom: 100px !important;
}

.article-full-content {
    max-width: 850px !important;
    /* Elegant reading width */
    margin: 0 auto 80px auto !important;
    background: #fff !important;
}

.article-header {
    text-align: center !important;
    margin-bottom: 40px !important;
}

.article-header .entry-title {
    font-size: 42px !important;
    color: #1a2b48 !important;
    font-weight: 800 !important;
    margin-bottom: 15px !important;
}

.article-header .entry-meta {
    color: #888 !important;
    font-size: 15px !important;
}

.article-footer-author {
    margin-top: 60px !important;
    padding-top: 40px !important;
    border-top: 1px solid #eee !important;
}

.author-info-nun {
    text-align: left !important;
}

.author-name-nun {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #333 !important;
    margin: 0 !important;
}

.author-designation-nun {
    font-size: 16px !important;
    color: #777 !important;
    margin: 5px 0 0 0 !important;
}

.related-articles-nun {
    padding-top: 60px !important;
    border-top: 2px solid #f5f5f5 !important;
}

.related-title-nun {
    font-size: 28px !important;
    color: #1a2b48 !important;
    font-weight: 800 !important;
    margin-bottom: 40px !important;
}


/* ---- NUN SCHOOLS REFINED SINGLE ARTICLE ---- */
.article-header-nun {
    text-align: left !important;
    /* Standard editorial alignment */
    margin-bottom: 30px !important;
}

.entry-title-nun {
    font-size: 32px !important;
    /* Smaller, cleaner title */
    color: #1a2b48 !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
    line-height: 1.2 !important;
}

.author-signature-nun {
    font-size: 15px !important;
    /* Smaller signature */
    color: #333 !important;
    font-weight: 600 !important;
    font-family: inherit !important;
}

.author-desc-val {
    font-weight: 400 !important;
    color: #777 !important;
}

.related-articles-inline {
    margin-top: 80px !important;
    padding-top: 40px !important;
    border-top: 1px solid #eee !important;
}

.related-articles-inline .news-grid-nun {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}


/* ---- REMOVE SEPARATING LINES ---- */
.article-footer-author,
.related-articles-inline {
    border-top: none !important;
}


/* ---- TIGHTEN ARTICLE GAPS ---- */
.article-footer-author {
    margin-top: 30px !important;
    padding-top: 0 !important;
}

.related-articles-inline {
    margin-top: 40px !important;
    padding-top: 0 !important;
}

.article-full-content {
    margin-bottom: 40px !important;
}


/* ---- NUN SCHOOLS NOTICE EXTERNAL STYLES ---- */
.notice-external-action {
    margin-top: 40px !important;
    text-align: center !important;
}

.nun-notice-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: #002147 !important;
    color: #fff !important;
    padding: 15px 35px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 20px rgba(0, 33, 71, 0.2) !important;
}

.nun-notice-btn:hover {
    background: #1a2b48 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 30px rgba(0, 33, 71, 0.3) !important;
}

.ext-tag {
    background: #e8f0fe !important;
    color: #1a73e8 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    margin-left: 8px !important;
    vertical-align: middle !important;
}


/* ---- NUN SCHOOLS AUTHOR SIG ON CARDS ---- */
.card-author-sig {
    font-size: 13px !important;
    color: #555 !important;
    margin-bottom: 10px !important;
    font-weight: 600 !important;
}

.author-title {
    font-weight: 400 !important;
    color: #888 !important;
    font-style: italic !important;
}


/* ---- NUN SCHOOLS STACKED AUTHOR SIGNATURES ---- */
.author-signature-nun,
.card-author-sig,
.teacher-card-content .author {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.author-name-val,
.author-name,
.author-name-stack {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #002147 !important;
}

.author-desc-val,
.author-title,
.author-desc-stack {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #777 !important;
    font-style: italic !important;
    margin-left: 0 !important;
}


/* ---- HOMEPAGE TEACHER CARD REFINEMENTS ---- */
.teacher-card-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    padding: 18px !important;
}

.author-name-stack {
    font-size: 14px !important;
    line-height: 1.3 !important;
    margin-top: 8px !important;
}

.author-desc-stack {
    font-size: 12px !important;
    color: #002147 !important;
    /* Darker for better visibility */
    opacity: 0.8 !important;
    margin-top: 2px !important;
}

.teacher-card h4 {
    margin-bottom: 0 !important;
    font-size: 18px !important;
}


/* ---- HOMEPAGE CARD VISIBILITY FIX ---- */
.author-name-stack,
.author-desc-stack {
    color: #ffffff !important;
    /* Force white for visibility on images */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.author-desc-stack {
    opacity: 0.9 !important;
    font-weight: 400 !important;
}

.teacher-card-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%) !important;
}


/* ---- REFINED BRANDED LINK STYLING ---- */
/* Only target links inside the actual body text of articles/pages */
.entry-content a:not(.btn):not(.nun-notice-btn) {
    color: #007bff !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    border-bottom: 1px solid transparent !important;
}

.entry-content a:not(.btn):not(.nun-notice-btn):hover {
    color: #0056b3 !important;
    border-bottom-color: #0056b3 !important;
}

/* ---- PROFESSIONAL GRID TITLES (NAVY) ---- */
.news-grid-nun .card-title-nun a,
.news-card-nun .card-title-nun a,
.archive-grid-container .card-title-nun a,
.article-card .card-title a {
    color: #1a2b48 !important;
    /* Deep AHIS Navy */
    text-decoration: none !important;
    border-bottom: none !important;
    font-weight: 700 !important;
}

.news-grid-nun .card-title-nun a:hover,
.news-card-nun .card-title-nun a:hover,
.archive-grid-container .card-title-nun a:hover {
    color: #007bff !important;
    /* Blue only on hover */
}

/* ---- VIEW ALL LINKS ACCENT COLOR ---- */
.view-all {
    color: #007bff !important;
    /* AHIS Accent Blue */
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.view-all:hover {
    color: #0056b3 !important;
}


/* ---- NOTICES SECTION SPACING REFINEMENT ---- */
.notices-section {
    padding-top: 70px !important;
    padding-bottom: 20px !important;
}

.news-section {
    padding-top: 40px !important;
}

/* ==========================================
   Search Page Styles
   ========================================== */
.ahis-search-page .archive-main-title {
    margin-bottom: 50px;
}

.search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 60px;
}

.search-result-item {
    background: #fff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.search-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color, #00A3FF);
}

.result-type {
    display: inline-block;
    background: rgba(0, 163, 255, 0.1);
    color: var(--accent-color, #00A3FF);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.result-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    font-family: var(--font-heading, 'Outfit', sans-serif);
}

.result-title a {
    color: var(--primary-color, #0d213f);
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: var(--accent-color, #00A3FF);
}

.result-excerpt {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 20px;
}

.result-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color, #00A3FF);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    transition: gap 0.3s ease;
}

.result-link:hover {
    gap: 12px;
}

/* No Results State */
.no-search-results {
    text-align: center;
    padding: 80px 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.no-results-icon {
    font-size: 80px;
    color: #cbd5e1;
    margin-bottom: 30px;
}

.no-results-search-bar {
    max-width: 500px;
    margin: 40px auto 0;
}

/* ==========================================
   404 Page Styles
   ========================================== */
.ahis-404-page {
    padding: 120px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.error-content-wrapper {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.error-visual {
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
}

.error-code {
    font-size: 180px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(180deg, var(--primary-color, #0d213f) 0%, var(--accent-color, #00A3FF) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.1;
}

.error-icon-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 100px;
    color: var(--primary-color, #0d213f);
}

.error-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--primary-color, #0d213f);
}

.error-message {
    font-size: 18px;
    color: #475569;
    margin-bottom: 40px;
    line-height: 1.7;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.btn-primary-nun {
    background: var(--primary-color, #0d213f);
    color: #fff;
    padding: 16px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color, #0d213f);
}

.btn-primary-nun:hover {
    background: var(--accent-color, #00A3FF);
    border-color: var(--accent-color, #00A3FF);
    transform: translateY(-3px);
}

.btn-outline-nun {
    color: var(--primary-color, #0d213f);
    padding: 16px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color, #0d213f);
}

.btn-outline-nun:hover {
    background: var(--primary-color, #0d213f);
    color: #fff;
    transform: translateY(-3px);
}

.error-search-box {
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.error-search-box p {
    font-weight: 600;
    margin-bottom: 20px;
}

@media (max-width: 767px) {
    .error-code {
        font-size: 120px;
    }

    .error-icon-box {
        font-size: 60px;
    }

    .error-title {
        font-size: 32px;
    }

    .error-actions {
        flex-direction: column;
    }
}

/* ==========================================
   GLOBAL RESPONSIVE OVERRIDES (TABLET & MOBILE)
   ========================================== */

@media (max-width: 991px) {
    /* Section padding */
    .section {
        padding: 60px 0 !important;
    }
    
    /* Footer Grid */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .footer-col h4 {
        margin-bottom: 20px;
    }
    .footer-col p {
        justify-content: center;
    }
    .social-links {
        justify-content: center;
    }
    .footer-logo {
        display: flex;
        justify-content: center;
    }
    .affiliations {
        gap: 30px;
    }
    .affiliations img {
        max-height: 45px;
    }
    
    /* Archive and Single titles */
    .archive-main-title {
        font-size: 32px !important;
        text-align: center;
        width: 100%;
        margin-bottom: 20px !important;
    }
    .archive-header {
        flex-direction: column !important;
        text-align: center !important;
    }
    .archive-filters {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }
    .entry-title-nun {
        font-size: 28px !important;
    }
    
    /* News Grids */
    .news-grid-nun, 
    .archive-grid-container {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    /* Gallery Grids */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }
    .gallery-featured {
        height: 300px;
    }
    .gallery-grid-small {
        grid-template-columns: 1fr;
        height: auto;
    }
    .gallery-small-item {
        height: 200px;
    }
    
    /* Gutenberg Columns */
    .school-editor-content .wp-block-columns,
    .enrollment-banner .wp-block-columns {
        flex-direction: column !important;
        gap: 20px !important;
    }
    .programme-intro h2 {
        font-size: 28px !important;
    }
    .programme-intro {
        margin-bottom: 40px !important;
    }
    .programme-detail-card, .programme-level-card {
        padding: 30px 20px !important;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 22px;
        text-align: center;
    }
    .archive-main-title {
        font-size: 26px !important;
    }
    .entry-title-nun {
        font-size: 24px !important;
    }
    .container {
        padding: 0 15px;
    }
}