/* Custom CSS untuk Sistem Informasi Desa */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

section {
    padding: 60px 0;
}

.bg-ijo {
    background-color: #136005 !important;
}

.section-title {
    position: relative;
    margin-bottom: 30px;
    text-align: center;
}

.section-title h2 {
    font-weight: 700;
    margin-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #0d6efd;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg-desa.jpg') no-repeat center center/cover;
    color: white;
    padding: 100px 0;
    margin-bottom: 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease;
}

/* Card Styles */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* News Card */
.news-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.news-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 10px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* Service Card */
.service-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.service-card:hover {
    background-color: #f8f9fa;
}

.service-icon {
    font-size: 3rem;
    color: #0d6efd;
    margin-bottom: 20px;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0d6efd;
    z-index: 1;
}

.timeline-content {
    position: relative;
    width: 45%;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-date {
    position: absolute;
    top: 0;
    width: 45%;
    text-align: right;
    font-weight: 600;
    color: #6c757d;
}

.timeline-item:nth-child(odd) .timeline-date {
    left: 0;
}

.timeline-item:nth-child(even) .timeline-date {
    right: 0;
    text-align: left;
}

/* Contact Form */
.contact-form .form-control,
.contact-form .form-select {
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid #ced4da;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item::before {
        left: 30px;
    }
    
    .timeline-content,
    .timeline-date {
        width: calc(100% - 60px);
        margin-left: 60px !important;
    }
    
    .timeline-date {
        text-align: left !important;
        margin-bottom: 10px;
    }
}

/* Back to Top Button */
#backToTop {
    opacity: 0.7;
    transition: opacity 0.3s;
}

#backToTop:hover {
    opacity: 1;
}

/* Admin Dashboard Styles */
.dashboard-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.dashboard-card:hover {
    border-left-color: #0d6efd;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
}

/* Form Validation */
.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}