/* 
 * Stylesheet untuk Sistem Kehadiran SMK Hamzah
 * Main CSS File
 */

/* Root Variables */
: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;
    --primary-dark: #0a58ca;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f8fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Animation Keyframes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header Styles */
header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Clock Styles */
.clock-container {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-block;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

.clock-time {
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    transition: color 0.5s ease;
}

.clock-seconds {
    font-size: 1.2rem;
    opacity: 0.8;
}

.clock-date {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Card Enhancements */
.card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    font-weight: 600;
    border-bottom: 0;
}

/* Avatar */
.avatar-circle {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.avatar-text {
    text-transform: uppercase;
}

/* Tab Styling */
.nav-tabs .nav-link {
    border: none;
    position: relative;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.nav-tabs .nav-link:hover {
    opacity: 1;
}

.nav-tabs .nav-link.active {
    background-color: transparent;
    opacity: 1;
}

.nav-tabs .nav-link.active:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: white;
    bottom: -1px;
    left: 0;
    border-radius: 3px 3px 0 0;
}

/* Progress Bar Enhancements */
.progress {
    height: 20px;
    border-radius: 50px;
    background-color: var(--gray-200);
    overflow: hidden;
}

.progress-bar {
    border-radius: 50px;
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Info Board */
.info-board {
    max-height: 500px;
    overflow-y: auto;
}

.info-item {
    transition: all 0.3s ease;
    background-color: white;
}

.info-item:hover {
    background-color: var(--gray-100);
}

.info-title {
    color: var(--primary-color);
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.info-content {
    color: var(--gray-700);
}

/* Animations */
.pulse-animation {
    animation: pulse 2s infinite;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .clock-time {
        font-size: 1.4rem;
    }
    
    .clock-date {
        font-size: 0.75rem;
    }
    
    .avatar-circle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Button Enhancements */
.btn {
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn i {
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(3px);
}

/* Form Enhancements */
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid var(--gray-300);
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.input-group-text {
    background-color: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-700);
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: none;
    padding: 20px 20px 10px;
}

.modal-footer {
    border-top: none;
    padding: 10px 20px 20px;
}

/* Carousel Enhancements */
.carousel {
    border-radius: 10px;
    overflow: hidden;
}

.carousel-item img {
    height: 300px;
    object-fit: cover;
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 15px;
    max-width: 80%;
    margin: 0 auto;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 20px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}