﻿/* جلوگیری از اسکرول افقی و مدیریت محتوای عریض */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* مدیریت تصاویر بزرگ */
img {
    max-width: 100%;
    height: auto;
}

/* مدیریت متن‌های طولانی که نمی‌شکنند */
p, h1, h2, h3, h4, h5, h6, span, a, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* تنظیمات خاص برای موبایل */
@media (max-width: 767px) {
    /* کاهش اندازه تصاویر در موبایل */
    img {
        max-width: 100%;
        margin: 0 auto;
    }

    /* کنترل جداول و عناصر عریض */
    table, pre, code, iframe {
        max-width: 100%;
        display: block;
    }

    /* اطمینان از اینکه همه عناصر در محدوده صفحه قرار می‌گیرند */
    * {
        max-width: 100vw;
        box-sizing: border-box;
    }

    /* کنترل عناصر flex برای جلوگیری از سرریز */
    .flex-container, .row, [class*="col-"] {
        width: 100%;
        max-width: 100%;
    }
}

/* تنظیمات برای محتوای پیش‌فرض غیرقابل شکست */
pre, code {
    white-space: pre-wrap;
}


/*
Responsive  
*/
@media screen and (max-width: 768px) {
    .container {
        max-width: 95vw;
        padding-right: 2.5vw;
        padding-left: 2.5vw;
    }

    /* Header Top */
    .header-top-bar-wrap {
        flex-direction: row;
        align-items: start;
    }

    #header-top-bar-wrap__info-listre {
        /*display: none !important;*/
    }

    #header-top-bar-wrap__info-listresocial {
        display: none !important;
    }


    .header-top-bar-wrap__info-list {
        margin-left: 0 !important;
        display: flex;
        justify-content: space-between;
        width: 100%;
        flex-direction: column;
    }
        .header-top-bar-wrap__info-list .divider {
            display: none;
        }

        .header-top-bar-wrap__info-list svg {
            margin: 0 0 0 0.5rem;
        }

    /* Header Main */
    .main-menu {
        display: none
    }

    .header-main {
        padding: 5px;
    }

    .header-main-wrapper {
        flex-direction: row;
    }

    .search-container-wrapper {
        order: 1;
        display: flex;
        align-items: center;
    }

    .container-sm {
        margin: auto 0 !important;
        padding: 0 0 !important;
        ;
    }

    .navbar {
        display: none;
    }



    .desktop-search-container {
        display: none;
    }

    .mobile-search-container {
        width: 100%;
        display: flex;
    }

    .mobile-search-btn-icon {
        display: block;
    }
    /* Slider */
    .slider-sub {
        flex-direction: column;
        margin-top: 2rem;
    }

    .search-button {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background-color: transparent;
        border: none;
        color: var(--dark-color);
        margin-right: 0.5rem;
    }

    .home-container {
        display: block;
    }

        .home-container svg {
            width: 30px;
        }

    .user-container {
        display: block;
    }

        .user-container svg {
            width: 22px;
        }

    .mr-auto {
        margin-right: auto;
    }

    .slider-caption {
        width: 100%;
        margin-top: 0;
        margin-bottom: 2rem;
        text-align: center;
    }

    .header-top {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }


    .slider-primary {
        height: auto;
        padding: 2rem 0;
    }

    .img-container {
        justify-content: center;
        margin-right: 0;
    }

    .child {
        width: 100%;
        margin-left: 0;
        margin-bottom: 1rem;
    }


    /* First Banner */
    .first-banner {
        flex-direction: column;
        height: auto;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
        width: 100%;
    }

    .first-banner-text {
        margin-right: 0;
        margin-bottom: 0;
        text-align: center;
    }

    h3.banner-caption-02__title {
        font-size: 1.2rem;
        font-weight: 600;
        min-width: 200px;
        padding: 0;
        color: #013261;
    }

    .first-banner-img {
        margin: 0 auto;
        max-width: 250px;
    }

    .btn-first-banner {
        width: 250px;
        font-size: 1.5rem;
    }
    /* Main Category Expertise */
    .main-category-expertise {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .show-expertise {
        margin-top: 1rem;
    }

    .hexagon-clum {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hexagon-row {
        width: 100%;
        height: auto;
        margin-bottom: 1rem;
    }


    .hexagon p {
        padding: 1rem 0;
    }

    /* Down Banner */
    .second-banner {
        width: 100%;
        flex-direction: column;
        height: auto;
        padding: 2rem 1rem;
    }

    .second-banner-text {
        padding-right: 0;
        text-align: center;
        margin-bottom: 2rem;
    }

    .second-banner-btn {
        padding-right: 0;
        text-align: center;
    }

    .circle-second-banner {
        top: -2rem;
        right: 50%;
        transform: translateX(50%);
    }


    .btn-second-banner {
        margin-left: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        font-weight: 600;
    }

    .second-banner-btn {
        padding-top: 0;
    }

    .banners-container {
        flex-direction: column;
    }
    /* Footer */
    .footer-content {
        flex-direction: column;
        max-width: 100%;
    }

    .columnfooter {
        width: 100%;
        margin-bottom: 1rem;
    }

    .hamburger-menu-container {
        display: block;
    }

    .hamburger-menu {
        order: 1;
        display: flex;
        align-items: center;
        cursor: pointer;
    }

    .hamburger-icon {
        width: 25px;
        height: 25px;
        position: relative;
    }


    .hamburger-menu span {
        display: block;
        font-size: 1.5rem;
        margin-top: 10px;
    }

    /* side nav */
    .sidenav {
        display: block;
        position: fixed;
        width: 0;
        height: 100vh;
        overflow-y: scroll;
        right: 0;
        top: 0;
        bottom: 0;
        transition: width 0.5s ease-in;
        background-color: var(--white-color);
        z-index: 10;
        background-image: url('/assets/template/tajhizafagh/img/mobile-bg.jpg');
        background-size: cover;
        background-position: center center;
    }

        .sidenav::before {
            position: absolute;
            content: "";
            top: 0;
            right: 0;
            width: 100%;
            height: 100%;
            background-color: #000;
            opacity: 0.8;
            z-index: -1;
        }

    .sidenav-head {
        background-color: var(--white-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sidenav-logo img {
        max-width: 220px;
        padding: 1rem;
    }

    .sidenav-close {
        max-width: 26px;
        margin-left: 1rem;
    }

        .sidenav-close svg {
            width: 100%;
        }

    .sidenav-menu {
        padding: 0.5rem;
    }

        .sidenav-menu ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }

            .sidenav-menu ul li a {
                padding: 19px 0;
                font-weight: 500;
                font-size: 14px;
                line-height: 1.5;
                color: #FFFFFF;
                display: block;
                border-bottom: 1px solid rgba(255, 255, 255, 0.15);
            }

    .sidenav-actions {
        position: absolute;
        right: 0;
        left: 0;
        width: 100%;
        display: flex;
        justify-content: space-around;
        align-items: start;
        margin-top: 2rem;
    }

    .sidenav-login-btn {
        padding: 0.5rem 2.5rem;
        line-height: 44px;
        font-size: 1rem;
        background-color: #ffc221;
        border-color: #ffc221;
        color: #031f42;
        text-decoration: none;
        font-weight: 600;
        border-radius: 10px;
    }

    .sidenav-register-btn {
        padding: 0.5rem 2.5rem;
        line-height: 44px;
        font-size: 1rem;
        text-decoration: none;
        font-weight: 600;
        border-radius: 10px;
        background-color: #0071dc;
        border-color: #0071dc;
        color: #FFFFFF;
    }
    /* end of side nav */

    /*
        service page
    */
    .services-row {
        flex-direction: column;
    }

    .services-row-column {
        width: 100%;
        margin-bottom: 1rem;
    }

    .articles-row {
        grid-template-columns: 1fr;
    }




    .products-row {
        grid-template-columns: 1fr;
    }
    /*
        end of service page styles
    */
    /* logo */
    .logo-img {
        max-width: 142px;
        padding: 0.3rem 0;
    }
    /* end of logo styles*/



    /*
    fixed support icons

*/
    .whatsapp-support {
        bottom: 100px;
        left: 10px;
        width: 50px;
        height: 50px;
        border-radius: 50px;
    }

    .whatsapp-support-icon {
        width: 25px;
    }



    .phone-support {
        bottom: 30px;
        left: 10px;
        width: 50px;
        height: 50px;
        border-radius: 50px;
    }

    .phone-support-icon {
        width: 25px;
    }



    .goTopBtn {
        bottom: 30px;
        right: 10px;
        width: 50px;
        height: 50px;
        border-radius: 50px;
    }

    .goTopBtn-icon {
        width: 25px;
    }


    /*
    end of support icons

*/

    .pg-container {
        flex-direction: column;
        align-items: center;
    }


    .articles-col {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .slider-caption__main-title {
        font-size: 32px;
    }






    /* Shopping Cart Container */
    .shopping-cart-container {
        max-width: 100%;
        padding: 10px;
        background: white;
        margin: 20px auto;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .shopping-cart-row {
        display: flex;
        flex-direction: column;
    }

    /* Main Column where table and actions are located */
    .shopping-cart-main-col {
        margin: 10px;
        background: #fff;
    }

    .checkout-row {

        flex-direction: column;
    }


    /* Medium devices (tablets, 600px and up) */
    @media (min-width: 601px) and (max-width: 1024px) {
        .shopping-cart-main-col,
        .shopping-cart-summary-col {
            flex: 0 0 50%;
            max-width: 50%; /* Two columns on medium screens */
        }

        .shopping-cart-table th,
        .shopping-cart-table td {
            padding: 10px; /* Increased padding for tablet screens */
        }
    }

    /* Large devices (desktops, 1025px and up) */
    @media (min-width: 1025px) {
        .shopping-cart-table th,
        .shopping-cart-table td {
            padding: 15px; /* Increased padding for desktop screens */
        }
    }

    /* end of cart page styles */



    .site-footer-row {
        flex-direction: column;
    }

    .like-and-share-div {
        order: 1;
        justify-content: center;
        padding-bottom: 1rem;
    }

    .pg-previous {
        order: 2;
    }

    .pg-next{ order: 3;}
    /*
    Octagonal
*/
    .Octagonal-row {
        flex-direction: column;
    }
    .Octagonal-col {
        width: 100%;
    }
    /*
    /Octagonal
*/


    #service-content-wrapper img {
        max-width: 100% !important;
        height: auto !important;
    }

}



/* Responsive styles */
@media (max-width: 768px) {
    .dashboard-row {
        flex-direction: column; /* Stack items vertically */
    }

    .dashboard-sidebar {
        margin-right: 0; /* Remove margin for smaller screens */
        margin-bottom: 20px; /* Add space below sidebar */
    }

    .dashboard-main {
        flex: 1; /* Full width for main content */
    }

    .dashboard-card {
        margin-bottom: 15px; /* Reduce bottom margin for cards */
    }

    .contacts-col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        overflow: scroll;
    }

}

@media (max-width: 576px) {
    .dashboard-card-title {
        font-size: 16px; /* Smaller font size for titles */
    }

    .dashboard-card-text {
        font-size: 14px; /* Smaller font size for text */
    }
}
