﻿@media (max-width: 900px) {
    .abs-sep {
        display: none;
    }

    .ab-stats {
        gap: 20px;
        justify-content: space-around;
    }
}


/* ── MOBILE (max-width: 768px) ── */
@media (max-width: 768px) {
    /*==================Header Part=========================*/
    .header-content {
        padding: 10px 15px;
        justify-content: center;
    }
    .contact-info{
        display:none;
    }

    .mobile-menu-btn {
        display: block !important; /* إظهار زر المنيو */
        order: 1;
        cursor: pointer;
    }

    .logo-section {
        order: 2;
        margin: 0 auto; /* توسيط الشعار */
    }

    .logo-text h1 {
        font-size: 16px !important;
    }

    .logo-icon {
        padding: 5px !important;
        font-size: 16px !important;
        width:50px;
    }

    .hide-mobile {
        display: none !important; /* إخفاء العناصر المزدحمة */
    }

    .user-section {
        order: 3;
    }

    .cta-button {
        padding: 6px 12px !important;
        font-size: 11px !important;
    }

    .logo-text span{
        font-size:13px;
    }
    .phone-none {
        display: none !important;
    }
    .computer-none {
        display: block !important;
    }
    .main-footer,
    .nav-links {
        padding: 0;
    }
    .nav-links > li > a {
        padding: 13px 10px;
        font-weight: 500;
        font-size: 13px;
    }
            /* إغلاق عند لمس أي شيء خارج القائمة */
    .menu-checkbox:checked ~ .menu-overlay {
        display: block !important;
    }

    /* --- تنسيقات الفوتر للهاتف --- */
    .footer-content {
        grid-template-columns: 1fr !important; /* عمود واحد فقط */
        text-align: center;
        gap: 30px;
        padding: 40px 20px;
    }

    .footer-section h3::after {
        right: 50% !important;
        transform: translateX(50%); /* توسيط الخط تحت العناوين */
    }

    .footer-logo,
    .contact-item,
    .social-links {
        justify-content: center !important; /* توسيط المحتوى */
    }
    .footer-section ul li {
        margin-bottom: 4px;
    }    
    .footer-section p {
        font-size: 14px;
        padding: 0 10px;
    }

    .footer-bottom {
        padding: 15px 10px;
    }

    .footer-bottom p {
        font-size: 12px;
    }

    .hero-section {
        height: 450px;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .hero-buttons a {
        text-align: right;
        font-size: 14px;
    }
    .services-section {
    padding: 40px 15px; /* تقليل الحشو الجانبي للهاتف */
    background-color: #f8fafc;
    }

    .section-header {
        text-align: center;
        margin-bottom: 30px;
    }

    .hero-subtitle {
        color: #d97706; /* Amber 600 */
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 1px;
        margin-bottom: 8px;
        display: block;
    }

    .section-title {
        font-family: 'Playfair Display', serif;
        font-size: 24px; /* حجم أصغر للهاتف */
        color: #0f172a;
        margin-bottom: 10px;
    }

    .title-divider {
        width: 60px;
        height: 3px;
        background-color: #d97706;
        margin: 0 auto; /* توسيط الخط */
    }

    /* شبكة البطاقات: عمود واحد للهاتف */
    .services-grid {
        display: grid;
        grid-template-columns: 1fr; /* جعل البطاقات فوق بعضها */
        gap: 20px;
        margin-top: 30px;
    }

    .service-card {
        background: white;
        padding: 30px 20px;
        border-radius: 8px;
        text-align: center;
        box-shadow: 0 4px 6px rgba(15, 23, 42, 0.05); /* ظل خفيف */
        border: 1px solid #e2e8f0;
        transition: transform 0.3s ease;
    }
    .services-grid{
        padding:0;
    }

    .service-icon {
        color: #d97706;
        margin-bottom: 15px;
        display: flex;
        justify-content: center;
    }

    .service-icon svg {
        width: 35px; /* تصغير الأيقونة قليلاً للهاتف */
        height: 35px;
    }

    .service-name {
        font-size: 18px;
        font-weight: 700;
        color: #0f172a;
        margin-bottom: 12px;
    }

    .service-desc {
        font-size: 14px;
        color: #475569; /* Slate 600 */
        line-height: 1.6;
        padding: 0 10px;
    }
    .ab-hero {
        padding: 36px 20px 32px;
    }

    .ab-title {
        font-size: 24px;
    }

    .ab-sub {
        font-size: 13px;
    }

    .abs-n {
        font-size: 22px;
    }

    .abs-l {
        font-size: 11px;
    }

    .ab-section {
        padding: 36px 20px;
    }

    .sec-title {
        font-size: 22px;
    }

    .mission-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .mission-card {
        padding: 18px;
    }

    .ab-cta {
        padding: 40px 20px;
    }

    .cta-title {
        font-size: 22px;
    }

    .cta-sub {
        font-size: 13px;
    }

    .cta-btns {
        flex-direction: column;
        gap: 10px;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        text-align: center;
        padding: 12px 24px;
    }

    /*  ===============================Law Page ==============================*/
    .hero {
        padding: 20px 16px 18px;
    }

    .hero-title {
        font-size: 20px;
    }

    .hero-sub {
        font-size: 12px;
    }

    .search-row {
        flex-direction: column;
        gap: 8px;
    }

        .search-row input {
            width: 100%;
        }

    .btn-search {
        width: 100%;
        padding: 10px;
        text-align: center;
    }

    .stats-row {
        gap: 10px;
        justify-content: center;
    }

    .stat-n {
        font-size: 16px;
    }

    .stat-l {
        font-size: 10px;
    }

    .stat-sep {
        min-height: 24px;
    }

    /* MAIN LAYOUT — stack sidebar below content */
    .main {
        flex-direction: column;
        padding: 12px;
        gap: 12px;
    }

    /* SIDEBAR */
    .sidebar {
        width: 100%;
        min-width: unset;
        order: 2; /* sidebar goes below cards on mobile */
    }

    .sb-head {
        padding: 10px 14px;
    }

    .sb-head-t {
        font-size: 12px;
    }

    .fg-lbl {
        font-size: 9px;
    }

    .fi {
        height: 40px;
        padding: 0 12px;
    }

    .fi-lbl {
        font-size: 12px;
    }

    .fi-cnt {
        font-size: 10px;
        padding: 1px 6px;
    }

    .year-grp {
        padding: 4px 12px 10px;
    }

    .yr-select {
        font-size: 12px;
        padding: 5px 8px;
    }

    /* CONTENT */
    .content {
        width: 100%;
        order: 1; /* cards go above sidebar on mobile */
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .sec-title {
        font-size: 16px;
    }

    .sort-sel {
        width: 100%;
    }

    .pills {
        gap: 5px;
    }

    .pill {
        font-size: 11px;
        padding: 3px 10px;
    }

    .res-count {
        font-size: 11px;
    }

    /* LAW CARD */
    .lc {
        padding: 12px 14px;
    }

    .lc-top {
        gap: 10px;
    }

    .lc-ico {
        width: 32px;
        height: 32px;
    }

        .lc-ico svg {
            width: 15px;
            height: 15px;
        }

    .lc-title {
        font-size: 13px;
    }

    .lc-desc {
        font-size: 11px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .lc-meta {
        gap: 5px;
        flex-wrap: wrap;
    }

    .lc-mi {
        font-size: 10px;
    }

    .lc-sep {
        font-size: 9px;
    }

    .badge {
        font-size: 10px;
        padding: 2px 7px;
    }

    .lc-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .btn-v {
        width: 100%;
        text-align: center;
        padding: 7px 14px;
    }

    .btn-o {
        flex: 1;
        text-align: center;
        padding: 6px 10px;
    }

    /* PAGINATION */
    .pag {
        gap: 4px;
        flex-wrap: wrap;
    }

    .pg {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    .detail-main {
        flex-direction: column;
        padding: 12px;
    }

    .detail-sidebar {
        width: 100%;
        min-width: unset;
        position: static;
    }

    .law-banner-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .law-banner-ico {
        display: none;
    }

    .law-banner-title {
        font-size: 18px;
    }

    .detail-search-row {
        flex-wrap: wrap;
    }

    .search-input-wrap {
        min-width: 100%;
    }

    .group-section {
        padding: 0;
    }
/*-------------User profile---------------------------*/
    .u-banner {
        padding: 20px 16px 0;
    }

    .u-avatar {
        width: 62px;
        height: 62px;
        font-size: 20px;
    }

    .u-name {
        font-size: 18px;
    }

    .u-main {
        padding: 16px 16px 10px;
        gap: 14px;
    }

    .u-card-body {
        padding: 16px 14px;
    }

    .fields-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .sub-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sub-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: right;
        padding: 12px 14px;
    }

    .sub-card-label {
        margin-bottom: 0;
    }

    .sub-card-value {
        font-size: 14px;
    }

    .actions-row {
        padding: 0 16px 20px;
        flex-direction: column;
    }

    .edit-btn,
    .change-pass-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .pg-main {
        padding: 14px 16px;
        gap: 12px;
    }

    .pg-card-body {
        padding: 14px 12px;
    }

    .meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .extra-row {
        grid-template-columns: 1fr;
    }

    .pg-actions {
        padding: 0 16px 20px;
    }

    .btn-back {
        width: 100%;
        justify-content: center;
    }
}

/* ── SMALL MOBILE (max-width: 480px) ── */
@media (max-width: 480px) {

    .hero-title {
        font-size: 17px;
    }

    .stats-row {
        gap: 8px;
    }

    .stat-sep {
        display: none; /* hide separators on very small screens */
    }

    .stat-n {
        font-size: 15px;
    }

    .lc-title {
        font-size: 13px;
    }

    .lc-desc {
        -webkit-line-clamp: 1;
    }
    .ab-title {
        font-size: 20px;
    }

    .ab-sub {
        font-size: 12px;
    }

    .ab-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        width: 100%;
    }

    .abs-item {
        background: rgba(255,255,255,0.05);
        border-radius: 8px;
        padding: 12px;
    }

    .abs-n {
        font-size: 20px;
    }

    .mc-ico {
        width: 36px;
        height: 36px;
    }

    .mc-ico svg {
        width: 17px;
        height: 17px;
    }

    .mc-title {
        font-size: 14px;
    }

    .mc-text {
        font-size: 12px;
    }

    .sec-title {
        font-size: 20px;
    }

    .cta-title {
        font-size: 19px;
    }
    .u-banner-inner {
        flex-wrap: wrap;
    }

    .u-status {
        padding-top: 0;
        padding-bottom: 14px;
    }

    .u-role-badge {
        font-size: 11px;
    }

    .role-info {
        flex-direction: column;
    }

    .role-icon {
        width: 36px;
        height: 36px;
    }
    .meta-grid {
        grid-template-columns: 1fr;
    }

    .btn-exp {
        flex: 1;
        justify-content: center;
    }
}
