/* 
 * Stylesheet Utama
 * Sistem Informasi Jadwal Kegiatan Kecamatan Ajibarang
 * Desain Responsif, Elegan, dengan Animasi Ringan
 */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* =====================
   HEADER SECTION
   ===================== */
.header-section {
    background: linear-gradient(135deg, #ff6b6b 0%, #51cf66 50%, #339af0 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
    animation: fadeInDown 0.6s ease-out;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.header-section.header-admin {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.header-title {
    font-size: 40px;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.header-subtitle {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 15px;
    opacity: 0.95;
}

.header-description {
    font-size: 16px;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .header-section {
        padding: 20px 0;
    }
    
    .header-title {
        font-size: 28px;
    }
    
    .header-subtitle {
        font-size: 16px;
    }
    
    .header-description {
        font-size: 14px;
    }
}

/* Timeline responsive tweaks */
@media (max-width: 576px) {
    .timeline-container::before {
        left: 16px;
    }

    .timeline-item {
        padding-left: 64px;
    }

    .timeline-marker {
        left: 8px;
        top: 20px;
        width: 42px;
        height: 42px;
    }
}

/* =====================
   NAVIGATION
   ===================== */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 20px;
    letter-spacing: 0.5px;
}

.nav-link {
    transition: var(--transition);
    margin: 0 5px;
}

.nav-link:hover {
    color: #fff !important;
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    transform: translateY(-2px);
}

/* =====================
   MAIN CONTENT
   ===================== */
.main-content {
    flex: 1;
    padding: 40px 0;
    min-height: calc(100vh - 300px);
}

.container-lg {
    max-width: 1200px;
}

/* =====================
   TAB STYLING
   ===================== */
.nav-tabs-custom {
    border-bottom: 2px solid #e9ecef;
    gap: 10px;
    margin-bottom: 30px;
}

.nav-tabs-custom .nav-link {
    background-color: white;
    border: 1px solid #e9ecef;
    color: #666;
    border-radius: 8px 8px 0 0;
    padding: 12px 20px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-tabs-custom .nav-link:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    transform: translateY(-2px);
}

.nav-tabs-custom .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* =====================
   CARD STYLING
   ===================== */
.card {
    border: none;
    border-radius: 12px;
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.card-kegiatan {
    animation: fadeInUp 0.5s ease-out;
    border-top: 4px solid var(--primary-color);
    overflow: hidden;
}

.card-kegiatan:hover {
    -webkit-transform: translateY(-8px);
    -moz-transform: translateY(-8px);
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Card Today Section */
.card-today {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.card-today:hover {
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-today .card-header {
    padding: 15px 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-today .card-body {
    padding: 0;
}

.today-event-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
}

.today-event-item:last-child {
    border-bottom: none;
}

.today-event-item:hover {
    background-color: #f8f9fa;
}

.today-event-item .event-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px !important;
}

.today-event-item .event-details p {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.today-event-item .event-details p strong {
    color: #333;
    font-weight: 600;
}

.today-event-item .badge {
    font-size: 12px;
    padding: 5px 12px;
}

/* Timeline Container */
.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--success-color));
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 80px;
    animation: fadeInUp 0.5s ease-out;
}

.timeline-item.timeline-today {
    padding: 15px;
    background: rgba(255, 193, 7, 0.05);
    border-left: 4px solid var(--warning-color);
    border-radius: 8px;
    margin: 20px 0;
    transform: scale(1.02);
}

.timeline-marker {
    position: absolute;
    left: 5px;
    top: 30px;
    width: 50px;
    height: 50px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.timeline-marker.marker-today {
    border-color: var(--warning-color);
    background: var(--warning-color);
    font-size: 28px;
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.5);
}

.card-timeline {
    margin-left: 0;
}

.card-timeline .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin: 0;
}

/* =====================
   INFO ITEM STYLING
   ===================== */
.info-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    gap: 8px;
}

.info-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.info-item .label {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    min-width: auto;
    display: inline-block;
    margin: 0;
}

.info-item .value {
    color: #333;
    font-weight: 500;
    display: inline;
}

.info-item .value-text {
    color: #666;
    font-size: 14px;
    margin: 5px 0 0 0;
    line-height: 1.5;
    flex-basis: 100%;
}

/* =====================
   BUTTON STYLING
   ===================== */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn:hover {
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    color: white;
}

.btn-success {
    background-color: var(--success-color);
}

.btn-success:hover {
    background-color: #157347;
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
}

.btn-warning:hover {
    background-color: #ffb81c;
    color: #333;
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #bb2d3b;
    color: white;
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
}

/* =====================
   ALERT STYLING
   ===================== */
.alert {
    border: none;
    border-radius: 8px;
    border-left: 4px solid;
    animation: fadeIn 0.4s ease-out;
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: #f8d7da;
    color: #842029;
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: #cfe2ff;
    color: #084298;
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: #fff3cd;
    color: #664d03;
}

/* =====================
   FORM STYLING
   ===================== */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    transition: var(--transition);
    font-size: 15px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: scale(1.01);
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

/* =====================
   TABLE STYLING
   ===================== */
.table {
    margin-bottom: 0;
}

.table thead {
    background-color: #2c3e50;
    color: white;
}

.table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid #e9ecef;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    -webkit-transform: scale(1.01);
    -moz-transform: scale(1.01);
    transform: scale(1.01);
}

.table td {
    vertical-align: middle;
    padding: 15px;
}

/* =====================
   BADGE STYLING
   ===================== */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* =====================
   STAT BOX STYLING
   ===================== */
.stat-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeInUp 0.5s ease-out;
}

.stat-box:hover {
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =====================
   INFO BOX STYLING
   ===================== */
.info-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.info-box:hover {
    -webkit-transform: translateY(-3px);
    -moz-transform: translateY(-3px);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.info-box h6 {
    color: #333;
    font-weight: 600;
}

/* =====================
   FOOTER
   ===================== */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-content p {
    margin: 5px 0;
    font-size: 14px;
}

.footer-content .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* =====================
   ANIMATIONS
   ===================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================
   RESPONSIVE DESIGN
   ===================== */
@media (max-width: 992px) {
    .container-lg {
        padding: 0 20px;
    }
    
    .header-title {
        font-size: 32px;
    }
    
    .stat-value {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 0;
    }
    
    .card-kegiatan {
        margin-bottom: 20px;
    }
    
    .nav-tabs-custom {
        gap: 5px;
    }
    
    .navbar-nav {
        padding-top: 15px;
    }
    
    .table-responsive {
        font-size: 13px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .info-item {
        flex-direction: column;
    }
    
    .info-item .label {
        margin-bottom: 5px;
    }
    
    /* Timeline responsive */
    .timeline-container::before {
        left: 25px;
    }
    
    .timeline-item {
        padding-left: 75px;
    }
    
    .timeline-marker {
        left: 0px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .header-section {
        padding: 30px 15px;
    }
    
    .header-title {
        font-size: 24px;
    }
    
    .header-subtitle {
        font-size: 14px;
    }
    
    .main-content {
        padding: 15px 0;
    }
    
    .row {
        margin: 0 -10px;
    }
    
    .col-md-6,
    .col-md-3,
    .col-lg-4 {
        padding: 10px;
    }
    
    .stat-box {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .card-header {
        padding: 12px 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table td {
        padding: 8px;
    }
    
    /* Timeline responsive */
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 65px;
    }
    
    .timeline-marker {
        left: -5px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .timeline-marker.marker-today {
        font-size: 22px;
    }
}

/* =====================
   UTILITY CLASSES
   ===================== */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.5rem !important;
}

.mb-2 {
    margin-bottom: 1rem !important;
}

.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.fw-bold {
    font-weight: bold;
}

/* =====================
   SCROLLBAR STYLING
   ===================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
