/* Main CSS File - Imports all modules */
@import url('base.css');
@import url('layout.css');
@import url('components.css');
@import url('sections.css');
@import url('navigation.css');
@import url('responsive.css');

/* Additional Global Styles */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c10015;
}

/* Focus Styles for Accessibility */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.kartu-nama-content {
    padding: 10px;
}

/* Horizontal Gallery Styles */
.gallery-section {
    margin: 60px auto;
    padding: 20px 0;
}

.horizontal-gallery {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.gallery-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
    padding: 20px 0;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 15px;
    padding: 10px;
}

.gallery-slide {
    flex: 0 0 calc(100% / 3 - 10px);
    min-width: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-slide img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-slide:hover img {
    transform: scale(1.05);
}

.gallery-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
}

.gallery-btn {
    background: #e2001a;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(226, 0, 26, 0.2);
}

.gallery-btn:hover {
    background: #c40017;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(226, 0, 26, 0.3);
}

.gallery-btn:active {
    transform: scale(0.95);
}

.gallery-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gallery-indicators {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 80%;
}

.gallery-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.gallery-indicator:hover {
    background: #bbb;
}

.gallery-indicator.active {
    background: #e2001a;
    transform: scale(1.2);
}

.gallery-counter {
    text-align: center;
    margin-top: 15px;
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.current-slide {
    color: #e2001a;
    font-weight: bold;
    font-size: 1.2rem;
}

.total-slides {
    font-weight: bold;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .gallery-slide {
        flex: 0 0 calc(100% / 2 - 10px);
    }
}

@media (max-width: 768px) {
    .gallery-slide {
        flex: 0 0 calc(100% - 10px);
    }
    
    .gallery-controls {
        gap: 10px;
    }
    
    .gallery-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .gallery-indicators {
        max-width: 70%;
    }
}

/* Autoplay indicator */
.autoplay-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
}

.autoplay-toggle {
    background: none;
    border: 2px solid #e2001a;
    color: #e2001a;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.autoplay-toggle:hover {
    background: #e2001a;
    color: white;
}

.autoplay-toggle.paused {
    background: #e2001a;
    color: white;
}

/* Floating Reset Filter */
.floating-reset-filter {
    position: fixed;
    bottom: 160px; /* Di atas tombol WhatsApp */
    right: 20px;
    z-index: 999;
    animation: slideUpFloating 0.3s ease;
    display: none;
}

.floating-reset-filter.show {
    display: block;
}

.floating-reset-btn {
    background: linear-gradient(135deg, #e2001a, #ff3333);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(226, 0, 26, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse 2s infinite;
}

.floating-reset-btn:hover {
    background: linear-gradient(135deg, #c40017, #e60000);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(226, 0, 26, 0.4);
}

.floating-reset-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(226, 0, 26, 0.3);
}

.floating-reset-btn i {
    font-size: 1rem;
}

.floating-reset-count {
    background: white;
    color: #e2001a;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 4px;
}

/* Animation for floating button */
@keyframes slideUpFloating {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(226, 0, 26, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(226, 0, 26, 0.5);
    }
    100% {
        box-shadow: 0 4px 12px rgba(226, 0, 26, 0.3);
    }
}

/* Adjust floating buttons position */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.back-to-top {
    background: #333;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none; /* Akan ditampilkan dengan JavaScript */
}

.back-to-top.show {
    display: block;
}

.whatsapp-float {
    background: #25D366;
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.whatsapp-float span {
    font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    .floating-reset-filter {
        bottom: 140px;
        right: 15px;
    }
    
    .floating-reset-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .floating-buttons {
        bottom: 20px;
        right: 15px;
        gap: 12px;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .whatsapp-float {
        padding: 10px 16px;
    }
    
    .whatsapp-float span {
        font-size: 0.85rem;
    }
}