/* ============================================================
   alkandraSacand — تحسينات الموبايل والتابلت
   ============================================================ */

/* --- عام --- */
@media only screen and (max-width: 991px) {
    body {
        overflow-x: hidden;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
        max-width: 100%;
    }

    .layout-content {
        padding-top: 0;
    }

    .pt-100,
    .ptb-100 {
        padding-top: 48px !important;
    }

    .pb-100,
    .ptb-100 {
        padding-bottom: 48px !important;
    }

    .pb-70 {
        padding-bottom: 36px !important;
    }

    .section-title h2 {
        font-size: 1.5rem;
        line-height: 1.4;
    }

    .section-title p {
        font-size: 0.95rem;
    }
}

/* --- السلايدر / المعرض --- */
@media only screen and (max-width: 991px) {
    .slider_area,
    .slider_area .ui-galleria,
    .slider_area .ui-galleria-content,
    .slider_area img {
        height: 260px !important;
        max-height: 260px !important;
    }

    .slider_area {
        margin-bottom: 0 !important;
    }
}

@media only screen and (max-width: 575px) {
    .slider_area,
    .slider_area .ui-galleria,
    .slider_area .ui-galleria-content,
    .slider_area img {
        height: 220px !important;
        max-height: 220px !important;
    }
}

/* --- بطاقات المشاريع --- */
@media only screen and (max-width: 991px) {
    .project-card-media {
        min-height: 280px;
    }

    .project-card-image,
    .project-card-placeholder {
        height: 280px;
    }

    .single-causes {
        margin-bottom: 24px;
    }

    .single-causes .causes-content {
        position: relative;
        bottom: auto;
        width: 100%;
        border-radius: 0 0 8px 8px;
        padding: 16px;
    }

    .single-causes .icon {
        top: 12px;
        bottom: auto;
        right: 12px;
        transform: none;
        width: 48px;
        height: 48px;
        line-height: 48px;
    }

    .single-causes .icon i {
        font-size: 22px;
        line-height: 48px;
    }

    .single-causes .causes-content h3 {
        font-size: 1.1rem;
        margin-top: 0;
        padding-left: 56px;
    }

    .single-causes .causes-content p {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .single-causes .causes-content .causes-btn-one {
        width: 100%;
        text-align: center;
        display: block;
        box-sizing: border-box;
        margin-top: 12px;
    }

    .single-causes::before,
    .single-causes:hover::before {
        display: none;
    }

    .single-causes:hover .causes-content span,
    .single-causes:hover .causes-content h3,
    .single-causes:hover .causes-content p {
        color: #ffffff;
    }

    /* شبكة PrimeFaces — عمود واحد */
    .ui-dataview.ui-dataview-grid .ui-g {
        display: block !important;
    }

    .ui-dataview.ui-dataview-grid .ui-g > div {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .causes-section .causes-section {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .causes-section .causes-section .container {
        padding: 0;
    }

    .project-card-wrap {
        width: 100%;
    }
}

@media only screen and (max-width: 575px) {
    .project-card-media {
        min-height: 220px;
    }

    .project-card-image,
    .project-card-placeholder {
        height: 220px;
    }

    .project-card-placeholder i {
        font-size: 2.5rem;
    }

    .project-card-placeholder-title {
        font-size: 1rem;
    }
}

/* --- أزرار التبرع (selectOneButton) --- */
@media only screen and (max-width: 767px) {
    body .ui-selectonebutton,
    body .ui-selectmanybutton {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
    }

    body .ui-selectonebutton > .ui-button,
    body .ui-selectmanybutton > .ui-button {
        flex: 1 1 calc(50% - 8px) !important;
        min-width: calc(50% - 8px) !important;
        margin: 0 !important;
        font-size: 0.875rem !important;
        padding: 0.65rem 0.5rem !important;
    }

    .ui-buttonset .ui-button {
        margin: 0 !important;
    }
}

@media only screen and (max-width: 400px) {
    body .ui-selectonebutton > .ui-button,
    body .ui-selectmanybutton > .ui-button {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }
}

/* --- نافذة التبرع --- */
@media only screen and (max-width: 767px) {
    body .ui-dialog {
        width: 94vw !important;
        max-width: 94vw !important;
        left: 3vw !important;
        right: 3vw !important;
    }

    body .ui-dialog .ui-dialog-content {
        padding: 12px !important;
    }

    body .ui-dialog .ui-dialog-titlebar {
        padding: 12px 16px !important;
        font-size: 1rem !important;
    }
}

/* --- زر «تبرع الآن» العائم --- */
@media only screen and (max-width: 767px) {
    #mybutton {
        bottom: 16px;
        right: 12px;
        left: 12px;
    }

    #mybutton .ui-button,
    #mybutton button {
        width: 100% !important;
        justify-content: center;
        font-size: 1rem !important;
        padding: 12px 16px !important;
        border-radius: 8px !important;
    }
}

/* --- نماذج المسابقات والإدارة --- */
@media only screen and (max-width: 767px) {
    .contact-section .contact-content h3 {
        font-size: 1.35rem;
    }

    .ui-panelgrid .ui-panelgrid-cell,
    .ui-panelgrid .ui-grid-col-2,
    .ui-panelgrid .ui-grid-col-4 {
        display: block !important;
        width: 100% !important;
        padding: 6px 0 !important;
    }

    .ui-panelgrid .ui-outputlabel {
        display: block;
        margin-bottom: 4px;
        font-weight: 600;
    }

    .ui-panelgrid .my-heading-row td,
    .ui-panelgrid .my-heading-row .ui-panelgrid-cell {
        font-size: 1rem;
        padding-top: 16px !important;
    }

    .ui-datatable table {
        font-size: 0.85rem;
    }

    .ui-tabview .ui-tabview-nav li .ui-tabview-nav-link {
        padding: 10px 12px !important;
        font-size: 0.85rem !important;
    }
}

/* --- الصفحة الرئيسية: التبرع + من نحن --- */
@media only screen and (max-width: 991px) {
    .country-section .country-area-content {
        text-align: center;
        margin-bottom: 24px;
    }

    .country-section .country-area-content h3 {
        font-size: 1.35rem;
    }

    .about-section .about-item {
        margin-bottom: 24px;
        text-align: center;
    }

    .about-section .about-item h3 {
        font-size: 1.25rem;
    }

    .about-section .about-image {
        margin-top: 16px;
    }

    .blog-section .single-blog {
        margin-bottom: 24px;
    }
}

/* --- الفooter --- */
@media only screen and (max-width: 767px) {
    .footer-area .footer-widget {
        margin-bottom: 24px;
        text-align: center;
    }
}

/* --- scroll top لا يتداخل مع زر التبرع --- */
@media only screen and (max-width: 767px) {
    body .ui-scrolltop {
        bottom: 72px !important;
        right: 12px !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
}

/* --- القوائم المنسدلة (المشاريع / مسابقة القرآن) --- */
body .ui-submenu-list,
body .ui-menu.ui-menu-dynamic,
body .ui-menu.ui-menu-child {
    background: #ffffff !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    min-width: 200px;
    z-index: 1100 !important;
}

body .ui-submenu-list .ui-menuitem,
body .ui-menu.ui-menu-dynamic .ui-menuitem,
body .ui-menu.ui-menu-child .ui-menuitem {
    height: auto !important;
}

body .ui-submenu-list .ui-menuitem-link,
body .ui-menu.ui-menu-dynamic .ui-menuitem-link,
body .ui-menu.ui-menu-child .ui-menuitem-link {
    padding: 12px 16px !important;
}

body .ui-submenu-list .ui-menuitem-link .ui-menuitem-text,
body .ui-menu.ui-menu-dynamic .ui-menuitem-link .ui-menuitem-text,
body .ui-menu.ui-menu-child .ui-menuitem-link .ui-menuitem-text {
    color: #333333 !important;
}

body .ui-submenu-list .ui-menuitem-link .ui-menuitem-icon,
body .ui-menu.ui-menu-dynamic .ui-menuitem-link .ui-menuitem-icon,
body .ui-menu.ui-menu-child .ui-menuitem-link .ui-menuitem-icon {
    color: #088ec0 !important;
}

body .ui-submenu-list .ui-menuitem-link:hover,
body .ui-menu.ui-menu-dynamic .ui-menuitem-link:hover,
body .ui-menu.ui-menu-child .ui-menuitem-link:hover {
    background: #088ec0 !important;
}

body .ui-submenu-list .ui-menuitem-link:hover .ui-menuitem-text,
body .ui-menu.ui-menu-dynamic .ui-menuitem-link:hover .ui-menuitem-text,
body .ui-menu.ui-menu-child .ui-menuitem-link:hover .ui-menuitem-text,
body .ui-submenu-list .ui-menuitem-link:hover .ui-menuitem-icon,
body .ui-menu.ui-menu-dynamic .ui-menuitem-link:hover .ui-menuitem-icon,
body .ui-menu.ui-menu-child .ui-menuitem-link:hover .ui-menuitem-icon {
    color: #ffffff !important;
}
