/* Custom CSS untuk Website Satgas PPKPT */

/* Slideshow Styles */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    left: 0;
}

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

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

.slide.active {
    display: block !important;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* Gallery Lightbox Styles */
.gallery-item img {
    transition: transform 0.3s ease;
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
}

/* Back to Top Button Animation */
#back-to-top {
    transition: opacity 0.3s, visibility 0.3s;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Video Modal Styles */
#video-modal {
    transition: opacity 0.3s ease;
}

#video-modal.show {
    opacity: 1;
}

/* Form Validation Styles */
.form-error {
    border-color: #ef4444 !important;
}

.form-error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    background-color: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
}

/* Hover Effects for Service Cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* News Card Animation */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Navigation Dropdown Animation */
.nav-dropdown {
    transform-origin: top;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    header, footer, #back-to-top, #video-modal, .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: none;
        color: #000;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bg-gray-800 {
        background-color: #000;
    }

    .text-gray-600 {
        color: #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Sticky Footer Styles */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

/* Ensure footer stays at bottom even with minimal content */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    flex: 1;
}
