/**
 * Website Resmi Pemerintah Kabupaten Sumba Tengah
 * Modern Government Website Theme
 * Version: 1.0.0
 */

/* ==========================================
   ROOT VARIABLES
========================================== */
:root {
    --primary-color: #0066CC;
    --secondary-color: #FFD700;
    --accent-color: #003399;
    --text-dark: #2c3e50;
    --text-light: #666;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* ==========================================
   GENERAL STYLES
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: #fff;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ==========================================
   TOP BAR
========================================== */
.top-bar {
    background: var(--accent-color);
    color: #fff;
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar-left span {
    color: #fff;
    margin-right: 20px;
    display: inline-block;
}

.top-bar-left i {
    margin-right: 5px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.top-bar-right span {
    color: #fff;
}

#darkModeToggle {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.85rem;
}

#darkModeToggle:hover {
    background: rgba(255,255,255,0.1);
}

.language-selector select {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.85rem;
    border-radius: 3px;
}

.language-selector select option {
    background: var(--accent-color);
    color: #fff;
}

/* ==========================================
   HEADER
========================================== */
.header {
    background: #fff;
    border-bottom: 3px solid var(--primary-color);
}

.logo img {
    max-width: 70px !important;
    height: auto !important;
    width: 70px !important;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin: 0;
}

.site-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.btn-search {
    background: var(--primary-color);
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-search:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

/* ==========================================
   NAVIGATION
========================================== */
.navbar {
    background: var(--primary-color) !important;
    padding: 0;
    box-shadow: var(--shadow);
}

.navbar-nav {
    flex-direction: row;
    width: 100%;
}

/* ==========================================
   RUNNING TEXT ANIMATION - FIX
========================================== */
.running-text-bar {
    background: #003399;
    color: #fff;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.running-text {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: scroll-text 30s linear infinite;
    font-weight: 500;
}

.running-text strong {
    font-weight: 700;
    color: #FFD700;
}

@keyframes scroll-text {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.running-text:hover {
    animation-play-state: paused;
}

.navbar-nav .nav-link {
    color: #fff !important;
    padding: 15px 18px !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: var(--accent-color);
}

.navbar-nav .nav-link i {
    font-size: 0.9rem;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 8px 8px;
    padding: 0;
    margin-top: 0;
    min-width: 250px;
}

.dropdown-item {
    padding: 12px 20px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: var(--bg-light);
    padding-left: 25px;
    color: var(--primary-color);
}

.dropdown-divider {
    margin: 0;
    border-color: var(--border-color);
}

/* ==========================================
   RUNNING TEXT
========================================== */
.running-text-bar {
    background: var(--secondary-color);
    padding: 10px 0;
    overflow: hidden;
    position: relative;
}

.running-text {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 30s linear infinite;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.running-text strong {
    color: var(--accent-color);
    font-weight: 700;
}

@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ==========================================
   HERO SLIDER
========================================== */
.hero-slider {
    position: relative;
    margin-top: 0;
}

.hero-slider .carousel-item {
    height: 600px;
    position: relative;
}

.hero-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-slider .carousel-caption {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    text-align: center;
    z-index: 10;
}

.hero-slider .carousel-caption h2 {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.hero-slider .carousel-caption p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.hero-slider .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

/* ==========================================
   QUICK LINKS
========================================== */
.quick-links {
    margin-top: -50px;
    position: relative;
    z-index: 100;
    padding: 0 15px;
}

.quick-link-card {
    background: #fff;
    padding: 30px 20px;
    text-align: center;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: block;
    height: 100%;
}

.quick-link-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: #fff;
}

.quick-link-card .icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    transition: var(--transition);
}

.quick-link-card:hover .icon {
    background: #fff;
}

.quick-link-card .icon i {
    font-size: 30px;
    color: #fff;
}

.quick-link-card:hover .icon i {
    color: var(--primary-color);
}

.quick-link-card h6 {
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.quick-link-card:hover h6 {
    color: #fff;
}

/* ==========================================
   SAMBUTAN
========================================== */
.sambutan {
    background: #fff;
}

.sambutan-image img {
    border-radius: 15px;
}

.sambutan-content {
    padding: 20px;
}

.sambutan-content h2 {
    color: var(--primary-color);
}

.sambutan-content h4 {
    font-weight: 600;
}

.sambutan-content .lead {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-light);
}

/* ==========================================
   NEWS & ANNOUNCEMENTS
========================================== */
.news-section {
    padding: 60px 0;
}

.section-header {
    margin-bottom: 30px;
}

.news-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.news-title a {
    color: var(--text-dark);
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.news-meta i {
    margin-right: 5px;
}

.news-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex: 1;
}

/* ==========================================
   SIDEBAR WIDGETS
========================================== */
.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.widget-title i {
    margin-right: 10px;
}

/* Announcement List */
.announcement-list {
    list-style: none;
    padding: 0;
}

.announcement-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.announcement-icon i {
    color: var(--primary-color);
}

.announcement-content h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.announcement-content h6 a {
    color: var(--text-dark);
}

.announcement-content h6 a:hover {
    color: var(--primary-color);
}

/* Agenda List */
.agenda-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.agenda-item:last-child {
    border-bottom: none;
}

.agenda-date {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.agenda-date .date-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.agenda-date .date-month {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.agenda-content h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.agenda-content h6 a {
    color: var(--text-dark);
}

.agenda-content h6 a:hover {
    color: var(--primary-color);
}

/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    background: var(--bg-light);
    transition: var(--transition);
    color: var(--text-dark);
}

.social-link:hover {
    transform: translateX(5px);
}

.social-link.facebook:hover {
    background: #1877f2;
    color: #fff;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
}

.social-link.twitter:hover {
    background: #1da1f2;
    color: #fff;
}

.social-link.youtube:hover {
    background: #ff0000;
    color: #fff;
}

.social-link i {
    font-size: 20px;
    width: 25px;
}

/* ==========================================
   STATISTICS
========================================== */
.statistics {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.stat-icon i {
    font-size: 35px;
    color: #fff;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ==========================================
   CHARTS & INFOGRAPHIC
========================================== */
.chart-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
}

/* ==========================================
   MAP
========================================== */
.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

#map {
    height: 500px;
    border-radius: 15px;
}

/* ==========================================
   VIDEO
========================================== */
.video-wrapper {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   FOOTER
========================================== */
.site-footer {
    background: #1a1a2e;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-widget h5 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-widget ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* ==========================================
   RESPONSIVE
========================================== */
@media (max-width: 991px) {
    .hero-slider .carousel-item {
        height: 400px;
    }
    
    .hero-slider .carousel-caption h2 {
        font-size: 2rem;
    }
    
    .hero-slider .carousel-caption p {
        font-size: 1rem;
    }
    
    .quick-links {
        margin-top: 30px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .hero-slider .carousel-item {
        height: 300px;
    }
    
    .hero-slider .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* ==========================================
   UTILITIES
========================================== */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 25px;
    font-weight: 500;
    border-radius: 5px;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.shadow-sm {
    box-shadow: var(--shadow) !important;
}

.shadow {
    box-shadow: var(--shadow-lg) !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(0, 102, 204, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: #fff;
}

::-moz-selection {
    background: var(--primary-color);
    color: #fff;
}
