/* =========================================== */
/* MOBILE FIXES - HORIZONTAL SCROLL & HEADER  */
/* =========================================== */

/* 1. KILL HORIZONTAL SCROLLING */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
        position: relative !important;
    }
    
    /* Force everything to fit */
    .container, .container-fluid, 
    .row, .col-*, [class*="col-"] {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
}

/* 2. FIX HEADER/NAVBAR ON MOBILE */
@media (max-width: 768px) {
    /* Fix navbar collapsing */
    .navbar, .navbar-header, .navbar-collapse {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 10px !important;
    }
    
    /* Fix logo/image overflow */
    .navbar-brand img {
        max-width: 150px !important;
        height: auto !important;
    }
    
    /* Fix menu items */
    .navbar-nav > li > a {
        white-space: normal !important;
        padding: 10px 15px !important;
    }
}

/* 3. FIX SPECIFIC ELEMENTS CAUSING OVERFLOW */
@media (max-width: 768px) {
    /* Fix tables */
    table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
    }
    
    /* Fix forms */
    input, select, textarea, .form-control {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Fix images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Fix any fixed-width elements */
    div[style*="width:"], 
    div[style*="min-width:"],
    div[style*="max-width:"] {
        max-width: 100% !important;
        width: 100% !important !important;
    }
}

/* 4. RTL SPECIFIC FIXES FOR PERSIAN */
html[lang="fa"], 
body[dir="rtl"] {
    /* Fix RTL horizontal scroll */
    direction: rtl !important;
}

@media (max-width: 768px) {
    html[lang="fa"], 
    body[dir="rtl"] {
        /* Extra RTL fixes */
        .pull-right { float: left !important; }
        .pull-left { float: right !important; }
        .text-right { text-align: left !important; }
        .text-left { text-align: right !important; }
    }
}


/* MOBILE HEADER FIXES */
@media (max-width: 768px) {
    /* Fix sticky header */
    .navbar-fixed-top, 
    .navbar-fixed-bottom {
        position: fixed !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* Fix header height */
    header, .page-header {
        min-height: auto !important;
        padding: 10px 0 !important;
    }
    
    /* Fix logo container */
    .logo-container, .header-logo {
        text-align: center !important;
        padding: 0 10px !important;
    }
    
    /* Fix mobile menu toggle */
    .navbar-toggle {
        margin: 10px !important;
        float: left !important;
    }
}





















@font-face {
    font-family: 'YekanBakh';
    src: url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-Thin.woff2') format('woff2'),
         url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-Thin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-Light.woff2') format('woff2'),
         url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-Regular.woff2') format('woff2'),
         url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-SemiBold.woff2') format('woff2'),
         url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-Bold.woff2') format('woff2'),
         url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-ExtraBold.woff2') format('woff2'),
         url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-ExtraBold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-Black.woff2') format('woff2'),
         url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-ExtraBlack.woff2') format('woff2'),
         url('/templates/lagom2/assets/fonts/open-sans/YekanBakh-ExtraBlack.woff') format('woff');
    font-weight: 950;
    font-style: normal;
    font-display: swap;
}

/* Apply to entire WHMCS theme */
* {
    font-family: 'YekanBakh', Tahoma, sans-serif !important;
}

/* Specific element overrides for better control */
body, div, p, span, a, li, td, th, input, textarea, select, button {
    font-family: 'YekanBakh', Tahoma, sans-serif !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'YekanBakh', Tahoma, sans-serif !important;
    font-weight: 700 !important;
}

/* Navigation */
.navbar-nav > li > a,
.navbar .nav li a,
.dropdown-menu li a {
    font-family: 'YekanBakh', Tahoma, sans-serif !important;
    font-weight: 600 !important;
}

/* Buttons */
.btn, .btn-primary, .btn-success, .btn-default {
    font-family: 'YekanBakh', Tahoma, sans-serif !important;
    font-weight: 700 !important;
}

/* Forms */
.form-control, .input-group-addon, .control-label {
    font-family: 'YekanBakh', Tahoma, sans-serif !important;
}

/* Tables */
.table th, .table td {
    font-family: 'YekanBakh', Tahoma, sans-serif !important;
}

/* Footer */
footer, .footer, .footer-menu a {
    font-family: 'YekanBakh', Tahoma, sans-serif !important;
}
