/* ============================================
   ONE STOP CENTRE - RESPONSIVE STYLESHEET
   Mesra Semua Peranti
============================================ */

/* ============================================
   TABLET & BELOW (1024px dan ke bawah)
============================================ */
@media (max-width: 1024px) {
    
    :root {
        --sidebar-width: 280px;
    }

    /* Main Content */
    .main-content {
        margin-left: 0;
        padding: 30px 20px;
        padding-top: 80px;
    }
    
    /* Slider Responsive */
    .slider-container {
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }
    
    .slider-wrapper {
        height: 300px;
    }
    
    .slider-nav {
        width: 35px;
        height: 35px;
    }
    
    .slider-nav.prev {
        left: 0.5rem;
    }
    
    .slider-nav.next {
        right: 0.5rem;
    }
    
    .slider-nav svg {
        width: 18px;
        height: 18px;
    }
    
    .slide-caption {
        padding: 1.2rem;
    }
    
    .slide-caption h3 {
        font-size: 1.1rem;
    }
    
    .slide-caption p {
        font-size: 0.85rem;
    }
    
    .slider-dots {
        bottom: 1rem;
    }

    /* Sidebar - Tersembunyi secara default */
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Show Menu Toggle Button */
    .menu-toggle-btn {
        display: flex;
    }

    /* Show Sidebar Close Button */
    .sidebar-close-btn {
        display: block;
    }

    /* Button Grid - 2 columns */
    .button-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    /* Content Header */
    .content-header h2 {
        font-size: 1.8rem;
    }

    /* Tab Header Images */
    .tab-header-images {
        flex-direction: column;
    }
}

/* ============================================
   MOBILE LANDSCAPE & SMALL TABLETS (768px)
============================================ */
@media (max-width: 768px) {
    
    /* Main Content */
    .main-content {
        padding: 20px 15px;
        padding-top: 75px;
    }

    /* Content Header */
    .content-header h2 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    /* Button Grid - 1 column */
    .button-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    /* Button Card */
    .button-card {
        padding: 25px;
    }

    .button-card h3 {
        font-size: 1.2rem;
    }

    .card-icon {
        width: 55px;
        height: 55px;
    }

    .card-icon i {
        font-size: 1.6rem;
    }

    /* Sidebar */
    .sidebar-header {
        padding: 25px 15px;
    }

    .sidebar-logo {
        width: 80px;
    }

    .sidebar-header h1 {
        font-size: 1.3rem;
    }

    .sidebar-header h2 {
        font-size: 0.85rem;
    }

    /* Modal */
    .modal-content {
        padding: 30px 25px;
        max-width: 90%;
    }

    .modal-content h3 {
        font-size: 1.3rem;
    }
}

/* ============================================
   MOBILE PORTRAIT (480px dan ke bawah)
============================================ */
@media (max-width: 480px) {
    
    /* Main Content */
    .main-content {
        padding: 15px 12px;
        padding-top: 70px;
    }

    /* Menu Toggle Button */
    .menu-toggle-btn {
        top: 15px;
        left: 15px;
        padding: 10px 14px;
        font-size: 1.2rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    
    /* Slider Mobile */
    .slider-container {
        margin-bottom: 1rem;
        border-radius: 6px;
    }
    
    .slider-wrapper {
        height: 200px;
    }
    
    .slider-nav {
        width: 30px;
        height: 30px;
    }
    
    .slider-nav svg {
        width: 16px;
        height: 16px;
    }
    
    .slide-caption {
        padding: 0.8rem;
    }
    
    .slide-caption h3 {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }
    
    .slide-caption p {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .slider-dots {
        bottom: 0.8rem;
        gap: 0.4rem;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    .dot.active {
        width: 24px;
    }

    /* Content Header */
    .content-header {
        margin-bottom: 20px;
    }

    .content-header h2 {
        font-size: 1.4rem;
    }

    .content-header h2::after {
        width: 50px;
        height: 3px;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    /* Hero Image */
    .hero-image {
        margin-top: 20px;
    }

    /* Tab Header Images */
    .tab-header-images {
        margin: 20px 0;
        gap: 15px;
    }

    /* Button Grid */
    .button-grid {
        margin-top: 20px;
        gap: 15px;
    }

    /* Button Card */
    .button-card {
        padding: 20px;
    }

    .button-card h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .button-card p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .card-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }

    .card-icon i {
        font-size: 1.4rem;
    }

    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        gap: 8px;
    }

    /* Sidebar */
    .sidebar {
        width: 85%;
        max-width: 280px;
    }

    .sidebar-header {
        padding: 20px 15px;
    }

    .sidebar-logo {
        padding: 10px 15px;
    }

    .sidebar-header h1 {
        font-size: 1.2rem;
    }

    .sidebar-header h2 {
        font-size: 0.8rem;
    }

    .sidebar-nav {
        padding: 15px 12px;
    }

    .tab-link {
        padding: 12px 15px;
        font-size: 0.95rem;
        gap: 10px;
    }

    .tab-link i {
        font-size: 1.1rem;
        width: 22px;
    }

    .sidebar-footer {
        padding: 15px;
    }

    .sidebar-footer p {
        font-size: 0.7rem;
    }

    .sidebar-close-btn {
        top: 12px;
        right: 12px;
        font-size: 1.8rem;
    }

    /* Modal */
    .modal-content {
        padding: 25px 20px;
        width: 95%;
    }

    .modal-content h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .modal-content p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .input-group {
        margin-bottom: 15px;
    }

    .input-group input {
        padding: 12px 12px 12px 40px;
        font-size: 0.95rem;
    }

    .input-group i {
        left: 12px;
        font-size: 0.9rem;
    }

    .modal-content button[type="submit"] {
        padding: 12px;
        font-size: 0.95rem;
    }

    .modal-close {
        font-size: 1.8rem;
        top: 12px;
        right: 12px;
    }

    .error-msg {
        font-size: 0.85rem;
        margin-top: 12px;
    }
}

/* ============================================
   VERY SMALL MOBILE (360px dan ke bawah)
============================================ */
@media (max-width: 360px) {
    
    .main-content {
        padding: 12px 10px;
        padding-top: 65px;
    }

    /* Extra Small Slider */
    .slider-wrapper {
        height: 180px;
    }
    
    .slider-nav {
        width: 28px;
        height: 28px;
    }
    
    .slider-nav.prev {
        left: 0.3rem;
    }
    
    .slider-nav.next {
        right: 0.3rem;
    }
    
    .slide-caption {
        padding: 0.6rem;
    }
    
    .slide-caption h3 {
        font-size: 0.85rem;
    }
    
    .slide-caption p {
        font-size: 0.7rem;
        display: none;
    }

    .content-header h2 {
        font-size: 1.2rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .button-card {
        padding: 18px;
    }

    .button-card h3 {
        font-size: 1rem;
    }

    .button-card p {
        font-size: 0.85rem;
    }

    .card-icon {
        width: 45px;
        height: 45px;
    }

    .card-icon i {
        font-size: 1.2rem;
    }

    .btn {
        padding: 9px 16px;
        font-size: 0.85rem;
    }

    .sidebar {
        width: 90%;
    }

    .sidebar-header h1 {
        font-size: 1.1rem;
    }

    .sidebar-header h2 {
        font-size: 0.75rem;
    }

    .tab-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* ============================================
   LARGE DESKTOP (1440px dan ke atas)
============================================ */
@media (min-width: 1440px) {
    
    .main-content {
        padding: 50px 60px;
    }

    .content-header h2 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .button-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 30px;
    }

    .button-card {
        padding: 35px;
    }

    .button-card h3 {
        font-size: 1.4rem;
    }

    .card-icon {
        width: 70px;
        height: 70px;
    }

    .card-icon i {
        font-size: 2rem;
    }
}

/* ============================================
   PRINT STYLES (Optional)
============================================ */
@media print {
    
    .sidebar,
    .menu-toggle-btn,
    .modal-overlay,
    #menu-overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .button-card {
        page-break-inside: avoid;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
============================================ */

/* Focus Styles */
a:focus,
button:focus,
input:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0044aa;
        --text-color: #000000;
        --border-color: #000000;
    }

    .button-card {
        border-width: 2px;
    }
}
