/* =====================================================
   GMIT Klasis Malaka - Main Stylesheet
   Modern Elegant Blue Theme
   ===================================================== */

:root {
    --primary:       #1a5276;
    --primary-light: #2471a3;
    --primary-dark:  #154360;
    --accent:        #f0b429;
    --accent-light:  #fce4a0;
    --secondary:     #2ecc71;
    --bg-light:      #f4f8fb;
    --bg-white:      #ffffff;
    --text-dark:     #1c2833;
    --text-muted:    #7f8c8d;
    --border-color:  #d5e8f3;
    --shadow-sm:     0 2px 8px rgba(26,82,118,0.08);
    --shadow-md:     0 6px 24px rgba(26,82,118,0.12);
    --shadow-lg:     0 12px 40px rgba(26,82,118,0.18);
    --radius-sm:     8px;
    --radius-md:     14px;
    --radius-lg:     20px;
    --transition:    all 0.3s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', 'Inter', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
    position: fixed; inset: 0;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease;
}
#loading-screen.hide { opacity: 0; pointer-events: none; }
#loading-screen img { width: 90px; margin-bottom: 16px; animation: pulse-logo 1.6s ease-in-out infinite; }
#loading-screen h5 { color: var(--primary); font-weight: 700; font-size: 1.2rem; margin-bottom: 4px; }
#loading-screen small { color: var(--text-muted); font-size: 0.78rem; }
.loading-bar {
    width: 180px; height: 4px;
    background: #e0eaf5; border-radius: 99px;
    margin-top: 20px; overflow: hidden;
}
.loading-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 99px;
    animation: loading-progress 1.8s ease-in-out infinite;
}
@keyframes loading-progress {
    0%   { width: 0; margin-left: 0; }
    50%  { width: 70%; margin-left: 30%; }
    100% { width: 0; margin-left: 100%; }
}
@keyframes pulse-logo {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}

/* ===== NAVBAR ===== */
.navbar-main {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
    box-shadow: 0 3px 16px rgba(26,82,118,0.25);
    padding: 0;
    position: sticky; top: 0; z-index: 1040;
}
.navbar-brand-wrapper { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.navbar-logo { width: 46px; height: 46px; object-fit: contain; filter: brightness(1.1); }
.navbar-brand-text { line-height: 1.2; }
.navbar-brand-text .org-name { color: #fff; font-size: 0.98rem; font-weight: 700; letter-spacing: 0.01em; }
.navbar-brand-text .org-sub  { color: rgba(255,255,255,0.75); font-size: 0.72rem; }
.navbar-main .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500; font-size: 0.9rem;
    padding: 1rem 0.8rem !important;
    transition: var(--transition);
    position: relative;
}
.navbar-main .nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 50%; right: 50%;
    height: 3px; background: var(--accent);
    border-radius: 99px 99px 0 0; transition: var(--transition);
}
.navbar-main .nav-link:hover::after,
.navbar-main .nav-link.active::after { left: 8px; right: 8px; }
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active { color: #fff !important; }
.navbar-main .dropdown-menu {
    background: #fff; border: none; border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg); min-width: 200px;
    border-top: 3px solid var(--primary);
}
.navbar-main .dropdown-item { color: var(--text-dark); padding: 9px 18px; font-size: 0.88rem; border-radius: 6px; margin: 2px; }
.navbar-main .dropdown-item:hover { background: var(--bg-light); color: var(--primary); }
.navbar-main .btn-login-nav {
    background: var(--accent); color: var(--primary-dark) !important;
    border-radius: 50px; padding: 6px 18px !important; font-weight: 600;
    margin-left: 8px; font-size: 0.85rem;
}
.navbar-main .btn-login-nav:hover { background: #e0a520; }

/* ===== HERO SLIDER ===== */
.hero-slider .carousel-item { height: 520px; }
.hero-slider .carousel-item img { width: 100%; height: 520px; object-fit: cover; }
.hero-slider .carousel-caption { background: linear-gradient(to top, rgba(0,0,0,0.65), transparent); padding: 40px 30px 30px; border-radius: 0; left: 0; right: 0; bottom: 0; text-align: left; }
.hero-slider .carousel-caption h3 { font-size: 2rem; font-weight: 700; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.hero-slider .carousel-indicators [data-bs-target] { width: 10px; height: 10px; border-radius: 50%; }
.hero-slider-placeholder { height: 520px; background: linear-gradient(135deg, var(--primary-dark), var(--primary-light)); display: flex; align-items: center; justify-content: center; }

/* ===== SECTION TITLES ===== */
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { font-size: 1.8rem; font-weight: 700; color: var(--primary-dark); position: relative; display: inline-block; margin-bottom: 8px; }
.section-title h2::after { content: ''; display: block; width: 60px; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; margin: 8px auto 0; }
.section-title p { color: var(--text-muted); font-size: 0.95rem; }

/* ===== CARDS ===== */
.card-modern {
    background: #fff; border-radius: var(--radius-md); border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm); overflow: hidden; transition: var(--transition);
    height: 100%;
}
.card-modern:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card-modern .card-img-top { height: 200px; object-fit: cover; transition: transform 0.4s ease; }
.card-modern:hover .card-img-top { transform: scale(1.04); }
.card-modern .card-body { padding: 1.25rem; }
.card-modern .card-title { font-size: 1rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 0.5rem; }
.card-modern .card-text { font-size: 0.875rem; color: var(--text-muted); }
.card-modern .card-footer { background: transparent; border-top: 1px solid var(--border-color); padding: 0.75rem 1.25rem; }

/* ===== SAMBUTAN ===== */
.sambutan-section { background: linear-gradient(135deg, #f0f7ff, var(--bg-light)); }
.ketua-photo { width: 220px; height: 280px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 5px solid #fff; }
.ketua-name { font-size: 1.3rem; font-weight: 700; color: var(--primary-dark); }
.ketua-jabatan { color: var(--primary-light); font-size: 0.9rem; font-weight: 600; }
.quote-icon { font-size: 3rem; color: var(--accent); line-height: 1; }

/* ===== VISITOR STATS ===== */
.stat-card {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; border-radius: var(--radius-md); padding: 1rem 0.8rem;
    text-align: center; box-shadow: var(--shadow-md); transition: var(--transition);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-card.accent { background: linear-gradient(135deg, var(--accent), #e09820); color: var(--primary-dark); }
.stat-card .stat-number { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.stat-card .stat-label { font-size: 0.75rem; opacity: 0.85; margin-top: 3px; }
.stat-card .stat-icon { font-size: 1.4rem; opacity: 0.3; margin-bottom: 4px; }

/* ===== FOOTER ===== */
.footer-main { background: linear-gradient(135deg, var(--primary-dark) 0%, #0d3452 100%); color: rgba(255,255,255,0.85); }
.footer-main h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; font-size: 0.95rem; letter-spacing: 0.02em; }
.footer-main a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.88rem; transition: var(--transition); }
.footer-main a:hover { color: var(--accent); }
.footer-divider { border-color: rgba(255,255,255,0.15); }
.footer-bottom { font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.footer-bottom .brand { color: var(--accent); font-weight: 600; }
.footer-map { border-radius: var(--radius-sm); overflow: hidden; border: 2px solid rgba(255,255,255,0.15); }

/* ===== BADGES ===== */
.badge-custom { padding: 5px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.badge-publish { background: #d5f5e3; color: #1a7a45; }
.badge-draft   { background: #fdebd0; color: #a04000; }

/* ===== BUTTONS ===== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border: none; border-radius: 50px;
    padding: 9px 24px; font-weight: 600; font-size: 0.88rem;
    transition: var(--transition); box-shadow: 0 4px 12px rgba(26,82,118,0.3);
}
.btn-primary-custom:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,82,118,0.4); color: #fff; }
.btn-accent { background: var(--accent); color: var(--primary-dark); border-radius: 50px; font-weight: 700; padding: 9px 24px; border: none; transition: var(--transition); }
.btn-accent:hover { background: #e0a520; transform: translateY(-2px); }

/* ===== SECTIONS ===== */
.section-pad { padding: 70px 0; }
.section-alt { background: var(--bg-light); }

/* ===== DETAIL PAGE ===== */
.content-body { font-size: 1rem; line-height: 1.85; color: #2c3e50; }
.content-body img { max-width: 100%; border-radius: var(--radius-sm); }
.content-meta { font-size: 0.82rem; color: var(--text-muted); }
.content-meta span { margin-right: 12px; }

/* ===== GALERI ===== */
.gallery-item { border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; position: relative; }
.gallery-item img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-overlay { position: absolute; inset: 0; background: rgba(26,82,118,0.55); display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay i { font-size: 2rem; color: #fff; }

/* ===== VIDEO CARD ===== */
.video-card { border-radius: var(--radius-md); overflow: hidden; position: relative; cursor: pointer; box-shadow: var(--shadow-sm); transition: var(--transition); }
.video-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.video-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.video-play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.35); transition: var(--transition); }
.video-play-btn i { font-size: 3.5rem; color: rgba(255,255,255,0.92); filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); transition: var(--transition); }
.video-card:hover .video-play-btn { background: rgba(0,0,0,0.5); }
.video-card:hover .video-play-btn i { transform: scale(1.1); }
.video-title { padding: 10px 12px; font-size: 0.88rem; font-weight: 600; color: var(--primary-dark); background: #fff; }

/* ===== GEREJA GRID ===== */
.gereja-card { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); background: #fff; }
.gereja-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.gereja-card .gereja-img { width: 100%; height: 180px; object-fit: cover; }
.gereja-stat-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: var(--bg-light); }
.gereja-stat-item { background: #fff; border-radius: 8px; padding: 6px 12px; font-size: 0.8rem; border: 1px solid var(--border-color); flex: 1; min-width: 80px; text-align: center; }
.gereja-stat-item strong { display: block; color: var(--primary); font-size: 1.1rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb-section { background: var(--bg-light); border-bottom: 1px solid var(--border-color); padding: 12px 0; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--primary-light); }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }

/* ===== SCROLL TO TOP ===== */
#scrollTop {
    position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px;
    background: var(--primary); color: #fff; border: none; border-radius: 50%;
    font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow-md);
    transition: var(--transition); opacity: 0; pointer-events: none; z-index: 999;
    display: flex; align-items: center; justify-content: center;
}
#scrollTop.show { opacity: 1; pointer-events: all; }
#scrollTop:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ===== ANIMATIONS ===== */
.fade-in-up { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-slider .carousel-item { height: 300px; }
    .hero-slider .carousel-item img { height: 300px; }
    .hero-slider-placeholder { height: 300px; }
    .hero-slider .carousel-caption h3 { font-size: 1.2rem; }
    .ketua-photo { width: 160px; height: 200px; }
    .section-pad { padding: 48px 0; }
    .stat-card .stat-number { font-size: 1.4rem; }
}

/* ===== ADMIN PANEL ===== */
.admin-sidebar {
    background: linear-gradient(180deg, var(--primary-dark) 0%, #0d3452 100%);
    height: 100vh;
    width: 260px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1030;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 99px; }
.admin-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.35); }
.admin-sidebar .sidebar-brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-sidebar .sidebar-brand img { width: 40px; }
.admin-sidebar .sidebar-brand h6 { color: #fff; font-size: 0.88rem; margin: 0; font-weight: 700; }
.admin-sidebar .sidebar-brand small { color: rgba(255,255,255,0.6); font-size: 0.72rem; }
.sidebar-menu { padding: 12px 0; }
.sidebar-menu .menu-label { color: rgba(255,255,255,0.4); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; padding: 12px 20px 4px; text-transform: uppercase; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,0.78); padding: 10px 20px;
    text-decoration: none; font-size: 0.875rem; font-weight: 500;
    transition: var(--transition); border-left: 3px solid transparent;
}
.sidebar-menu a i { font-size: 1rem; width: 20px; }
.sidebar-menu a:hover,
.sidebar-menu a.active { color: #fff; background: rgba(255,255,255,0.08); border-left-color: var(--accent); }
.sidebar-menu a.active { background: rgba(255,255,255,0.12); }

.admin-content { margin-left: 260px; min-height: 100vh; background: #f0f4f9; }
.admin-topbar { background: #fff; padding: 12px 24px; border-bottom: 1px solid #e0e9f3; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm); }
.admin-topbar h5 { margin: 0; font-weight: 700; color: var(--primary-dark); }
.admin-page-content { padding: 24px; }

.stat-widget { background: #fff; border-radius: var(--radius-md); padding: 1.4rem; box-shadow: var(--shadow-sm); border-left: 4px solid var(--primary); display: flex; align-items: center; gap: 16px; transition: var(--transition); }
.stat-widget:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.stat-widget .sw-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.stat-widget .sw-value { font-size: 1.8rem; font-weight: 800; color: var(--primary-dark); }
.stat-widget .sw-label { font-size: 0.82rem; color: var(--text-muted); }

.admin-card { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.admin-card-header { padding: 16px 20px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.admin-card-header h6 { margin: 0; font-weight: 700; color: var(--primary-dark); font-size: 0.95rem; }
.admin-card-body { padding: 20px; }

.table-admin thead th { background: var(--bg-light); color: var(--primary-dark); font-size: 0.82rem; font-weight: 700; border: none; padding: 12px 14px; }
.table-admin tbody td { padding: 12px 14px; font-size: 0.875rem; vertical-align: middle; border-color: #eef2f7; }
.table-admin tbody tr:hover { background: #f7fbff; }

.form-control-admin { border-radius: var(--radius-sm); border: 1.5px solid #d0dff0; padding: 10px 14px; font-size: 0.88rem; transition: var(--transition); }
.form-control-admin:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,82,118,0.12); }

@media (max-width: 991px) {
    .admin-sidebar { transform: translateX(-260px); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-content { margin-left: 0; }
}
