:root {
    --primary: #0d47a1;
    --secondary: #ff6f00;
    --accent: #00acc1;
    --navbar: #0d47a1;
    --footer: #1a1a2e;
    --button: #ff6f00;
    --dark: #1a1a2e;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background: #f5f7fa;
}

/* Top Bar */
.top-bar {
    background: var(--navbar);
    color: rgba(255,255,255,0.95);
    font-size: 0.9rem;
    padding: 10px 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.top-bar a { color: #fff; font-size: 1rem; }
.top-bar a:hover { opacity: 0.8; color: #fff; }
.date-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
}
.top-bar .bi-clock {
    font-size: 1rem;
}
@media (max-width: 767.98px) {
    .top-bar {
        padding: 12px 0;
    }
    .top-bar-left {
        display: none !important;
    }
    .top-bar-right {
        width: 100%;
        justify-content: center;
    }
    .top-bar-right a {
        display: none !important;
    }
    .date-time-badge {
        width: 100%;
        justify-content: center;
    }
    .top-bar a { margin-left: 0; }
}

@media (max-width: 767.98px) {
    .school-header {
        padding: 18px 0;
    }
    .main-navbar {
        position: static !important;
        top: auto !important;
        box-shadow: none;
    }
    .navbar.sticky-top {
        position: static !important;
    }
}

.page-gallery-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.page-gallery-item {
    background: #f8f9fa;
}

.profile-text {
    line-height: 1.8;
}

.profile-text.text-justify {
    text-align: justify;
}

.profile-text .profile-list {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.profile-text .profile-list li {
    margin-bottom: 0.5rem;
}

/* School Header */
.school-header {
    background: linear-gradient(135deg, #fff 0%, #e3f2fd 100%);
    padding: 16px 0;
    border-bottom: 3px solid var(--secondary);
}
.school-header-inner { display: flex; align-items: center; justify-content: center; }
.school-brand {
    display: flex; align-items: center; gap: 16px;
    text-decoration: none; color: inherit;
}
.school-brand:hover { color: inherit; }
.school-logo {
    width: 60px; height: 60px; object-fit: contain;
    border-radius: 50%; border: 3px solid var(--primary);
    background: #fff; padding: 4px;
}
.school-logo-placeholder {
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; border: 3px solid var(--secondary);
}
.school-brand-text h1 {
    font-size: 2.2rem; font-weight: 800; color: var(--primary);
    margin: 0; line-height: 1.1;
}
.school-brand-text p {
    margin: 4px 0 0; color: #666; font-size: 0.95rem;
}
.settings-locked {
    opacity: 0.85;
}
.settings-locked input,
.settings-locked textarea,
.settings-locked select,
.settings-locked button {
    cursor: not-allowed;
}
.settings-lock-note {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Navbar */
.main-navbar {
    background: var(--navbar) !important;
    padding: 0;
}
.main-navbar .navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    padding: 14px 18px !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.main-navbar .navbar-nav .nav-link:hover,
.main-navbar .navbar-nav .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
}
.main-navbar .dropdown-menu {
    border: none; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 8px; padding: 8px;
}
.main-navbar .dropdown-item {
    border-radius: 6px; padding: 8px 16px;
}
.main-navbar .dropdown-item:hover {
    background: var(--primary); color: #fff;
}
.main-navbar .navbar-toggler {
    border-color: rgba(255,255,255,0.5);
    margin: 8px 0;
}
.main-navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* Shortcut Buttons (Blogger style) */
.shortcut-section {
    padding: 30px 0;
    margin-top: -20px;
    position: relative; z-index: 2;
}
.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}
.shortcut-btn {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: #333;
    background: #fff; border-radius: 16px;
    padding: 16px 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 2px solid transparent;
}
.shortcut-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--secondary);
    color: var(--primary);
}
.shortcut-btn .shortcut-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 8px;
}
.shortcut-btn .shortcut-img {
    width: 56px; height: 56px; border-radius: 50%;
    object-fit: cover; margin-bottom: 8px;
}
.shortcut-btn span {
    font-size: 0.78rem; font-weight: 600; text-align: center; line-height: 1.2;
}

/* Welcome Section */
.welcome-section {
    background: #fff; padding: 40px 0;
    border-bottom: 1px solid #eee;
}
.welcome-section h2 {
    color: var(--primary); font-weight: 700;
    border-left: 4px solid var(--secondary);
    padding-left: 16px;
}
.welcome-section .lead {
    text-align: center !important;
    max-width: 700px;
}
.welcome-text {
    font-weight: 700;
}
.principal-greeting {
    text-align: justify;
    text-align-last: left;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    max-width: 700px;
}
    margin-left: auto;
    margin-right: auto;
}

/* Page Banner */
.page-banner {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; padding: 40px 0 30px;
}
.page-banner.page-banner-blue {
    background: linear-gradient(135deg, #0d47a1, #1976d2);
}
.page-header.page-header-blue {
    background: linear-gradient(135deg, #0d47a1, #1976d2);
    color: #fff;
}
.page-banner.page-banner-blue .container,
.page-header.page-header-blue .container {
    text-align: center;
}
.page-title-divider {
    width: 80px;
    height: 2px;
    margin: 0 auto 22px;
    border: none;
    background: rgba(255,255,255,0.8);
}
.page-banner h1,
.page-header.page-header-blue h1 {
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}
.page-banner.page-banner-blue .breadcrumb-item a,
.page-header.page-header-blue .breadcrumb-item a {
    color: rgba(255,255,255,0.8);
}
.page-banner.page-banner-blue .breadcrumb-item.active,
.page-header.page-header-blue .breadcrumb-item.active {
    color: #fff;
}
.page-banner.page-banner-blue .breadcrumb-item + .breadcrumb-item::before,
.page-header.page-header-blue .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.6);
}
.page-banner.page-banner-blue .breadcrumb,
.page-header.page-header-blue .breadcrumb {
    justify-content: center;
}

/* Cards */
.content-card {
    background: #fff; border-radius: 12px;
    padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.staff-card {
    background: #fff; border-radius: 12px; padding: 16px;
    display: flex; gap: 14px; align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.staff-card:hover { transform: translateY(-2px); }
.staff-avatar {
    width: 60px; height: 60px; min-width: 60px; border-radius: 50%;
    background: #e3f2fd; display: flex; align-items: center; justify-content: center;
    overflow: hidden; font-size: 1.5rem; color: var(--primary);
}
.staff-avatar img { width: 100%; height: 100%; object-fit: cover; }
.kepsek-avatar {
    width: 180px; height: 180px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 4rem;
}
.org-box {
    background: #fff; border: 2px solid var(--primary);
    border-radius: 10px; padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.org-main { max-width: 280px; background: var(--primary); color: #fff; border-color: var(--primary); }
.org-tree {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.org-level-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    position: relative;
}
.org-level-row::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 40px;
    background: rgba(0,0,0,0.08);
}
.org-level-row:last-child::after {
    display: none;
}
.org-level-members {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.org-box {
    background: #fff; border: 2px solid var(--primary);
    border-radius: 10px; padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
    width: auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.org-box img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
}
.org-person-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.org-person-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
/* Struktur Organisasi - Single Line Names (Horizontal, tidak wrap) */
.org-person-card strong {
    display: block;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}
.org-person-card .text-muted.small {
    display: block;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-size: 0.85rem;
}
.org-node-wrap .org-box img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

/* Buttons */
.bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.btn-primary { background-color: var(--button); border-color: var(--button); }
.profile-short-text,
.news-card .card-text,
.headline-news-card .card-text,
.achievement-card .card-body p {
    text-align: justify;
    text-align-last: left;
}
.profile-short-text {
    font-size: 1.05rem;
    line-height: 1.7;
}
.news-card .card-text,
.headline-news-card .card-text,
.achievement-card .card-body p {
    font-size: 0.95rem;
}
.news-card .card-title,
.achievement-card h5 {
    font-size: 1rem;
}
.achievement-card .achievement-badge,
.achievement-card .badge {
    font-size: 0.75rem;
}
.btn-primary:hover { filter: brightness(0.9); background-color: var(--button); border-color: var(--button); }
.btn-warning { background-color: var(--secondary); border-color: var(--secondary); color: #fff; }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

/* Profile button accent */
.profile-action {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}
.profile-action:hover,
.profile-action:focus {
    background: var(--primary);
    color: #fff !important;
}

.facility-card h4,
.facility-detail h3 {
    color: var(--primary);
}

/* Sections */
.section-title {
    position: relative; padding-bottom: 12px; margin-bottom: 30px;
    font-weight: 800; color: var(--primary);
    font-size: 1.8rem;
}
.section-title::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 60px; height: 3px; background: var(--secondary);
}

.hero-carousel .carousel-item {
    height: 400px; background-size: cover; background-position: center;
}
.hero-carousel .carousel-caption {
    background: rgba(0,0,0,0.55); border-radius: 8px; padding: 20px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; border-radius: 12px; padding: 24px; text-align: center;
}
.stat-card h3 { font-size: 2.5rem; font-weight: 700; margin: 0; }
.stat-card p { margin: 0; opacity: 0.9; }

.year-stat-card {
    background: #fff; border-radius: 12px; padding: 20px; text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08); border-top: 4px solid var(--secondary);
    transition: transform 0.2s;
}
.year-stat-card:hover { transform: translateY(-3px); }
.year-stat-year { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.year-stat-count { font-size: 2rem; font-weight: 800; color: var(--secondary); line-height: 1.2; }
.year-stat-label { font-size: 0.85rem; color: #666; }
.year-stat-graduate { font-size: 0.8rem; color: var(--primary); margin-top: 6px; }
.year-stat-preview {
    background: #f8f9fa; border-radius: 8px; padding: 12px; text-align: center;
    border-left: 3px solid var(--primary);
}
.year-stat-preview strong { display: block; color: var(--primary); }
.year-stat-preview span { font-size: 1.1rem; font-weight: 700; }
.year-stat-preview small { color: #888; }

.news-card img { height: 200px; object-fit: cover; }
.headline-news-card {
    min-height: 520px;
    border: 1px solid rgba(0,0,0,0.08);
}
.headline-image-wrapper {
    position: relative;
    overflow: hidden;
    animation: headlineFadeIn 1s ease-in-out;
}
.headline-image-wrapper .card-img-top {
    height: 420px;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.7s ease;
}
.headline-image-wrapper:hover .card-img-top {
    transform: scale(1.08);
}
.headline-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.75) 100%);
    opacity: 0;
    animation: overlayAppear 1.2s ease-in-out forwards;
}
.headline-image-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
    opacity: 0;
    transform: translateY(-10px);
    animation: badgeSlideIn 1s ease-in-out 0.4s forwards;
}
.headline-image-title {
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 2;
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 14px 32px rgba(0,0,0,0.45);
    opacity: 0;
    transform: translateY(20px);
    animation: titleRise 1s ease-out 0.6s forwards;
}
@media (max-width: 991.98px) {
    .headline-image-title {
        font-size: 1.75rem;
    }
}
@media (max-width: 767.98px) {
    .headline-image-title {
        font-size: 1.25rem;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
    }
}
.headline-news-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.headline-news-card .card-body .btn {
    display: inline-block !important;
    width: auto !important;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
}
.news-card .card-body .btn {
    display: inline-block !important;
    width: auto !important;
}

.headline-news-card .card-text {
    font-size: 1rem;
    color: #444;
}
.headline-news-badge,
.headline-category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.96;
}
.headline-news-badge {
    background: rgba(220, 38, 38, 0.95);
    color: #fff;
}
.headline-category-badge {
    background: rgba(13, 110, 253, 0.95);
    color: #fff;
}
@keyframes headlineFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes overlayAppear {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes badgeSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes titleRise {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.achievement-badge {
    display: inline-block; background: var(--secondary);
    color: #fff; padding: 2px 10px; border-radius: 20px; font-size: 0.8rem;
}
/* Partners Carousel */
.partners-carousel-wrapper {
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    padding: 15px 0;
    margin: 30px 0;
}
.partners-carousel {
    display: flex;
    animation: scrollPartners 40s linear infinite;
    gap: 10px;
    width: 200%;
}
.partner-item {
    flex-shrink: 0;
    width: 90px;
    text-align: center;
    padding: 8px 5px;
    transition: transform 0.3s ease;
}
.partner-item:hover {
    transform: scale(1.08);
}
.partner-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    gap: 6px;
}
.partner-logo {
    max-height: 40px;
    max-width: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}
.partner-item:hover .partner-logo {
    filter: grayscale(0%);
}
.partner-placeholder {
    width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #666;
    font-weight: 500;
}
.partner-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: #333;
    line-height: 1.2;
    max-height: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
@keyframes scrollPartners {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}
.achievement-slider {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
}
.achievement-slider::-webkit-scrollbar {
    height: 8px;
}
.achievement-slider::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 999px;
}
.achievement-slider .achievement-card {
    flex: 0 0 32%;
    max-width: 32%;
    min-width: 320px;
}
@media (max-width: 1199.98px) {
    .achievement-slider .achievement-card {
        flex: 0 0 45%;
        max-width: 45%;
    }
}
@media (max-width: 991.98px) {
    .achievement-slider .achievement-card {
        flex: 0 0 80%;
        max-width: 80%;
    }
}
.banner-title-link, .carousel-caption h2 a {
    color: #fff !important;
    text-decoration: none !important;
}
.headline-news-card .card-body .btn {
    display: inline-block;
    width: auto;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
}
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0.65rem;
    left: 0.65rem;
    right: 0.65rem;
    z-index: 1080;
    padding: 0.35rem;
    background: rgba(255,255,255,0.96);
    border-radius: 18px;
    border: 1px solid rgba(13, 110, 253, 0.15);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 35px rgba(0,0,0,0.1);
    gap: 0.35rem;
    justify-content: space-between;
    align-items: center;
}
.mobile-bottom-nav .nav-btn {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.55rem 0.45rem;
    border-radius: 14px;
    font-size: 0.95rem;
    color: var(--primary);
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.12);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.mobile-bottom-nav .nav-btn:hover,
.mobile-bottom-nav .nav-btn:focus,
.mobile-bottom-nav .nav-btn:active {
    transform: translateY(-1px);
    background: var(--primary);
    color: #fff;
    border-color: rgba(13, 110, 253, 0.35);
}
.mobile-bottom-nav .nav-btn:hover i,
.mobile-bottom-nav .nav-btn:focus i,
.mobile-bottom-nav .nav-btn:active i {
    color: #fff;
}
.mobile-bottom-nav .nav-btn i {
    font-size: 1.1rem;
}
.mobile-bottom-nav .nav-btn.whatsapp {
    color: #fff;
    background: #25d366;
    border-color: rgba(37, 211, 102, 0.3);
}
.mobile-bottom-nav .nav-btn.whatsapp:hover {
    background: #23c15a;
}
@media (max-width: 767.98px) {
    body {
        padding-bottom: 5.75rem;
    }
    .mobile-bottom-nav {
        display: flex;
    }
    .whatsapp-float {
        display: none !important;
    }
}
.achievement-card {
    width: 100%;
}
.achievement-card img {
    height: 180px;
    object-fit: cover;
}
.achievement-card .card-body {
    min-height: 190px;
}

.page-header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; padding: 60px 0 40px; margin-bottom: 40px;
}

/* Footer */
.site-footer {
    background: var(--footer); color: rgba(255,255,255,0.85);
    padding: 50px 0 20px; margin-top: 50px;
}
.footer-title { color: var(--secondary); font-weight: 600; margin-bottom: 16px; }
.footer-links a { color: rgba(255,255,255,0.8); text-decoration: none; line-height: 2; }
.footer-links a:hover { color: var(--secondary); }
.footer-social a {
    color: #fff; font-size: 1.4rem;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: inline-flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--secondary); color: #fff; }
.footer-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 50%; }
.footer-divider { border-color: rgba(255,255,255,0.15); }

.whatsapp-float {
    position: fixed; bottom: 24px; right: 24px;
    width: 56px; height: 56px; background: #25d366; color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 28px; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 999; text-decoration: none;
}
.whatsapp-float:hover { color: #fff; transform: scale(1.1); }

.testimonial-card {
    background: #fff; border-left: 4px solid var(--secondary);
    padding: 20px; border-radius: 0 8px 8px 0; height: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.testimonial-card-header {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 1rem;
}
.testimonial-photo {
    width: 40px; height: 40px; flex-shrink: 0;
}
.testimonial-photo img,
.testimonial-photo-placeholder {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f2f4f7; color: #6c757d;
}
.testimonial-photo img {
    border: 2px solid rgba(0,0,0,0.08);
}
.testimonial-photo-placeholder {
    font-size: 1rem;
}
.testimonial-meta strong {
    display: block;
    font-size: 0.95rem;
}
.testimonial-meta small {
    font-size: 0.82rem;
}
.testimonial-slider {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    scroll-behavior: smooth;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    cursor: grab;
}
.testimonial-slider:active {
    cursor: grabbing;
}
.testimonial-card-col {
    flex: 0 0 300px;
    min-width: 300px;
    scroll-snap-align: start;
}
.gallery-item { position: relative; overflow: hidden; border-radius: 8px; cursor: pointer; }
.gallery-item img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.25);
    color: #fff;
    font-size: 2.2rem;
    transition: background 0.3s;
}
.gallery-item:hover .gallery-video-overlay {
    background: rgba(0,0,0,0.45);
}

.share-buttons a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; color: #fff;
    margin-right: 8px; text-decoration: none;
}
.share-fb { background: #3b5998; }
.share-wa { background: #25d366; }
.share-tw { background: #1da1f2; }

/* Admin */
.admin-wrapper { overflow-x: hidden; }
.admin-sidebar { width: 260px; min-width: 260px; min-height: 100vh; background: var(--dark); flex-shrink: 0; overflow-y: auto; max-height: 100vh; -webkit-overflow-scrolling: touch; }
.admin-main { min-width: 0; width: 100%; }
.admin-sidebar .nav-link { color: rgba(255,255,255,0.8); padding: 10px 20px; border-radius: 6px; margin: 2px 8px; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { background: var(--primary); color: #fff; }
.admin-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1040; }
.admin-sidebar-overlay.show { display: block; }
.admin-panel-toggle {
    position: fixed; bottom: 20px; left: 20px; z-index: 1060;
    width: 52px; height: 52px; border: none; border-radius: 50%;
    background: var(--primary); color: #fff; font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); cursor: pointer;
}

@media (max-width: 991.98px) {
    .admin-wrapper { overflow-x: hidden; }
    .admin-sidebar {
        position: fixed; top: 0; left: 0; z-index: 1050;
        transform: translateX(-100%); transition: transform 0.3s ease;
        height: 100vh;
        min-width: 0;
        width: 260px;
    }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-main { min-width: 0; }
    .school-brand-text h1 { font-size: 1.2rem; }
    .school-logo, .school-logo-placeholder { width: 60px; height: 60px; }
    .shortcut-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .shortcut-btn { padding: 12px 6px; }
    .shortcut-btn .shortcut-icon { width: 44px; height: 44px; font-size: 1.2rem; }
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed; top: 0; left: 0; z-index: 1050;
        transform: translateX(-100%); transition: transform 0.3s ease;
    }
    .admin-sidebar.show { transform: translateX(0); }
    .school-brand-text h1 { font-size: 1.2rem; }
    .school-logo, .school-logo-placeholder { width: 60px; height: 60px; }
    .shortcut-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .shortcut-btn { padding: 12px 6px; }
    .shortcut-btn .shortcut-icon { width: 44px; height: 44px; font-size: 1.2rem; }
}

@media (max-width: 767.98px) {
    .testimonial-slider {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 1rem;
    }
    .testimonial-card-col {
        min-width: 80%;
        max-width: 80%;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
    .testimonial-card {
        min-height: 260px;
    }
}

@media (max-width: 576px) {
    .shortcut-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-carousel .carousel-item { height: 250px; }
    .stat-card h3 { font-size: 1.8rem; }
}

/* Achievement Portrait Image Styles */
.achievement-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.achievement-img-container:hover {
    background: #e8e8e8;
}

.achievement-portrait-img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.achievement-img-container:hover .achievement-portrait-img {
    transform: scale(1.05);
}

/* Modal styling for achievements */
#achievementModal .modal-dialog {
    max-width: 500px;
}

#achievementModal .modal-body {
    padding: 1.5rem;
    background: #f8f9fa;
}

#achievementModal .img-fluid {
    max-height: 70vh;
    width: auto;
}
