/* 
 * Suryabunyo Pathum Lamphun School - Design System & Styling
 * Premium Vanilla CSS stylesheet
 */

@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@300;400;500;600;700&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary-dark: #0f2b5c;       /* Deep Ocean Blue */
    --primary-light: #1e4fad;      /* Sapphire Blue */
    --accent-gold: #c5a880;       /* Premium Gold */
    --accent-pink: #e85a8a;       /* Kasalong Pink Accent */
    --accent-pink-light: #fff1f5; /* Light soft pink */
    
    /* Backgrounds and Neutrals */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --border-glass: rgba(255, 255, 255, 0.4);
    
    --text-primary: #0f172a;      /* Slate 900 */
    --text-secondary: #475569;    /* Slate 600 */
    --text-muted: #94a3b8;        /* Slate 400 */
    --text-light: #f8fafc;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(15, 43, 92, 0.05), 0 2px 4px -1px rgba(15, 43, 92, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(15, 43, 92, 0.08), 0 4px 6px -2px rgba(15, 43, 92, 0.04);
    --shadow-premium: 0 20px 25px -5px rgba(15, 43, 92, 0.1), 0 10px 10px -5px rgba(15, 43, 92, 0.04);
    
    /* Typography */
    --font-heading: 'Anuphan', sans-serif;
    --font-body: 'Sarabun', sans-serif;
    --font-alt: 'Outfit', sans-serif;
    
    /* Layout & Utilities */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables override */
[data-theme="dark"] {
    --bg-main: #0b0f19;
    --bg-card: #131a2b;
    --bg-glass: rgba(19, 26, 43, 0.8);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #1e293b;
    --accent-pink-light: #20131d;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) var(--bg-main);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.01em;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

button {
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    outline: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Glassmorphism Header */
body > header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    transition: background var(--transition-normal), transform var(--transition-normal), padding var(--transition-normal);
}

body > header.scrolled {
    padding: 5px 0;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(15, 43, 92, 0.2));
    transition: transform var(--transition-normal);
}

.logo-link:hover .logo-img {
    transform: rotate(5deg) scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    font-family: var(--font-heading);
    line-height: 1.2;
}

[data-theme="dark"] .logo-title {
    color: var(--text-primary);
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-alt);
    letter-spacing: 0.5px;
}

nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2px;
}

.nav-item a {
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item a:hover,
.nav-item.active a {
    color: var(--primary-light);
    background: rgba(30, 79, 173, 0.08);
}

[data-theme="dark"] .nav-item a:hover,
[data-theme="dark"] .nav-item.active a {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
}

/* Nav Item Line Animation */
.nav-item.active a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
}

[data-theme="dark"] .nav-item.active a::after {
    background: #3b82f6;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
}

/* Theme Toggle Button */
.btn-toggle-theme, .btn-admin-nav {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.btn-toggle-theme:hover, .btn-admin-nav:hover {
    color: var(--primary-light);
    background: rgba(30, 79, 173, 0.05);
    border-color: var(--primary-light);
}

.btn-admin-nav {
    position: relative;
}

/* Mobile Toggle */
.btn-mobile-toggle {
    display: none;
    background: transparent;
    font-size: 1.5rem;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 90vh;
    min-height: 550px;
    width: 100%;
    margin-top: 0;
    overflow: hidden;
}

.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Overlay gradient */
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 43, 92, 0.85) 0%, rgba(15, 43, 92, 0.5) 50%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
    color: var(--text-light);
    text-align: center;
    transform: translateY(40px);
    opacity: 0;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.slide.active .hero-content {
    transform: translateY(0);
    opacity: 1;
}

.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    animation: pulse 3s infinite;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-motto {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--accent-gold);
    font-weight: 500;
    margin-bottom: 12px;
}

.hero-motto-translate {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Premium Buttons */
.btn {
    padding: 12px 30px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--primary-light);
    color: white;
    box-shadow: 0 4px 14px rgba(30, 79, 173, 0.4);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 79, 173, 0.5);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background: white;
    color: var(--primary-dark);
    transform: translateY(-2px);
    border-color: white;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Slider Controls */
.slider-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 4;
    transform: translateY(-50%);
    pointer-events: none;
}

.slider-arrow {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    pointer-events: auto;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
}

.slider-arrow:hover {
    background: white;
    color: var(--primary-dark);
    transform: scale(1.05);
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 4;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slider-dot.active {
    background: white;
    width: 30px;
}

/* Page Section Base styling */
.section {
    padding: 80px 20px;
    max-width: 1300px;
    margin: 0 auto;
}

.section-bg-alt {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    font-family: var(--font-alt);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

[data-theme="dark"] .section-subtitle {
    color: #3b82f6;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

[data-theme="dark"] .section-title {
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--accent-gold);
    z-index: 2;
}

/* Director Section */
.director-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.director-img-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.director-img-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    pointer-events: none;
}

.director-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.director-img-container:hover .director-img {
    transform: scale(1.03);
}

.director-speech {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 30px;
    position: relative;
}

.director-speech::before {
    content: '“';
    font-size: 6rem;
    font-family: serif;
    color: var(--accent-pink-light);
    position: absolute;
    top: -50px;
    left: -20px;
    z-index: -1;
}

[data-theme="dark"] .director-speech::before {
    color: rgba(232, 90, 138, 0.1);
}

.director-info {
    border-left: 4px solid var(--primary-light);
    padding-left: 20px;
}

.director-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
}

[data-theme="dark"] .director-name {
    color: var(--text-primary);
}

.director-title {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* SBY School Identity Hub */
.identity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.identity-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.identity-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-light);
}

.identity-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    background: var(--accent-pink-light);
    color: var(--accent-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 24px auto;
    transition: all var(--transition-fast);
}

.identity-card:hover .identity-icon {
    background: var(--primary-light);
    color: white;
    transform: rotateY(180deg);
}

.identity-card h3 {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 14px;
}

[data-theme="dark"] .identity-card h3 {
    color: var(--text-primary);
}

.identity-card p {
    color: var(--text-secondary);
    font-size: 0.98rem;
}

/* Statistics Banners */
.stats-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: var(--radius-md);
    padding: 60px 40px;
    box-shadow: var(--shadow-premium);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-icon {
    font-size: 2.2rem;
    color: var(--accent-gold);
    margin-bottom: 12px;
}

.stat-number {
    font-size: 3.2rem;
    font-family: var(--font-alt);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.85;
}

/* News Section Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all var(--transition-normal);
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-light);
}

.news-img-container {
    height: 220px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.news-card:hover .news-img {
    transform: scale(1.05);
}

.news-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-light);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-family: var(--font-heading);
    font-weight: 500;
    z-index: 2;
}

.news-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.news-title {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .news-title {
    color: var(--text-primary);
}

.news-summary {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.news-readmore {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.news-readmore:hover {
    color: var(--accent-pink);
}

/* Quick links footer and system maps */
footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.75);
    padding: 80px 20px 30px 20px;
    border-top: 5px solid var(--accent-gold);
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-info-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo-img {
    height: 60px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.footer-logo-title {
    font-size: 1.25rem;
    color: white;
    font-weight: 700;
}

.footer-logo-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-alt);
}

.footer-text {
    font-size: 0.92rem;
    line-height: 1.7;
}

.footer-section-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: var(--radius-full);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.92rem;
}

.footer-contact-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.footer-contact-icon {
    color: var(--accent-gold);
    margin-top: 4px;
}

.footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: var(--accent-pink);
    transform: translateY(-3px);
}

/* Modals & Detail Popups */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

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

.modal-container {
    background: var(--bg-card);
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    border-radius: var(--radius-md);
    overflow-y: auto;
    box-shadow: var(--shadow-premium);
    position: relative;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal.active .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.modal-img-container {
    width: 100%;
    height: 380px;
    overflow: hidden;
}

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

.modal-body {
    padding: 40px;
}

.modal-header-meta {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.modal-title {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 24px;
    line-height: 1.35;
}

[data-theme="dark"] .modal-title {
    color: var(--text-primary);
}

.modal-content-html {
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-content-html p {
    margin-bottom: 16px;
}

.modal-content-html strong {
    color: var(--text-primary);
}

/* Lightbox specifically for gallery */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    position: relative;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.lightbox-caption {
    color: white;
    margin-top: 20px;
    text-align: center;
    max-width: 600px;
}

.lightbox-title {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 6px;
}

.lightbox-desc {
    font-size: 0.92rem;
    opacity: 0.75;
}

/* Sub-page Banner */
.subpage-banner {
    height: 35vh;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subpage-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 43, 92, 0.9) 0%, rgba(15, 43, 92, 0.6) 100%);
    z-index: 1;
}

.subpage-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.subpage-title {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.breadcrumbs {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-alt);
    font-size: 0.9rem;
    opacity: 0.85;
}

.breadcrumbs a {
    color: white;
}

.breadcrumbs a:hover {
    color: var(--accent-gold);
}

.breadcrumbs span {
    color: rgba(255, 255, 255, 0.5);
}

/* Admin Dashboard Layout */
.admin-login-body {
    background: linear-gradient(135deg, #0b1329 0%, #0f2b5c 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-login-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-glass);
}

.admin-login-logo {
    display: block;
    margin: 0 auto 20px auto;
    height: 70px;
    filter: drop-shadow(0 2px 8px rgba(15, 43, 92, 0.3));
}

.admin-login-title {
    text-align: center;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.admin-login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    outline: none;
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(30, 79, 173, 0.15);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.login-error {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 20px;
    display: none;
}

/* Admin Dashboard Panel */
.admin-panel {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    background-color: var(--bg-main);
}

.admin-sidebar {
    background-color: var(--primary-dark);
    color: white;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.admin-sidebar-logo {
    height: 40px;
}

.admin-sidebar-title {
    font-size: 1rem;
    font-weight: 700;
}

.admin-sidebar-sub {
    font-size: 0.72rem;
    opacity: 0.5;
}

.admin-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.admin-menu-item a {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.admin-menu-item a:hover,
.admin-menu-item.active a {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.admin-menu-item.active a {
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(30, 79, 173, 0.3);
}

.admin-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.admin-main {
    padding: 40px;
    overflow-y: auto;
    height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.admin-header-title {
    font-size: 1.8rem;
    color: var(--primary-dark);
}

[data-theme="dark"] .admin-header-title {
    color: var(--text-primary);
}

.admin-content {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* Dashboard Summary Cards */
.dash-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 35px;
}

.dash-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
}

.dash-card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background-color: var(--accent-pink-light);
    color: var(--accent-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.dash-card:nth-child(2) .dash-card-icon {
    background-color: rgba(30, 79, 173, 0.08);
    color: var(--primary-light);
}

.dash-card:nth-child(3) .dash-card-icon {
    background-color: rgba(197, 168, 128, 0.08);
    color: var(--accent-gold);
}

.dash-card-info {
    display: flex;
    flex-direction: column;
}

.dash-card-value {
    font-size: 1.8rem;
    font-family: var(--font-alt);
    font-weight: 700;
    line-height: 1.2;
}

.dash-card-label {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* Admin Data Table */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.admin-table th {
    background-color: var(--bg-main);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    padding: 14px 18px;
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.admin-table tr:hover td {
    background-color: rgba(30, 79, 173, 0.02);
}

.admin-table img {
    height: 45px;
    width: 45px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.btn-action {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.btn-edit {
    background-color: #fef3c7;
    color: #d97706;
}

.btn-edit:hover {
    background-color: #fde68a;
}

.btn-delete {
    background-color: #fee2e2;
    color: #dc2626;
    margin-left: 6px;
}

.btn-delete:hover {
    background-color: #fecaca;
}

/* Action Header */
.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.search-input-group {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 8px 16px 8px 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Staff Grid Page */
.staff-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.staff-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    text-align: center;
    padding: 30px 20px;
    transition: all var(--transition-normal);
}

.staff-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-light);
}

.staff-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    object-fit: cover;
    margin: 0 auto 20px auto;
    border: 3px solid var(--border-color);
    transition: all var(--transition-normal);
}

.staff-card:hover .staff-avatar {
    border-color: var(--primary-light);
    transform: scale(1.05);
}

.staff-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

[data-theme="dark"] .staff-name {
    color: var(--text-primary);
}

.staff-pos {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.staff-dept {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Group Filtering (Staff department tags) */
.dept-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.dept-tab {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.dept-tab.active,
.dept-tab:hover {
    background-color: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

/* Contact Us Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
}

.contact-info-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon-box {
    width: 50px;
    height: 50px;
    background: rgba(30, 79, 173, 0.08);
    color: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

[data-theme="dark"] .contact-details h4 {
    color: var(--text-primary);
}

.contact-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.map-container {
    margin-top: 30px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 250px;
}

.contact-form-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* Success alert message for forms */
.alert-success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    margin-bottom: 25px;
    display: none;
    font-family: var(--font-heading);
}

/* Gallery Portfolio Grid */
.gallery-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.gallery-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-premium);
}

.gallery-img-container {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.gallery-p-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-card:hover .gallery-p-img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 43, 92, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-zoom-icon {
    color: white;
    font-size: 2.2rem;
    transform: scale(0.8);
    transition: transform var(--transition-normal);
}

.gallery-card:hover .gallery-zoom-icon {
    transform: scale(1);
}

.gallery-info {
    padding: 20px;
}

.gallery-title {
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .gallery-title {
    color: var(--text-primary);
}

.gallery-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Curriculum Page Styles */
.curriculum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.curriculum-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.curriculum-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.curriculum-lvl-icon {
    width: 60px;
    height: 60px;
    background: rgba(30, 79, 173, 0.08);
    color: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.curriculum-lvl-title {
    font-size: 1.45rem;
    color: var(--primary-dark);
}

[data-theme="dark"] .curriculum-lvl-title {
    color: var(--text-primary);
}

.curriculum-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.curriculum-item {
    display: flex;
    gap: 15px;
}

.curriculum-badge {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    align-self: flex-start;
    background-color: var(--accent-pink-light);
    color: var(--accent-pink);
    font-family: var(--font-heading);
}

.curriculum-item-details h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.curriculum-item-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Administrators Page Admin cards */
.admin-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

.admin-profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all var(--transition-normal);
}

.admin-profile-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
}

.admin-profile-img {
    height: 320px;
    width: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.admin-profile-card:hover .admin-profile-img {
    transform: scale(1.03);
}

.admin-profile-info {
    padding: 24px;
}

.admin-profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

[data-theme="dark"] .admin-profile-name {
    color: var(--text-primary);
}

.admin-profile-pos {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Pulse animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Calendar styling */
.calendar-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day-header {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-secondary);
    padding: 10px 0;
}

.calendar-day {
    aspect-ratio: 1.2;
    background-color: var(--bg-main);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    position: relative;
}

.calendar-day-num {
    font-family: var(--font-alt);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.calendar-event-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background-color: var(--accent-pink);
    align-self: center;
}

.calendar-day.has-event {
    border-color: rgba(232, 90, 138, 0.5);
    background-color: var(--accent-pink-light);
    cursor: pointer;
}

.calendar-day.has-event .calendar-day-num {
    color: var(--accent-pink);
    font-weight: 700;
}

.event-details-pane {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.event-item-card {
    background-color: var(--bg-main);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-light);
}

.event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    width: 55px;
    height: 55px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.event-date-day {
    font-family: var(--font-alt);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1;
}

.event-date-month {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.event-info-title {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.event-info-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Animations classes for Javascript trigger */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.appear {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 1024px) {
    .director-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .director-img {
        height: 380px;
    }
    
    .footer-container {
        grid-template-columns: 1.2fr 0.8fr;
    }
    
    .footer-container > div:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    body > header {
        padding: 10px 0;
    }
    
    .nav-menu {
        display: none; /* Controlled by mobile menu toggle */
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        gap: 10px;
        z-index: 999;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .btn-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-motto {
        font-size: 1.2rem;
    }
    
    .hero-motto-translate {
        font-size: 0.95rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .curriculum-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .footer-container > div:last-child {
        grid-column: span 1;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .admin-panel {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        display: none; /* To keep it simple, or toggled on mobile */
    }
    
    .admin-main {
        padding: 20px;
    }
}

/* File Upload Button inside CRUD forms */
.btn-file-upload {
    background-color: var(--primary-light);
    color: var(--text-light) !important;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--primary-light);
    white-space: nowrap;
}

.btn-file-upload:hover {
    background-color: transparent;
    color: var(--primary-light) !important;
}

[data-theme="dark"] .btn-file-upload {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

[data-theme="dark"] .btn-file-upload:hover {
    background-color: transparent;
    color: #3b82f6 !important;
}

.upload-status-hint {
    transition: color var(--transition-fast);
}

