/**
 * MOVIXIT Responsive Framework - Core Styles
 * @version 1.0.0
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --mr-mobile-breakpoint: 768px;
    --mr-tablet-breakpoint: 1024px;
    --mr-transition-speed: 0.3s;
}

/* ============================================
   BASE MOBILE STYLES (applies to all devices)
   ============================================ */
.mr-device-mobile .hide-on-mobile,
.mr-device-tablet .hide-on-tablet,
.mr-device-desktop .hide-on-desktop {
    display: none !important;
}

/* Touch optimization */
.mr-touch-device button,
.mr-touch-device .mr-btn,
.mr-touch-device a.mr-clickable {
    min-height: 44px;
    min-width: 44px;
}

/* ============================================
   MOBILE STYLES (≤ 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Container */
    .mr-container,
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Typography */
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }
    
    /* Grid - 1 column default */
    .mr-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Stack layouts */
    .mr-flex-row {
        flex-direction: column !important;
    }
    
    /* Spacing */
    section {
        padding: 40px 0 !important;
    }
    
    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Forms */
    input, select, textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Tables - make scrollable */
    .mr-table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Cards */
    .mr-card-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

/* ============================================
   TABLET STYLES (769px - 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Container */
    .mr-container,
    .container {
        max-width: 960px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    /* Typography */
    body {
        font-size: 15px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    
    /* Grid - 2 columns */
    .mr-grid[data-cols="3"],
    .mr-grid[data-cols="4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Cards */
    .mr-card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    /* Hero section */
    .mr-hero {
        min-height: 400px;
    }
}

/* ============================================
   DESKTOP STYLES (≥ 1025px)
   ============================================ */
@media (min-width: 1025px) {
    /* Container */
    .mr-container,
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 30px;
    }
    
    /* Typography */
    body {
        font-size: 16px;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    /* Grid - 3-4 columns */
    .mr-grid[data-cols="3"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .mr-grid[data-cols="4"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* Cards with hover effects */
    .mr-card {
        transition: transform 0.3s, box-shadow 0.3s;
    }
    
    .mr-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
}

/* ============================================
   WIDE DESKTOP (≥ 1400px)
   ============================================ */
@media (min-width: 1400px) {
    .mr-container,
    .container {
        max-width: 1320px;
    }
    
    .mr-grid[data-cols="5"] {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
/* Hide on specific devices */
.hide-mobile { display: block; }
.hide-tablet { display: block; }
.hide-desktop { display: block; }

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hide-tablet { display: none !important; }
    .show-tablet { display: block !important; }
}

@media (min-width: 1025px) {
    .hide-desktop { display: none !important; }
    .show-desktop { display: block !important; }
}

/* Text alignment responsive */
@media (max-width: 768px) {
    .text-center-mobile { text-align: center !important; }
    .text-left-mobile { text-align: left !important; }
    .text-right-mobile { text-align: right !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .text-center-tablet { text-align: center !important; }
    .text-left-tablet { text-align: left !important; }
}

/* Margin/Padding responsive */
@media (max-width: 768px) {
    .mt-mobile-0 { margin-top: 0 !important; }
    .mb-mobile-0 { margin-bottom: 0 !important; }
    .p-mobile-15 { padding: 15px !important; }
}

/* ============================================
   MOBILE MENU STYLES
   ============================================ */
.mr-mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 768px) {
    .mr-mobile-menu-toggle {
        display: block;
    }
    
    .mr-primary-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100%;
        background: #fff;
        z-index: 99999;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .mr-primary-menu.active {
        left: 0;
    }
    
    .mr-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 99998;
        display: none;
    }
    
    .mr-menu-overlay.active {
        display: block;
    }
}

/* ============================================
   LAZY LOADING
   ============================================ */
img.mr-lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.mr-lazy.loaded {
    opacity: 1;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .mr-no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}