/* ============================================================
   assets/css/responsive.css - GLO Colour Labs Responsive Styles
   ============================================================
   Complete responsive design with:
   - Mobile-first approach
   - Tablet and desktop breakpoints
   - Navigation responsiveness
   - Grid and flexbox adjustments
   - Typography scaling
   - Component-specific responsive styles
   - Touch-friendly interactions
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES (Responsive)
   ============================================================ */
:root {
    --mobile-padding: 16px;
    --tablet-padding: 24px;
    --desktop-padding: 40px;
    --mobile-font-size: 15px;
    --tablet-font-size: 16px;
    --desktop-font-size: 18px;
}

/* ============================================================
   2. LARGE SCREENS (1200px and up)
   ============================================================ */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 40px;
    }
    
    .grid-xl-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-xl-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-xl-4 { grid-template-columns: repeat(4, 1fr); }
    .grid-xl-5 { grid-template-columns: repeat(5, 1fr); }
    .grid-xl-6 { grid-template-columns: repeat(6, 1fr); }
}

/* ============================================================
   3. DESKTOP (992px to 1199px)
   ============================================================ */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
        padding: 0 30px;
    }
    
    .grid-lg-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-lg-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-lg-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-lg-5 { grid-template-columns: repeat(2, 1fr); }
    .grid-lg-6 { grid-template-columns: repeat(2, 1fr); }
    
    /* Hide on desktop */
    .hide-lg { display: none !important; }
    
    /* Typography */
    h1 { font-size: 40px; }
    h2 { font-size: 32px; }
    h3 { font-size: 22px; }
    h4 { font-size: 18px; }
    
    .section-header h2 { font-size: 34px; }
}

/* ============================================================
   4. TABLET (768px to 991px)
   ============================================================ */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 24px;
    }
    
    .grid-md-1 { grid-template-columns: 1fr; }
    .grid-md-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-md-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-md-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-md-5 { grid-template-columns: repeat(2, 1fr); }
    .grid-md-6 { grid-template-columns: repeat(2, 1fr); }
    
    .grid-auto { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .grid-auto-200 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .grid-auto-300 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    
    /* Hide on tablet */
    .hide-md { display: none !important; }
    
    /* Typography */
    h1 { font-size: 34px; }
    h2 { font-size: 28px; }
    h3 { font-size: 20px; }
    h4 { font-size: 17px; }
    
    .section-header h2 { font-size: 30px; }
    .section-header p { font-size: 16px; }
    
    /* Spacing */
    .section { padding: 60px 0; }
    .section-sm { padding: 40px 0; }
    .section-lg { padding: 80px 0; }
    
    /* Flex utilities */
    .flex-md-column { flex-direction: column; }
    .flex-md-wrap { flex-wrap: wrap; }
    .flex-md-center { justify-content: center; align-items: center; }
    
    /* Buttons */
    .btn { padding: 10px 24px; font-size: 14px; }
    .btn-lg { padding: 14px 36px; font-size: 15px; }
    
    /* Cards */
    .card-body { padding: 16px; }
    
    /* Hero Slider */
    .hero-slider { height: 80vh !important; min-height: 500px !important; }
    .slider-arrow { width: 44px; height: 44px; font-size: 20px; }
    .slider-prev { left: 12px; }
    .slider-next { right: 12px; }
    
    /* Album cards */
    .album-card .album-image { height: 200px; }
    
    /* Stats */
    .stats-section .stat-number { font-size: 36px; }
    
    /* About section */
    .about-section .grid { grid-template-columns: 1fr; gap: 40px; }
    .about-section .about-image { order: -1; }
}

/* ============================================================
   5. MOBILE (480px to 767px)
   ============================================================ */
@media (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 0 16px;
    }
    
    .grid-sm-1 { grid-template-columns: 1fr; }
    .grid-sm-2 { grid-template-columns: 1fr; }
    .grid-sm-3 { grid-template-columns: 1fr; }
    .grid-sm-4 { grid-template-columns: 1fr; }
    .grid-sm-5 { grid-template-columns: 1fr; }
    .grid-sm-6 { grid-template-columns: 1fr; }
    
    .grid-auto { grid-template-columns: 1fr; }
    .grid-auto-200 { grid-template-columns: 1fr; }
    .grid-auto-300 { grid-template-columns: 1fr; }
    .grid-auto-350 { grid-template-columns: 1fr; }
    
    /* Hide on mobile */
    .hide-sm { display: none !important; }
    
    /* Typography */
    body { font-size: 15px; }
    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
    h5 { font-size: 15px; }
    h6 { font-size: 14px; }
    
    .section-header h2 { font-size: 26px; }
    .section-header p { font-size: 15px; }
    .section-header .subtitle { font-size: 12px; }
    
    /* Spacing */
    .section { padding: 50px 0; }
    .section-sm { padding: 30px 0; }
    .section-lg { padding: 60px 0; }
    
    .mt-2xl { margin-top: 30px; }
    .mb-2xl { margin-bottom: 30px; }
    .p-2xl { padding: 30px; }
    
    /* Flex utilities */
    .flex-sm-column { flex-direction: column; }
    .flex-sm-wrap { flex-wrap: wrap; }
    .flex-sm-center { justify-content: center; align-items: center; }
    .flex-sm-stretch { align-items: stretch; }
    .gap-sm { gap: 12px; }
    
    /* Buttons */
    .btn { 
        padding: 10px 20px; 
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
    .btn-lg { 
        padding: 12px 28px; 
        font-size: 15px;
    }
    .btn-sm { 
        padding: 6px 14px; 
        font-size: 12px;
    }
    .btn-block-sm { display: flex; width: 100%; justify-content: center; }
    
    /* Cards */
    .card { border-radius: 10px; }
    .card-body { padding: 14px; }
    .card-title { font-size: 17px; }
    .card-text { font-size: 13px; }
    
    /* Hero Slider */
    .hero-slider { height: 70vh !important; min-height: 400px !important; }
    .slider-arrow { display: none !important; }
    .slider-dot { width: 10px; height: 10px; }
    .slider-controls { bottom: 20px; gap: 8px; }
    
    .slide-item .slide-content h1 { font-size: 32px; }
    .slide-item .slide-content p { font-size: 16px; }
    .slide-item .slide-content .btn-group { flex-direction: column; width: 100%; }
    .slide-item .slide-content .btn-group .btn { width: 100%; text-align: center; }
    
    /* Stats */
    .stats-section .stat-number { font-size: 30px; }
    .stats-section .stat-label { font-size: 12px; }
    .stats-section .stat-item { padding: 12px; }
    
    /* Category Cards */
    .category-card { padding: 24px 16px; }
    .category-card .icon { font-size: 40px; }
    .category-card h3 { font-size: 17px; }
    
    /* Album Cards */
    .album-card .album-image { height: 180px; }
    .album-card .album-body { padding: 14px; }
    .album-card .album-body h3 { font-size: 16px; }
    
    /* Step Cards */
    .step-card { padding: 20px 16px; }
    .step-card .icon { font-size: 28px; }
    .step-card h3 { font-size: 16px; }
    .step-card p { font-size: 13px; }
    
    /* Feature Cards */
    .feature-card { padding: 24px 16px; }
    .feature-card .icon { font-size: 36px; }
    .feature-card h3 { font-size: 16px; }
    .feature-card p { font-size: 13px; }
    
    /* Testimonials */
    .testimonial-card { padding: 20px; }
    .testimonial-card .quote { font-size: 14px; }
    .testimonial-card .stars { font-size: 16px; }
    
    /* Forms */
    .form-control { padding: 10px 12px; font-size: 14px; }
    .form-group { margin-bottom: 14px; }
    .form-label { font-size: 13px; }
    
    /* Tables */
    .table-wrapper { border-radius: 8px; }
    .table th, .table td { 
        padding: 8px 10px; 
        font-size: 12px;
    }
    .table-responsive-stack {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
    
    /* Pagination */
    .pagination a, .pagination span {
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        font-size: 13px;
    }
    
    /* Alerts */
    .alert { 
        padding: 12px 16px; 
        font-size: 13px;
        border-left-width: 3px;
    }
    
    /* Badges */
    .badge { 
        padding: 3px 10px; 
        font-size: 10px;
    }
    
    /* Text alignment */
    .text-sm-center { text-align: center !important; }
    .text-sm-left { text-align: left !important; }
    .text-sm-right { text-align: right !important; }
    
    /* WhatsApp Float */
    .whatsapp-float { bottom: 16px; right: 16px; }
    .whatsapp-float a { width: 48px; height: 48px; font-size: 24px; }
    
    /* Back to Top */
    #backToTop { 
        bottom: 80px; 
        right: 16px; 
        width: 38px; 
        height: 38px; 
        font-size: 16px;
    }
}

/* ============================================================
   6. EXTRA SMALL (480px and below)
   ============================================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    /* Typography */
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 16px; }
    h4 { font-size: 15px; }
    
    .section-header h2 { font-size: 22px; }
    .section-header p { font-size: 14px; }
    
    /* Spacing */
    .section { padding: 40px 0; }
    .section-sm { padding: 24px 0; }
    .section-lg { padding: 48px 0; }
    
    /* Hero Slider */
    .hero-slider { height: 60vh !important; min-height: 350px !important; }
    .slide-item .slide-content h1 { font-size: 26px; }
    .slide-item .slide-content p { font-size: 14px; }
    .slide-item .slide-content .subtitle { font-size: 16px !important; }
    
    /* Stats */
    .stats-section .stat-number { font-size: 24px; }
    .stats-section .stat-item { padding: 8px; }
    .stats-section .stat-label { font-size: 11px; }
    
    /* Cards */
    .card-body { padding: 12px; }
    .album-card .album-image { height: 150px; }
    
    /* Buttons */
    .btn { 
        padding: 8px 16px; 
        font-size: 13px;
    }
    .btn-lg { 
        padding: 10px 20px; 
        font-size: 14px;
    }
    
    /* Forms */
    .form-control { 
        padding: 8px 10px; 
        font-size: 13px;
        border-width: 1px;
    }
    
    /* Tables */
    .table th, .table td { 
        padding: 6px 8px; 
        font-size: 11px;
    }
    
    /* Badges */
    .badge { 
        padding: 2px 8px; 
        font-size: 9px;
    }
    
    /* Category Cards */
    .category-card { 
        padding: 18px 12px; 
        border-radius: 12px;
    }
    .category-card .icon { font-size: 32px; }
    .category-card h3 { font-size: 15px; }
    .category-card p { font-size: 12px; }
    
    /* Step Cards */
    .step-card { 
        padding: 16px 12px; 
        border-radius: 12px;
    }
    .step-card .icon { font-size: 24px; }
    .step-card h3 { font-size: 14px; }
    .step-card p { font-size: 12px; }
    
    /* Feature Cards */
    .feature-card { 
        padding: 18px 12px; 
        border-radius: 12px;
    }
    .feature-card .icon { font-size: 28px; }
    .feature-card h3 { font-size: 15px; }
    .feature-card p { font-size: 12px; }
    
    /* Testimonial Cards */
    .testimonial-card { padding: 16px; }
    .testimonial-card .quote { font-size: 13px; }
    .testimonial-card .stars { font-size: 14px; }
    
    /* WhatsApp Float */
    .whatsapp-float { bottom: 12px; right: 12px; }
    .whatsapp-float a { width: 42px; height: 42px; font-size: 20px; }
    
    /* Back to Top */
    #backToTop { 
        bottom: 70px; 
        right: 12px; 
        width: 34px; 
        height: 34px; 
        font-size: 14px;
    }
}

/* ============================================================
   7. LANDSCAPE ORIENTATION (Mobile)
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slider {
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: none !important;
    }
    
    .slide-item .slide-content {
        padding: 40px 0;
    }
    
    .slide-item .slide-content h1 {
        font-size: 28px;
    }
    
    .slide-item .slide-content p {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .slide-item .slide-content .btn-group .btn {
        padding: 6px 16px;
        font-size: 12px;
    }
}

/* ============================================================
   8. PRINTER FRIENDLY
   ============================================================ */
@media print {
    .no-print,
    .whatsapp-float,
    #backToTop,
    .mobile-menu-toggle,
    .dropdown-menu,
    .hero-slider .slider-controls,
    .hero-slider .slider-arrow {
        display: none !important;
    }
    
    .hero-slider {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        position: relative !important;
    }
    
    .slide-item {
        position: relative !important;
        opacity: 1 !important;
        height: auto !important;
        display: block !important;
        page-break-after: always;
    }
    
    .slide-item .slide-content {
        padding: 40px 0;
    }
    
    .slide-item .slide-content h1,
    .slide-item .slide-content p,
    .slide-item .slide-content .btn-group {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .section {
        padding: 30px 0 !important;
        page-break-inside: avoid;
    }
    
    .grid {
        display: block !important;
    }
    
    .grid > * {
        margin-bottom: 20px;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .album-card .album-image {
        height: 200px !important;
    }
}

/* ============================================================
   9. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .whatsapp-float a {
        animation: none !important;
    }
    
    .slide-item {
        transition: opacity 0.5s ease !important;
    }
    
    .slide-item .slide-content h1,
    .slide-item .slide-content p,
    .slide-item .slide-content .btn-group {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================================
   10. TOUCH DEVICE OPTIMIZATIONS
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn,
    .btn-admin,
    .slider-arrow,
    .slider-dot,
    .pagination a,
    .pagination span,
    .admin-table .actions .btn-icon {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects that might cause issues */
    .card:hover,
    .category-card:hover,
    .album-card:hover,
    .step-card:hover,
    .feature-card:hover,
    .testimonial-card:hover {
        transform: none !important;
    }
    
    /* Improve touch scrolling */
    .admin-sidebar {
        -webkit-overflow-scrolling: touch;
    }
    
    .table-wrapper {
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================================
   11. DARK MODE SUPPORT
   ============================================================ */
@media (prefers-color-scheme: dark) {
    .hero-slider .slide-item {
        background: linear-gradient(135deg, #0a0a1a 0%, #141428 30%, #12122e 70%, #0a1a2a 100%) !important;
    }
    
    .section:not(.bg-white):not(.bg-gray-50) {
        background: #0f0f1f;
    }
    
    .section.bg-gray-50 {
        background: #1a1a2e;
    }
    
    .card,
    .category-card,
    .album-card,
    .testimonial-card,
    .feature-card {
        background: #1f1f35;
        border-color: #2a2a45;
    }
    
    .card-title,
    .category-card h3,
    .album-card h3,
    .feature-card h3,
    .testimonial-card .author-name {
        color: #f3f4f6;
    }
    
    .card-text,
    .category-card p,
    .album-card p,
    .feature-card p,
    .testimonial-card .quote {
        color: #9ca3af;
    }
    
    .section-header h2 {
        color: #f3f4f6;
    }
    
    .section-header p {
        color: #9ca3af;
    }
    
    .about-section .about-text p {
        color: #d1d5db;
    }
    
    .form-control {
        background: #1a1a2e;
        border-color: #2a2a45;
        color: #f3f4f6;
    }
    
    .form-control:focus {
        border-color: var(--color-accent);
        box-shadow: 0 0 0 3px rgba(232, 200, 122, 0.15);
    }
    
    .form-label {
        color: #d1d5db;
    }
    
    .step-card {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.06);
    }
    
    .step-card:hover {
        background: rgba(255, 255, 255, 0.06);
    }
    
    .step-card h3 {
        color: #f3f4f6;
    }
    
    .step-card p {
        color: #9ca3af;
    }
}

/* ============================================================
   12. CUSTOM SCROLLBAR (Mobile friendly)
   ============================================================ */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
    
    ::-webkit-scrollbar-thumb {
        border-radius: 2px;
    }
}

/* ============================================================
   13. UTILITY RESPONSIVE HELPERS
   ============================================================ */
/* Hide on specific breakpoints */
.hide-xl { display: none !important; }
.hide-lg { display: none !important; }
.hide-md { display: none !important; }
.hide-sm { display: none !important; }
.hide-xs { display: none !important; }

/* Show on specific breakpoints */
.show-xl { display: block !important; }
.show-lg { display: block !important; }
.show-md { display: block !important; }
.show-sm { display: block !important; }
.show-xs { display: block !important; }

/* Responsive display helpers */
@media (max-width: 1199px) { .hide-xl { display: none !important; } .show-xl { display: none !important; } }
@media (max-width: 991px) { .hide-lg { display: none !important; } .show-lg { display: none !important; } }
@media (max-width: 767px) { .hide-md { display: none !important; } .show-md { display: none !important; } }
@media (max-width: 480px) { .hide-sm { display: none !important; } .show-sm { display: none !important; } }

/* Text alignment helpers */
@media (max-width: 767px) {
    .text-md-center { text-align: center !important; }
    .text-md-left { text-align: left !important; }
    .text-md-right { text-align: right !important; }
}

@media (max-width: 480px) {
    .text-sm-center { text-align: center !important; }
    .text-sm-left { text-align: left !important; }
    .text-sm-right { text-align: right !important; }
}

/* ============================================================
   14. PRINT STYLES EXTENDED
   ============================================================ */
@media print {
    /* Hide all interactive elements */
    .no-print,
    button:not(.print-button),
    .btn:not(.print-button),
    .whatsapp-float,
    #backToTop,
    .mobile-menu-toggle,
    .dropdown-menu,
    .hero-slider .slider-controls,
    .hero-slider .slider-arrow,
    .admin-sidebar,
    .sidebar-toggle,
    .admin-filters,
    .admin-pagination {
        display: none !important;
    }
    
    /* Ensure all content is visible */
    .slide-item {
        position: relative !important;
        opacity: 1 !important;
        height: auto !important;
        display: block !important;
        page-break-after: always;
        background: #fff !important;
    }
    
    .slide-item .slide-content {
        padding: 40px 0;
        color: #000 !important;
    }
    
    .slide-item .slide-content h1,
    .slide-item .slide-content p,
    .slide-item .slide-content .btn-group {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .slide-item .slide-content h1 {
        color: #000 !important;
    }
    
    .slide-item .slide-content p {
        color: #333 !important;
    }
    
    /* Table print styles */
    .table {
        font-size: 11px !important;
    }
    .table th,
    .table td {
        padding: 4px 8px !important;
    }
    
    /* Card print styles */
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    /* Grid print styles */
    .grid {
        display: block !important;
    }
    .grid > * {
        margin-bottom: 16px !important;
        width: 100% !important;
    }
    
    /* Container print styles */
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    /* Section print styles */
    .section {
        padding: 20px 0 !important;
        page-break-inside: avoid;
    }
    
    /* Colors for print */
    .bg-gradient,
    .bg-gradient-dark,
    .bg-gradient-hero {
        background: #fff !important;
    }
    
    .text-white {
        color: #000 !important;
    }
    
    .text-muted {
        color: #666 !important;
    }
    
    .text-accent {
        color: #000 !important;
    }
    
    .badge {
        border: 1px solid #ddd !important;
        background: #f5f5f5 !important;
        color: #000 !important;
    }
}