/* ===================================================
   Hosty Design V2
   responsive.css - Part 1
   Desktop / Laptop / Tablet
=================================================== */

/* Large Screens */
@media (max-width: 1200px){

    .container{
        max-width:1140px;
    }

    .hero-content h1{
        font-size:3.5rem;
    }

    .footer-grid{
        grid-template-columns:1.5fr 1fr 1fr;
    }

}

/* Laptop */
@media (max-width: 992px){

    .container{
        max-width:960px;
    }

    .section-header{
        flex-direction:column;
        align-items:flex-start;
    }

    .hero{
        min-height:75vh;
    }

    .hero-content{
        max-width:100%;
    }

    .hero-content h1{
        font-size:3rem;
    }

    .projects-grid,
    .products-grid,
    .featured-grid,
    .gallery-grid,
    .stats-grid,
    .why-grid,
    .testimonials-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .footer-grid{
        grid-template-columns:1fr 1fr;
    }

}

/* Tablet */
@media (max-width:768px){

    .top-bar{
        display:none;
    }

    .header .container{
        min-height:75px;
    }

    .navbar{
        display:none;
    }

    .menu-btn{
        display:block;
    }

    .hero{
        min-height:70vh;
        text-align:center;
    }

    .hero-content{
        margin:auto;
    }

    .hero-buttons{
        justify-content:center;
    }

    .projects-grid,
    .products-grid,
    .featured-grid,
    .gallery-grid,
    .stats-grid,
    .why-grid,
    .testimonials-grid,
    .footer-grid{
        grid-template-columns:1fr;
    }

}

/* ===================================================
   Hosty Design V2
   responsive.css - Part 2
   Mobile / Small Devices / Navigation
=================================================== */

/* Mobile */
@media (max-width:576px){

    body{
        font-size:15px;
    }

    .container{
        padding-inline:20px;
    }

    .hero{
        min-height:60vh;
        padding:30px 0;
    }

    .hero-content h1{
        font-size:2.1rem;
        line-height:1.3;
    }

    .hero-content p{
        font-size:0.95rem;
    }

    .hero-buttons{
        flex-direction:column;
        gap:12px;
    }

    .btn-primary,
    .btn-secondary{
        width:100%;
    }

    .section-header h2{
        font-size:2rem;
    }

    .project-card img,
    .feature-card img,
    .gallery-item img{
        height:200px;
    }

    .stat-box{
        padding:25px 15px;
    }

    .footer{
        text-align:center;
    }

    .footer-grid{
        gap:30px;
    }

}

/* Small Devices */
@media (max-width:400px){

    .hero-content h1{
        font-size:1.8rem;
    }

    .hero-content span{
        font-size:.9rem;
    }

    .section-header h2{
        font-size:1.7rem;
    }

    .logo img{
        height:48px;
    }

    .menu-btn{
        font-size:24px;
    }

}

/* Mobile Navigation */
.navbar.active{
    display:block;
    position:absolute;
    top:100%;
    right:0;
    width:100%;
    background:#fff;
    box-shadow:var(--shadow-md);
    padding:20px;
}

.navbar.active ul{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.navbar.active a{
    display:block;
    padding:12px;
    border-radius:10px;
}

.navbar.active a:hover{
    background:var(--section-alt);
}

/* Responsive Media */
iframe,
video{
    max-width:100%;
    height:auto;
}

.woocommerce table,
.woocommerce-account table{
    display:block;
    overflow-x:auto;
    width:100%;
}
/* ==================================================
   MOBILE - PRODUCTS CATEGORY LAYOUT
   القائمة يمين + المنتجات يسار
================================================== */

@media (max-width: 767px) {

    .shop-categories-products {
        width: 100%;
        overflow: hidden;
    }

    .shop-categories-products .container {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }

    /* عنوان القسم */
    .shop-categories-products .section-header {
        margin-bottom: 20px;
        text-align: center;
    }

    .shop-categories-products .section-header h2 {
        font-size: 26px;
        line-height: 1.5;
    }

    .shop-categories-products .section-header p {
        font-size: 13px;
        line-height: 1.8;
    }

    /* ==========================================
       القائمة + المنتجات
    ========================================== */

    .shop-categories-products .shop-layout {
        display: flex;
        flex-direction: row-reverse;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }

    /* ==========================================
       القائمة - يمين
    ========================================== */

    .shop-categories-products .categories-sidebar {
        width: 30%;
        min-width: 30%;
        display: flex;
        flex-direction: column;
        gap: 8px;
        box-sizing: border-box;
    }

    .shop-categories-products .categories-sidebar .category-tab {
        width: 120%;
        min-height: 48px;
        margin: 0;
        padding: 8px 5px;

        font-size: 14px;
        line-height: 1.4;
        text-align: center;

        border-radius: 14px;
        box-sizing: border-box;
    }

    /* ==========================================
       منطقة المنتجات - يسار
    ========================================== */

    .shop-categories-products .products-area {
        width: 70%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* منتجان في كل صف */
    .shop-categories-products .category-products,
    .shop-categories-products .products-grid {
        width: 100%;

        display: grid;

        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 10px;

        box-sizing: border-box;
    }

    /* ==========================================
       بطاقة المنتج
    ========================================== */

    .shop-categories-products .product-card,
    .shop-categories-products .hosty-product-card {
        width: 100%;
        min-width: 0;
        margin: 0;

        box-sizing: border-box;

        overflow: hidden;
    }

    /* ==========================================
       صورة المنتج
    ========================================== */

    .shop-categories-products .product-card img,
    .shop-categories-products .hosty-product-card img {
        width: 100%;
        height: auto;

        display: block;

        object-fit: cover;
    }

    /* ==========================================
       نص المنتج
    ========================================== */

    .shop-categories-products .product-card h3,
    .shop-categories-products .hosty-product-card h3 {
        font-size: 14px;
        line-height: 1.5;

        margin: 8px 5px;

        text-align: center;
    }

    .shop-categories-products .product-card .price,
    .shop-categories-products .hosty-product-card .hosty-product-price {
        font-size: 13px;
        text-align: center;
    }

}
@media (max-width: 767px) {

    /* إظهار أول 4 منتجات فقط على الموبايل */
    .shop-categories-products .category-products > *:nth-child(n + 5),
    .shop-categories-products .products-grid > *:nth-child(n + 5) {
        display: none !important;
    }

}


/* ==================================================
   HOME PAGE - PRODUCTS
   منتجان بجانب بعضهما على الموبايل
================================================== */

@media (max-width: 767px) {

    /* شبكة المنتجات في الصفحة الرئيسية */
    .products .products-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
    }

    /* بطاقة المنتج */
    .products .product-card {
        width: 100%;
        min-width: 0;
        margin: 0;
        box-sizing: border-box;
    }

    /* صورة المنتج */
    .products .product-card .product-image img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }

    /* اسم المنتج */
    .products .product-card .product-content h3 {
        font-size: 15px;
        line-height: 1.5;
        margin: 0px 5px;
        text-align: center;
    }

    /* السعر */
    .products .product-card .product-price {
        font-size: 14px;
        text-align: center;
    }

    /* زر عرض المنتج */
    .products .product-card .btn-primary {
        font-size: 13px;
        padding: 9px 10px;
    }

}


/* ==================================================
   HOME PAGE - LATEST WORKS
   عملان بجانب بعضهما على الموبايل
================================================== */

@media (max-width: 767px) {

    .projects-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .projects-grid .project-card {
        width: 100%;
        min-width: 0;
        margin: 0;
        box-sizing: border-box;
    }

    .projects-grid .project-card img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }

    .projects-grid .project-content {
        padding: 10px;
        box-sizing: border-box;
    }

    .projects-grid .project-content h3 {
        font-size: 15px;
        line-height: 1.5;
        margin: 0 0 8px;
    }

    .projects-grid .project-content p {
        font-size: 12px;
        line-height: 1.7;
    }

    .projects-grid .project-content a {
        font-size: 12px;
    }

}

/* ==================================================
   MOBILE - STATISTICS
   إحصائيتان بجانب بعضهما
================================================== */

@media (max-width: 767px) {

    .statistics {
        padding: 35px 0;
    }

    .statistics .container {
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

    .statistics .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .statistics .stat-box {
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 20px 8px;
        box-sizing: border-box;
    }

    .statistics .stat-box h3 {
        font-size: 30px;
        line-height: 1.2;
        margin: 0 0 8px;
    }

    .statistics .stat-box p {
        font-size: 13px;
        line-height: 1.5;
        margin: 0;
    }

}

/* ==================================================
   MOBILE - FEATURES
   كل عنصرين بجانب بعضهما
================================================== */

@media (max-width: 767px) {

    .features-bar {
        padding: 30px 12px;
    }

    .features-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .feature-item {
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 18px 10px;
        box-sizing: border-box;
        text-align: center;
    }

    .feature-item i {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .feature-item h3 {
        font-size: 15px;
        line-height: 1.5;
        margin: 0 0 6px;
    }

    .feature-item p {
        font-size: 12px;
        line-height: 1.6;
        margin: 0;
    }

}

/* ==========================================
   FINAL MOBILE DROPDOWN MENU
========================================== */

@media (max-width: 768px) {

    /* Header */
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .header .container {
        position: relative;
    }

    /* Menu Button */
    .menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;

        width: 44px;
        height: 44px;

        padding: 0;
        border: 0;
        background: transparent;
        font: inherit;
        font-size: 27px;
        cursor: pointer;

        color: #222;
        z-index: 1100;

        border-radius: 10px;
        transition: all .3s ease;
    }

    .menu-btn:hover {
        background: #f2f5f8;
    }

    /* Closed Menu */
    .navbar {
        display: block !important;

        position: absolute;

        top: 100%;
        right: 0;
        left: 0;

        width: 100%;

        background: #ffffff;

        box-shadow:
            0 10px 30px rgba(0,0,0,.12);

        border-top: 1px solid #eeeeee;

        padding: 8px 0;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-12px);

        transition:
            opacity .3s ease,
            transform .3s ease,
            visibility .3s ease;

        z-index: 1050;
    }

    /* Open Menu */
    .navbar.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translateY(0);

        display: block !important;
    }

    /* Menu List */
    .navbar ul {
        display: flex !important;

        flex-direction: column !important;

        align-items: stretch !important;

        width: 100%;

        gap: 0 !important;

        margin: 0;
        padding: 0;
    }

    /* Menu Items */
    .navbar li {
        width: 100%;

        border-bottom: 1px solid #eeeeee;
    }

    .navbar li:last-child {
        border-bottom: none;
    }

    /* Menu Links */
    .navbar a {
        display: block !important;

        width: 100%;

        padding: 15px 25px;

        font-size: 17px;
        font-weight: 600;

        color: #222222 !important;

        text-align: right;

        transition:
            background .25s ease,
            color .25s ease,
            padding-right .25s ease;
    }

    .navbar a:hover,
    .navbar a.active {
        background: #f5f8fb;

        color: var(--primary-color) !important;

        padding-right: 32px;
    }

}

/* =====================================================
   HOSTY HEADER SEARCH - RESPONSIVE
===================================================== */

@media (max-width: 768px){

    .header .container{
        position:relative;
    }

    .hosty-header-search{
        margin-right:auto;
        margin-left:12px;
    }

    .hosty-search-toggle{
        width:40px;
        height:40px;
        font-size:16px;
    }

    .hosty-search-form{
        position:fixed;
        top:75px;
        right:10px;
        left:10px;
        width:auto;
        box-sizing:border-box;
        z-index:100002;
    }

}

@media (max-width:400px){

    .hosty-header-search{
        margin-left:8px;
    }

    .hosty-search-toggle{
        width:38px;
        height:38px;
    }

    .hosty-search-form{
        top:68px;
    }

}
