/* DPRD Mappi Website Custom CSS */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --primary-gradient: linear-gradient(135deg, #0d6efd, #0056b3);
    --secondary-gradient: linear-gradient(135deg, #6c757d, #495057);
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Top Bar */
.top-bar {
    background: var(--primary-color);
    font-size: 0.875rem;
}

/* Header */
.main-header {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.logo {
    height: 50px;
    width: 50px;
    object-fit: contain;
}

/* Navigation */
.navbar {
    background: var(--secondary-color) !important;
    padding: 0.5rem 0;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.8) !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
}

.navbar-nav .dropdown-menu {
    background: var(--secondary-color);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.navbar-nav .dropdown-item {
    color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

.navbar-nav .dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-content h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-buttons .btn {
    margin: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 500;
}

/* Stats Section */
.stat-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.stat-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: var(--light-color);
}

/* News Cards */
.news-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.news-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.news-meta {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Sidebar */
.sidebar .card {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sidebar .card-header {
    font-weight: 600;
    border-bottom: 2px solid;
}

/* Events */
.event-item {
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    background: var(--light-color);
    margin-bottom: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.event-date {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-width: 60px;
}

/* Search Box */
.search-box .input-group {
    max-width: 300px;
}

.search-box .form-control {
    border-right: none;
}

.search-box .btn {
    border-left: none;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: rgba(255,255,255,0.8);
}

.footer-logo {
    height: 40px;
    width: 40px;
    object-fit: contain;
}

.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

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

/* Section Headers */
.section-header h2 {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

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

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        height: 400px;
    }
    
    .hero-content h2 {
        font-size: 1.75rem;
    }
    
    .search-box {
        margin-bottom: 1rem;
    }
    
    .search-box .input-group {
        max-width: 100%;
    }
}

/* Custom Bootstrap Overrides */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

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

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
}

.card {
    border: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* Loading Animation */
.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}