/* Global Styles & Variables */
:root {
    --primary-color: #059669; /* Emerald 600 */
    --primary-dark: #047857; /* Emerald 700 */
    --primary-light: #10b981; /* Emerald 500 */
    --accent-color: #f59e0b; /* Amber 500 */
    --secondary-color: #0f172a; /* Slate 900 */
    --bg-light: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
    --shadow-hover: 0 20px 40px -15px rgba(5, 150, 105, 0.2);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
}

/* Top Bar */
.top-bar {
    font-size: 0.8125rem;
    white-space: nowrap;
}

.top-bar a:hover {
    text-decoration: underline !important;
    color: var(--accent-color) !important;
}

@media (max-width: 576px) {
    .top-bar .col-md-6:first-child {
        display: none; /* Hide phone/email on mobile to save space */
    }
    .top-bar .col-md-6:last-child {
        width: 100%;
        text-align: center !important;
    }
}

/* Navbar */
.navbar {
    transition: all 0.3s ease;
}

/* Dark navbar (non-home): deep shadow that blends with green bg */
.navbar-dark:not(.bg-transparent) {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Light navbar: subtle downward shadow */
.navbar-light {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Home page: navbar becomes solid when scrolled */
#site-header.scrolled #mainNav {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
}

/* Home page: top bar hides on scroll to give more space */
#site-header.scrolled .top-bar {
    max-height: 0;
    overflow: hidden;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    transition: all 0.3s ease;
}

#site-header .top-bar {
    max-height: 60px;
    opacity: 1;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.1rem;
}

.navbar-brand .text-success {
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 600;
    padding: 0.5rem 1.2rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-light .nav-link {
    color: var(--text-main) !important;
}

.navbar-dark .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.navbar-light .nav-link:hover,
.navbar-light .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link.active {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.navbar-dark .nav-link::after {
    background-color: rgba(255, 255, 255, 0.7);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Mobile Navbar Expanded State */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 1.5rem;
        box-shadow: 0 15px 30px rgba(0,0,0,0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-dark .navbar-toggler {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        padding: 0.5rem;
        border-radius: 0.75rem;
        backdrop-filter: blur(4px);
    }
    
    .navbar-toggler-icon {
        filter: brightness(1.2);
    }
    
    .navbar-brand img {
        height: 38px !important;
    }
    
    .navbar-brand .fw-bold {
        font-size: 0.85rem !important;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 85vh;
    background: url('../img/hero-bg.png') center/cover no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.95) 0%, rgba(4, 120, 87, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content h1 {
    font-size: clamp(2.8rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Hero buttons spacing on mobile */
.hero-section .btn {
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

@media (max-width: 576px) {
    .hero-section .btn {
        width: 100%;
        margin-bottom: 0.75rem;
    }
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    background-color: #fff;
}

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

.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Buttons */
.btn {
    border-radius: 30px;
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    letter-spacing: 0.5px;
}

.btn-success {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #064e3b 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #334155 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.4);
    color: white;
}

.btn-outline-light {
    border: 2px solid white;
    background: transparent;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
}

.stat-item {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s ease, background 0.4s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
}

.stat-item i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
}

.stat-item h3 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
    border-radius: 5px;
}

.text-start.section-title::after {
    left: 0;
    transform: none;
}

/* Pengumuman Badge */
.badge-info {
    background-color: #0dcaf0;
}

.badge-penting {
    background-color: #ffc107;
}

.badge-urgent {
    background-color: #dc3545;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #198754;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(4, 120, 87, 0.9), rgba(4, 120, 87, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

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

/* PPDB Countdown */
.countdown-box {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.countdown-item {
    display: inline-block;
    margin: 0 1rem;
}

.countdown-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.countdown-label {
    font-size: 1rem;
    color: #666;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Tables */
.table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
}

/* Admin Sidebar */
.admin-sidebar {
    background: #2c3e50;
    min-height: 100vh;
    padding: 2rem 0;
}

.admin-sidebar .nav-link {
    color: #ecf0f1 !important;
    padding: 1rem 1.5rem;
    margin: 0.25rem 0;
    border-radius: 0;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: #198754;
    color: white !important;
}

.admin-sidebar .nav-link i {
    width: 20px;
    margin-right: 0.5rem;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.dashboard-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .countdown-value {
        font-size: 2rem;
    }
    
    .countdown-item {
        margin: 0 0.5rem;
    }

    .stats-section {
        padding: 3rem 0;
    }

    .stat-item {
        padding: 1.5rem 0.75rem;
    }

    .gallery-item img {
        height: 200px;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Custom Overhaul Utilities */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.transition-all {
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bento Card Hover */
.bento-card {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(5, 150, 105, 0.25) !important;
}

.bento-card.large:hover .card-img-top {
    transform: scale(1.05);
}

.bento-card .card-img-top {
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Floating Stats */
.stat-card {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15) !important;
}

/* Navbar Scrolled State */
#mainNav.bg-white {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}
#mainNav .navbar-brand .text-success {
    transition: color 0.3s ease;
}
#mainNav.navbar-dark .navbar-brand .text-success {
    color: white !important;
}

/* PPDB Banner specific */
.backdrop-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    min-width: 70px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

.countdown-item span.countdown-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: #ffffff !important;
}

.countdown-item span.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    color: #ffffff !important;
}

/* Pengumuman List Hover */
.pengumuman-item {
    transition: all 0.3s ease;
}
.pengumuman-item:hover {
    background-color: #f8f9fa;
    transform: translateX(8px);
    border-left: 4px solid var(--bs-danger);
}

/* Gallery Hover Effects */
.gallery-card {
    cursor: pointer;
}
.gallery-card:hover .gallery-img {
    transform: scale(1.1);
}
.gallery-card:hover .gallery-overlay {
    opacity: 1 !important;
}
.gallery-card:hover .zoom-icon-wrapper {
    opacity: 1 !important;
    transform: translate(-50%, -50%) !important;
}
.gallery-card .transform-up {
    transform: translateY(20px);
}
.gallery-card:hover .transform-up {
    transform: translateY(0);
}
.gallery-card .delay-1 {
    transition-delay: 0.1s;
}

/* Fasilitas Hover Effects */
.fasilitas-card:hover .icon-wrapper {
    background-color: var(--bs-success) !important;
    color: white !important;
    transform: scale(1.1);
}

/* Footer Hover Effects */
.hover-slide-right {
    transition: all 0.3s ease;
}
.hover-slide-right:hover {
    transform: translateX(8px);
    color: #ffffff !important;
}

/* Premium Utility Animations */
.hover-scale {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.hover-scale:hover {
    transform: scale(1.05);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

@keyframes pulse-soft {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
.pulse-animation {
    animation: pulse-soft 2s infinite ease-in-out;
}

.steps-container {
    position: relative;
}
.steps-container::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(5, 150, 105, 0.1);
    z-index: 1;
}

.fade-in-up {
    animation: fadeInUpPPDB 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

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