/* ==========================================================================
   مدارس النهضة النموذجية الحديثة | Al-Nahda Modern Schools
   Master-Grade Ultra-Luxury Educational Theme (Inspired by SEF seeef.net)
   ========================================================================== */

/* 1. Typography & Webfonts */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Cairo:wght@400;600;700;800&family=Almarai:wght@400;700;800&display=swap');

@font-face {
    font-family: 'AlmaraiLocal';
    src: url('../../system/libary/Almarai,Rubik/Almarai/Almarai-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    /* Exact Color Palette Derived from Official Logo (nahdalogo.PNG) */
    --logo-blue-dark: #092342;     /* كحلي اللوقو العميق */
    --logo-blue: #0F447E;          /* أزرق كتاب ودرع اللوقو الملكي */
    --logo-blue-mid: #165EA6;      /* أزرق شريط النهضة */
    --logo-blue-light: #2E84D8;    /* أزرق التدرج المضيء */
    --logo-orange: #E86A17;        /* برتقالي سن القلم المميز */
    --logo-orange-light: #F37B24;  /* برتقالي القلم المضيء */
    
    --primary: #0F447E;
    --primary-dark: #092342;
    --primary-light: #2E84D8;
    --primary-glow: #4FA2F2;
    
    --accent: #2E84D8;
    --accent-light: #6eb0f3;
    --gold: #E86A17;
    --gold-light: #F37B24;
    --emerald: #10b981;
    
    --dark: #06182D;
    --dark-body: #071C34;
    --dark-surface: #0B284B;
    --dark-card: rgba(13, 43, 79, 0.75);
    --dark-card-hover: rgba(18, 59, 108, 0.88);
    --dark-border: rgba(46, 132, 216, 0.22);
    --dark-border-hover: rgba(232, 106, 23, 0.45);
    
    --white: #ffffff;
    --text-main: #ffffff;
    --text-light: rgba(255, 255, 255, 0.94);
    --text-muted: rgba(255, 255, 255, 0.72);
    --text-dim: rgba(255, 255, 255, 0.48);
    
    /* Logo-Derived Gradients */
    --gradient-primary: linear-gradient(135deg, #0F447E 0%, #165EA6 50%, #2E84D8 100%);
    --gradient-gold: linear-gradient(135deg, #E86A17 0%, #F37B24 50%, #FF9240 100%);
    --gradient-dark: linear-gradient(180deg, #06182D 0%, #0B284B 100%);
    --gradient-card: linear-gradient(135deg, rgba(16, 52, 94, 0.6) 0%, rgba(9, 31, 58, 0.8) 100%);
    --gradient-glow: radial-gradient(circle at 50% 0%, rgba(46, 132, 216, 0.25) 0%, transparent 70%);
    
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 35px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 35px rgba(46, 132, 216, 0.3);
    
    --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-full: 50px;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    letter-spacing: 0 !important;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Tajawal', 'AlmaraiLocal', 'Almarai', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background-color: var(--dark-body);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.75;
    background-image: 
        radial-gradient(circle at 15% 10%, rgba(15, 68, 126, 0.35) 0%, transparent 45%),
        radial-gradient(circle at 85% 50%, rgba(46, 132, 216, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(232, 106, 23, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Tajawal', 'Almarai', 'Cairo', sans-serif !important;
    font-weight: 700;
    line-height: 1.35;
    color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 9px;
}
::-webkit-scrollbar-track {
    background: #040d1a;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 5px;
}

/* Preloader */
.site-preloader {
    position: fixed;
    inset: 0;
    background: #051120;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.site-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}
.preloader-orbit {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 18px;
}
.preloader-spinner {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(74, 163, 223, 0.15);
    border-top: 3px solid var(--accent);
    border-right: 3px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.preloader-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    color: var(--primary-light);
}
.preloader-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Top Announcement Ticker Bar */
.top-news-bar {
    background: #040e1b;
    border-bottom: 1px solid rgba(74, 163, 223, 0.18);
    padding: 8px 0;
    font-size: 0.88rem;
    position: relative;
    z-index: 1002;
}
.urgent-badge {
    background: var(--gold);
    color: #051120;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ticker-text {
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.top-contacts {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.top-contacts a {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    transition: var(--transition);
}
.top-contacts a:hover {
    color: var(--accent);
}

/* Sticky Navbar */
.navbar-premium {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.7rem 0;
    background: rgba(6, 21, 39, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 163, 223, 0.22);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    transition: var(--transition);
}
.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.brand-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 10px rgba(0, 210, 255, 0.35));
}
.brand-logo-placeholder {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.4rem;
}
.brand-info {
    display: flex;
    flex-direction: column;
}
.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
}
.brand-tagline {
    font-size: 0.76rem;
    color: var(--accent);
    font-weight: 600;
}

/* Nav Links */
.navbar-nav {
    gap: 0.3rem;
}
.nav-link {
    color: var(--text-light) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.95rem !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary-light) !important;
    background: rgba(74, 163, 223, 0.12);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent);
}

/* Nav Buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-portal-student {
    background: var(--gradient-primary);
    color: var(--white) !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.55rem 1.3rem;
    border-radius: var(--radius-full);
    border: none;
    box-shadow: 0 5px 18px rgba(74, 163, 223, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: var(--transition);
}
.btn-portal-student:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 163, 223, 0.5);
}
.btn-portal-teacher {
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold-light) !important;
    border: 1px solid rgba(245, 158, 11, 0.35);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: var(--transition);
}
.btn-portal-teacher:hover {
    background: var(--gradient-gold);
    color: #071526 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}
.btn-portal-sys {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white) !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: var(--transition);
}
.btn-portal-sys:hover {
    background: var(--white);
    color: #071526 !important;
}

/* Custom Buttons */
.btn-nahda-primary {
    background: var(--gradient-primary);
    color: var(--white) !important;
    font-weight: 700;
    padding: 0.85rem 2.2rem;
    border-radius: var(--radius-full);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.02rem;
    box-shadow: 0 8px 25px rgba(0, 153, 255, 0.35);
    transition: var(--transition);
    text-decoration: none;
}
.btn-nahda-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 153, 255, 0.55);
}
.btn-nahda-gold {
    background: var(--gradient-gold);
    color: #071526 !important;
    font-weight: 800;
    padding: 0.85rem 2.2rem;
    border-radius: var(--radius-full);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.02rem;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
    transition: var(--transition);
    text-decoration: none;
}
.btn-nahda-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.55);
}
.btn-nahda-outline {
    background: transparent;
    border: 2px solid rgba(74, 163, 223, 0.4);
    color: var(--white) !important;
    font-weight: 700;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
}
.btn-nahda-outline:hover {
    background: rgba(74, 163, 223, 0.15);
    border-color: var(--primary-light);
    transform: translateY(-3px);
}

/* Hero Slider Section */
.hero-slider-section {
    position: relative;
    min-height: 560px;
    background: var(--dark-body);
    overflow: hidden;
}
.heroSwiper {
    width: 100%;
    min-height: 560px;
}
.hero-slide {
    position: relative;
    overflow: hidden;
    padding: 70px 0 90px;
    min-height: 560px;
    display: flex;
    align-items: center;
}
.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform 10s ease-out;
}
.swiper-slide-active .slide-bg {
    animation: kenBurns 14s ease-out forwards;
}
@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.12); }
}
.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(7, 21, 38, 0.95) 0%, rgba(14, 39, 72, 0.88) 50%, rgba(7, 21, 38, 0.95) 100%);
}
.slide-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(74, 163, 223, 0.4) 1px, transparent 1px),
        radial-gradient(circle at 80% 40%, rgba(245, 158, 11, 0.3) 1.5px, transparent 1.5px),
        radial-gradient(circle at 40% 70%, rgba(74, 163, 223, 0.3) 1px, transparent 1px);
    background-size: 150px 150px;
    opacity: 0.6;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 10;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(74, 163, 223, 0.15);
    border: 1px solid rgba(74, 163, 223, 0.35);
    padding: 0.5rem 1.4rem;
    border-radius: var(--radius-full);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 1.2rem;
}
.hero-title {
    font-size: clamp(2rem, 3.8vw, 3.2rem);
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 1.2rem;
    color: var(--white);
}
.hero-title .highlight-cyan {
    background: linear-gradient(135deg, #00d2ff 0%, #4AA3DF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-title .highlight-gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.8rem;
}
.hero-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 2rem;
    line-height: 1.85;
}
.hero-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Swiper Nav Arrows */
.swiper-button-next, .swiper-button-prev {
    width: 50px;
    height: 50px;
    background: rgba(14, 39, 72, 0.8);
    border: 1px solid rgba(74, 163, 223, 0.3);
    border-radius: 50%;
    color: var(--accent);
    transition: var(--transition);
}
.swiper-button-next:hover, .swiper-button-prev:hover {
    background: var(--accent);
    color: #071526;
}
.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 1.1rem;
    font-weight: bold;
}
.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}
.swiper-pagination-bullet-active {
    width: 30px;
    border-radius: 6px;
    background: var(--accent);
}

/* Floating Stats Section */
.stats-floating-section {
    position: relative;
    z-index: 25;
    margin-top: -60px;
    margin-bottom: 40px;
}
.stats-card-container {
    background: rgba(14, 39, 72, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(74, 163, 223, 0.28);
    border-radius: var(--radius-lg);
    padding: 2.2rem 1.5rem;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
}
.stat-box {
    text-align: center;
    position: relative;
    padding: 0.8rem;
}
.stat-box:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: 0;
    width: 1px;
    background: rgba(74, 163, 223, 0.2);
}
.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--white);
    margin: 0 auto 1rem;
    box-shadow: 0 8px 22px rgba(74, 163, 223, 0.35);
}
.stat-icon.gold {
    background: var(--gradient-gold);
    color: #071526;
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.35);
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
    margin-bottom: 0.3rem;
}
.stat-title {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Sections Global Structure */
.section-padding {
    padding: 85px 0;
    position: relative;
}
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(74, 163, 223, 0.12);
    border: 1px solid rgba(74, 163, 223, 0.3);
    padding: 0.45rem 1.4rem;
    border-radius: var(--radius-full);
    color: var(--primary-light);
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}
.section-title {
    font-size: clamp(1.8rem, 3.2vw, 2.7rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.3;
}
.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Luxury Cards */
.nahda-card {
    background: var(--dark-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    height: 100%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.nahda-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}
.nahda-card:hover {
    transform: translateY(-6px);
    background: var(--dark-card-hover);
    border-color: var(--dark-border-hover);
    box-shadow: var(--shadow-glow);
}
.nahda-card:hover::before {
    opacity: 1;
}

/* Stages Cards */
.stage-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 2.2rem 1.8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.stage-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-light);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 25px rgba(74, 163, 223, 0.25);
}
.stage-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 22px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    box-shadow: 0 10px 25px rgba(74, 163, 223, 0.35);
    transition: var(--transition);
}
.stage-card:hover .stage-icon-wrap {
    transform: scale(1.08);
}
.stage-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.6rem;
}
.stage-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.3rem;
}
.stage-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    text-align: right;
}
.stage-features li {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.stage-features li i {
    color: var(--primary-light);
}

/* Feature/Why-Us Cards */
.feature-box {
    display: flex;
    gap: 1.3rem;
    margin-bottom: 1.8rem;
}
.feature-box-icon {
    flex-shrink: 0;
    width: 55px;
    height: 55px;
    border-radius: 15px;
    background: rgba(74, 163, 223, 0.12);
    border: 1px solid rgba(74, 163, 223, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary-light);
    transition: var(--transition);
}
.feature-box:hover .feature-box-icon {
    background: var(--gradient-primary);
    color: var(--white);
    transform: scale(1.08);
}
.feature-box-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.3rem;
}
.feature-box-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* News Cards */
.news-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-light);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4), 0 0 20px rgba(74, 163, 223, 0.25);
}
.news-img-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--dark-surface);
}
.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.news-card:hover .news-img {
    transform: scale(1.06);
}
.news-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}
.news-body {
    padding: 1.4rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.news-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.6rem;
    line-height: 1.4;
    transition: var(--transition);
}
.news-title a {
    color: inherit;
    text-decoration: none;
}
.news-title a:hover {
    color: var(--primary-light);
}
.news-summary {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    flex-grow: 1;
}
.news-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(74, 163, 223, 0.15);
}
.news-readmore {
    color: var(--primary-light);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.news-readmore:hover {
    color: var(--white);
    transform: translateX(-4px);
}

/* Gallery Section */
.gallery-filter-btn {
    background: rgba(74, 163, 223, 0.1);
    border: 1px solid rgba(74, 163, 223, 0.25);
    color: var(--text-light);
    font-weight: 600;
    padding: 0.5rem 1.3rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.92rem;
}
.gallery-filter-btn.active, .gallery-filter-btn:hover {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(74, 163, 223, 0.35);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.4rem;
}
.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 230px;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.08);
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 21, 38, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.3rem;
    opacity: 0;
    transition: var(--transition);
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--white);
    margin-bottom: 0.2rem;
}
.gallery-category {
    font-size: 0.82rem;
    color: var(--accent);
}

/* Portals Dashboard Styles */
.portal-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    box-shadow: var(--shadow-md);
}
.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.8rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px solid rgba(74, 163, 223, 0.18);
    flex-wrap: wrap;
    gap: 1rem;
}
.portal-student-info {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.student-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
    box-shadow: 0 6px 20px rgba(74, 163, 223, 0.35);
}
.grade-table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}
.grade-table-custom th {
    background: rgba(14, 39, 72, 0.9);
    color: var(--primary-light);
    font-weight: 700;
    padding: 0.9rem 1.1rem;
    font-size: 0.92rem;
    border: none;
}
.grade-table-custom td {
    background: rgba(14, 39, 72, 0.5);
    color: var(--text-light);
    padding: 0.9rem 1.1rem;
    font-size: 0.92rem;
    border: none;
    transition: var(--transition);
}
.grade-table-custom tr:hover td {
    background: rgba(74, 163, 223, 0.15);
}
.badge-grade {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.85rem;
}
.badge-grade-excellent {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Forms & Inputs */
.form-label-custom {
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
}
.form-control-custom, .form-select-custom {
    background: rgba(10, 28, 51, 0.85);
    border: 1px solid rgba(74, 163, 223, 0.3);
    color: var(--white) !important;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.1rem;
    font-size: 0.95rem;
    transition: var(--transition);
    width: 100%;
}
.form-control-custom:focus, .form-select-custom:focus {
    background: rgba(14, 39, 72, 0.95);
    border-color: var(--primary-light);
    box-shadow: 0 0 18px rgba(74, 163, 223, 0.3);
    outline: none;
}
.form-control-custom::placeholder {
    color: var(--text-dim);
}
.form-select-custom option {
    background: var(--dark-surface);
    color: var(--white);
}

/* Footer */
.footer-section {
    background: #040e1b;
    border-top: 1px solid rgba(74, 163, 223, 0.2);
    padding: 70px 0 25px;
    position: relative;
}
.footer-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 1rem;
    line-height: 1.8;
}
.footer-social-links {
    display: flex;
    gap: 0.7rem;
    margin-top: 1.3rem;
}
.footer-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(74, 163, 223, 0.1);
    border: 1px solid rgba(74, 163, 223, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
}
.footer-social-btn:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(74, 163, 223, 0.35);
}
.footer-widget-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.3rem;
    position: relative;
    padding-bottom: 0.7rem;
}
.footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 35px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 0.7rem;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--primary-light);
    transform: translateX(-4px);
}
.footer-bottom {
    margin-top: 45px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-dim);
    font-size: 0.88rem;
}

/* Floating Actions */
.back-to-top {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(74, 163, 223, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    cursor: pointer;
    border: none;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(74, 163, 223, 0.5);
}
.floating-whatsapp {
    position: fixed;
    bottom: 80px;
    left: 25px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #25d366;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
    z-index: 999;
    text-decoration: none;
    transition: var(--transition);
}
.floating-whatsapp:hover {
    transform: translateY(-4px);
    color: var(--white);
}

/* Responsive Queries */
@media (max-width: 991.98px) {
    .navbar-premium {
        padding: 0.6rem 0;
    }
    .top-news-bar {
        display: none;
    }
    .nav-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }
    .btn-portal-student, .btn-portal-teacher, .btn-portal-sys {
        width: 100%;
        justify-content: center;
    }
    .hero-slide {
        padding: 50px 0 70px;
        min-height: auto;
    }
    .stat-box:not(:last-child)::after {
        display: none;
    }
    .stats-floating-section {
        margin-top: -30px;
    }
}

/* ==========================================================================
   Student Portal & Official Academic Certificate Styles
   ========================================================================== */
.student-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.status-indicator.online {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #10b981;
    border: 2px solid var(--dark-body);
    border-radius: 50%;
}

.custom-portal-tabs .nav-link {
    color: var(--text-muted);
    background: rgba(13, 43, 79, 0.6);
    border: 1px solid rgba(46, 132, 216, 0.25);
    border-radius: var(--radius-full);
    padding: 0.65rem 1.4rem;
    font-weight: 600;
    transition: var(--transition);
}

.custom-portal-tabs .nav-link:hover {
    color: var(--white);
    background: rgba(46, 132, 216, 0.2);
    border-color: var(--accent);
}

.custom-portal-tabs .nav-link.active {
    color: #fff;
    background: var(--gradient-primary);
    border-color: var(--accent-light);
    box-shadow: 0 4px 15px rgba(46, 132, 216, 0.35);
}

.school-seal-mark {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--gold);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Quick demo badge buttons */
.demo-pill-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(46, 132, 216, 0.4);
    color: var(--accent-light);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.demo-pill-btn:hover {
    background: var(--accent);
    color: #fff;
    border-style: solid;
}

/* Print Optimization for Official Certificate */
@media print {
    body * {
        visibility: hidden;
    }
    #officialCertificate, #officialCertificate * {
        visibility: visible;
    }
    #officialCertificate {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #0f447e !important;
    }
    #officialCertificate .text-white,
    #officialCertificate h2,
    #officialCertificate h3,
    #officialCertificate strong {
        color: #000000 !important;
    }
    #officialCertificate .table {
        color: #000000 !important;
        border-color: #333333 !important;
    }
    #officialCertificate .table thead {
        background-color: #0f447e !important;
        color: #ffffff !important;
    }
    #officialCertificate .table-striped>tbody>tr:nth-of-type(odd)>* {
        background-color: #f8f9fa !important;
        color: #000000 !important;
    }
    #officialCertificate .table-secondary {
        background-color: #e9ecef !important;
        color: #000000 !important;
    }
    #officialCertificate .badge {
        border: 1px solid #000 !important;
        color: #000 !important;
        background: transparent !important;
    }
    .top-news-bar, .navbar-premium, .site-footer, .back-to-top, .floating-whatsapp, .custom-portal-tabs, .btn {
        display: none !important;
    }
}

