:root {
    color-scheme: light;
    --primary: #0f3460;
    --secondary: #16213e;
    --accent: #f0b429;
    --gold: #f0b429;
    --gold-dark: #d4910e;
    --text: #1a1a2e;
    --text-light: #666;
    --bg: #f8f9fa;
    --white: #ffffff;
    --surface: #ffffff;
    --surface-2: #f1f3f5;
    --input-bg: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --transition: 0.3s ease;
    --primary-light: #0f3460;
    --table-hover: rgba(15, 52, 96, 0.03);
    --focus-ring: rgba(15, 52, 96, 0.1);
    --hero-bg: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    --on-overlay: #16213e;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --primary: #1b3d70;
    --primary-light: #8ab4f8;
    --secondary: #0a1120;
    --accent: #f0b429;
    --gold-dark: #c9860c;
    --text: #e6edf3;
    --text-light: #9aa7b4;
    --bg: #0b0f16;
    --white: #ffffff;
    --surface: #151b24;
    --surface-2: #1c232e;
    --input-bg: #10161f;
    --border: #2a323d;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.6);
    --table-hover: rgba(138, 180, 248, 0.06);
    --focus-ring: rgba(138, 180, 248, 0.18);
    --hero-bg: linear-gradient(135deg, #10233f 0%, #0a1120 100%);
    --on-overlay: #0f3460;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

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

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

/* Header */
.header {
    background: var(--surface);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--accent);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
}

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

.logo-img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-light);
    white-space: nowrap;
}

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

.nav-link {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    color: var(--text);
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary);
    color: var(--white);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    color: var(--text);
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-dropdown-toggle:hover {
    background: var(--primary);
    color: var(--white);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 220px;
    list-style: none;
    padding: 8px 0;
    z-index: 1000;
}

.nav-dropdown.active .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text);
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
}

.nav-dropdown-menu li a:hover {
    background: var(--primary);
    color: var(--white);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-filter {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.category-filter:hover {
    border-color: var(--primary-light);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: transparent;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.about-link-mobile {
    display: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    color: var(--text);
    background: transparent;
    text-decoration: none;
}

.about-link-mobile:hover {
    background: var(--primary);
    color: var(--white);
}

/* Theme toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    flex-shrink: 0;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.theme-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.theme-icon-sun {
    display: none;
}

html[data-theme="dark"] .theme-icon-sun {
    display: block;
}

html[data-theme="dark"] .theme-icon-moon {
    display: none;
}

.theme-toggle-float {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
}

/* Hero */
.hero {
    background: var(--hero-bg);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-logo {
    height: 200px;
    width: 200px;
    display: block;
    margin: 0 auto 24px;
    object-fit: contain;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
}

.hero .btn {
    margin-top: 24px;
}

/* Articles Section */
.articles-section {
    padding: 60px 0;
}

.articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--primary-light);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin-top: 8px;
}

.articles-count {
    color: var(--text-light);
    font-size: 0.95rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

/* Article Card */
.article-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.article-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.article-card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--text);
}

.article-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.article-card-summary {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-light);
    border: 2px solid var(--primary-light);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-danger {
    background: #dc3545;
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.modal-small {
    max-width: 450px;
}

.modal-narrow {
    max-width: 720px;
}

.modal-form-content.modal-narrow {
    max-width: 640px;
}

.modal-form-content.modal-small {
    max-width: 500px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--surface);
    color: var(--text);
    border: none;
    font-size: 2rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-body {
    padding: 24px;
}

.article-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-detail-cover {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
}

.article-detail-content {
    padding: 0;
}

.article-content-media {
    margin-top: 24px;
}

.article-category {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.article-meta {
    display: flex;
    gap: 16px;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.article-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: nowrap;
    align-items: center;
}

@media (max-width: 768px) {
    .article-actions {
        flex-wrap: wrap;
    }
}

/* Inline PDF Viewer */
.pdf-viewer {
    display: none;
    margin-top: 24px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}

.pdf-viewer iframe {
    width: 100%;
    height: 600px;
    border: none;
    background: var(--white);
    display: block;
}

/* Article content media */
.video-embed {
    margin-top: 24px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}

.video-embed iframe {
    width: 100%;
    height: 600px;
    border: none;
    background: var(--white);
    display: block;
}

@media (max-width: 1024px) {
    .video-embed iframe {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .video-embed iframe {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .video-embed iframe {
        height: 350px;
    }
}

@media (max-width: 360px) {
    .video-embed iframe {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
        padding: 16px;
    }
    
    .article-detail-cover {
        max-height: 250px;
    }
    
    .pdf-viewer {
        margin-top: 16px;
    }
    
    .pdf-viewer iframe {
        min-height: 300px;
        -webkit-overflow-scrolling: touch;
    }
    
    .video-embed {
        margin-top: 16px;
    }
    
    .video-embed iframe {
        min-height: 300px;
        -webkit-overflow-scrolling: touch;
    }
}

/* Ensure PDF viewer iframe renders properly in modal */
.pdf-viewer iframe {
    width: 100%;
    height: 600px;
    border: none;
    background: var(--white);
    display: block;
}

/* Adjust modal content for PDF viewer */
.modal-content {
    position: relative;
}

.modal-form {
    padding: 24px;
}

.modal-form .form-group {
    margin-bottom: 18px;
}

.modal-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.modal-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.modal-form .form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.modal-form .form-actions .btn {
    min-width: 130px;
    padding: 10px 24px;
}

.modal-form .form-actions .btn-secondary {
    margin-left: auto;
}

.optional {
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.85rem;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--input-bg);
    color: var(--text);
    transition: var(--transition);
    box-sizing: border-box;
}

.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.modal-form textarea {
    resize: vertical;
    min-height: 100px;
}

.required {
    color: var(--accent);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-light);
    cursor: pointer;
}

.checkbox-label span {
    user-select: none;
}

.url-with-upload {
    display: flex;
    align-items stretch;
    gap: 8px;
}

.url-with-upload input {
    flex: 1;
}

.url-with-upload .btn {
    white-space: nowrap;
}

.forgot-password {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: var(--primary-light);
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 16px;
}

.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.footer-brand p {
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-social h4 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* About Page */
.about-section,
.mission-vision,
.logo-meaning,
.gallery-section,
.leadership-section {
    padding: 60px 0;
}

.about-card {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.about-card p {
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 16px;
}

.mv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.mv-card {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
}

.mission {
    border-left-color: var(--accent);
}

.vision {
    border-left-color: var(--primary-light);
}

/* Slideshow */
.slideshow {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.slideshow-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 6;
    min-height: 300px;
}

.slide {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
}

.slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
    padding: 40px 30px 30px;
}

.slide-caption h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.slide-caption p {
    font-size: 1rem;
    opacity: 0.9;
}

.slideshow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--on-overlay);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-btn:hover {
    background: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

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

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--white);
    width: 30px;
    border-radius: 5px;
}

/* Leadership */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.leadership-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.leadership-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.leadership-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 30px auto 16px;
    border: 4px solid var(--primary);
}

.leadership-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--primary-light);
    margin-bottom: 4px;
    padding: 0 20px;
}

.leadership-card .position {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.leadership-card .bio {
    padding: 0 20px 30px;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Admin Panel */
.admin-header {
    background: var(--secondary);
    border-bottom: none;
}

.admin-header .logo-text {
    color: var(--white);
}

.admin-main {
    display: flex;
    min-height: calc(100vh - 80px);
}

.admin-container {
    display: flex;
    width: 100%;
}

.admin-sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.admin-nav-item {
    padding: 12px 16px;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: var(--primary);
    color: var(--white);
}

.admin-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.admin-back {
    padding: 12px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.admin-section h2 {
    margin-bottom: 36px;
}

#addArticleBtn,
#addCategoryBtn,
#addGalleryBtn,
#addLeadershipBtn {
    margin-top: 24px;
}

.table-container {
    background: var(--surface);
    border-radius: var(--radius);
    overflow-x: auto;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.admin-table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--primary);
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    overflow-wrap: anywhere;
}

.admin-table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.admin-table tr:hover {
    background: var(--table-hover);
}

.admin-table td {
    font-size: 0.95rem;
}

.admin-form {
    max-width: 800px;
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

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

.gallery-item {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

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

.gallery-item-info {
    padding: 12px;
}

.gallery-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.gallery-item-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.gallery-item-actions {
    display: flex;
    gap: 8px;
    padding: 0 12px 12px;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hero-bg);
    padding: 20px;
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    animation: loginCardIn 0.4s ease;
}

@keyframes loginCardIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-brand {
    text-align: center;
    padding: 40px 32px 24px;
    border-bottom: 1px solid var(--border);
}

.login-logo {
    height: 70px;
    margin-bottom: 16px;
}

.login-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
}

.login-form {
    padding: 32px;
}

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

.login-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
}

.password-field {
    position: relative;
    display: flex;
    align-items: stretch;
}

.password-field input {
    padding-right: 44px;
}

.password-toggle {
    width: 44px;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.password-toggle:hover {
    background: var(--primary);
    color: var(--white);
}

.login-submit-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.login-footer-text {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.login-back-link {
    color: var(--primary-light);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.login-back-link:hover {
    color: var(--accent);
}

.spinner-inline {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        box-shadow: var(--shadow);
        padding: 16px;
    }

    .nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
    }

    .mobile-menu-btn {
        display: none;
    }

    .about-link-mobile {
        display: inline-flex;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 60px 0;
    }

    .hero-logo {
        height: 160px;
        width: 160px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .about-card,
    .mv-card {
        padding: 24px;
    }

    .mv-grid {
        grid-template-columns: 1fr;
    }

    .slideshow-container {
        aspect-ratio: 16 / 8;
        min-height: 200px;
    }

    .slide-caption {
        padding: 20px;
    }

    .slide-caption h3 {
        font-size: 1.1rem;
    }

    .admin-container {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .admin-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 8px;
    }

    .admin-content {
        padding: 20px;
    }

    .leadership-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1rem;
    }

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

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-card-image {
        height: 180px;
    }

    .modal-form .form-row {
        grid-template-columns: 1fr;
    }
}
