/* ==========================================================================
   responsive.css — الاستجابة العامة للهيدر والفوتر وقائمة الجوال
   نقاط التوقف: 1200 / 992 / 850 / 620 / 430 / 390 / 350
   ملاحظة: ترتيب الكتل مقصود — الكتل اللاحقة تتجاوز السابقة (نفس ترتيب المرجع)
   ========================================================================== */

@media(max-width:1200px){
  .footer-main{gap:34px}
}

/* حماية محتوى الهيرو من القص في العربية والإنجليزية. */
:is(body.page-home .hero,body.page-about .hero,body.page-products .hero,body.page-services .services-hero,body.page-industries .hero,body.page-contact .hero){
  height:auto;
  padding-block:clamp(56px,7vw,88px);
}

/* لا نستخدم إزاحة reveal داخل الشاشة الأولى لأنها كانت تقص الأزرار والإحصائيات. */
:is(body.page-home .hero,body.page-about .hero,body.page-products .hero,body.page-services .services-hero,body.page-industries .hero,body.page-contact .hero) .reveal{
  opacity:1;
  transform:none;
  transition:none;
}

:is(body.page-home .hero-content,body.page-about .hero-content,body.page-products .hero-content,body.page-services .hero-content,body.page-industries .hero-content,body.page-contact .hero-grid){min-width:0}

:is(body.page-home .hero h1,body.page-about .hero h1,body.page-products .hero h1,body.page-services .services-hero h1,body.page-industries .hero h1,body.page-contact .hero h1){overflow-wrap:anywhere}

:is(body.page-home .hero i,body.page-about .hero i,body.page-products .hero i,body.page-services .services-hero i,body.page-industries .hero i,body.page-contact .hero i){
  flex:0 0 auto;
  visibility:visible;
  opacity:1;
}

@media(max-width:560px){
  :is(body.page-home .hero,body.page-about .hero,body.page-products .hero,body.page-services .services-hero,body.page-industries .hero,body.page-contact .hero){
    min-height:0;
    padding-block:52px;
  }

  :is(body.page-home .hero h1,body.page-about .hero h1,body.page-products .hero h1,body.page-services .services-hero h1,body.page-industries .hero h1,body.page-contact .hero h1){font-size:clamp(34px,11vw,46px)}
}

@media(max-width:992px){
  .footer-main{grid-template-columns:1fr 1fr;gap:34px}
  .footer-cta{flex-direction:column;align-items:flex-start}
}

@media(max-width:980px){
  .nav-links{gap:22px}
  .nav-links a{font-size:11px}
  .brand{min-width:210px}
  .brand-copy strong{font-size:22px}
}

/* ---------- تحول الجوال الأساسي ---------- */
@media(max-width:850px){
  body{padding-bottom:90px}

  .main-header{height:76px}
  .header-inner{grid-template-columns:auto 1fr auto;gap:10px}
  .nav-links{display:none}
  .brand{min-width:0;gap:10px}
  .brand-symbol{width:46px;height:46px}
  .brand-copy strong{font-size:15px;letter-spacing:2px}
  .brand-copy small{font-size:8px}
  .quote-btn{width:44px;min-height:44px;padding:0}
  .quote-btn span{display:none}
  .lang-switch{min-height:44px;padding:0 10px;font-size:10px}
  .menu-toggle{display:grid;place-items:center}

  .whatsapp-float{display:none}

  .site-footer{display:none}

  .mobile-footer{
    display:block;
    padding:54px 18px 100px;
    background:
      radial-gradient(circle at 80% 8%,rgba(217,170,79,.12),transparent 25%),
      linear-gradient(180deg,#080909,#050606);
  }

  .mobile-footer-brand{text-align:center}

  .mobile-footer-logo{
    width:110px;
    height:140px;
    margin:0 auto 18px;
    position:relative;
    border:2px solid var(--gold);
    border-radius:36px;
    display:grid;
    place-items:center;
  }

  .mobile-footer-logo::before{
    content:"";
    position:absolute;
    inset:19px;
    border:1px solid rgba(217,170,79,.5);
    transform:rotate(45deg);
  }

  .mobile-footer-logo img{
    width:68%;
    height:68%;
    position:relative;
    z-index:1;
    object-fit:contain;
  }

  .mobile-footer-brand h2{
    color:var(--gold-light);
    font-size:30px;
    line-height:1.35;
  }

  .mobile-footer-brand .en{
    color:var(--gold);
    font-size:14px;
    letter-spacing:3px;
    direction:ltr;
  }

  .mobile-footer-brand p{
    margin-top:22px;
    color:#ded9d0;
    font-size:15px;
    line-height:1.9;
  }

  .mobile-trust{
    margin:30px 0 26px;
    padding:18px;
    border:1px solid var(--gold);
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    background:rgba(255,255,255,.012);
  }

  .mobile-trust i{color:var(--gold-light);font-size:34px}

  .mobile-trust div{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    color:#efe9de;
    font-size:13px;
    white-space:nowrap;
  }

  .mobile-trust b{color:var(--gold)}

  .mobile-footer-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
  }

  .mobile-footer-card{
    min-height:330px;
    padding:20px 16px;
    border:1px solid var(--gold);
    border-radius:20px;
    background:rgba(255,255,255,.012);
  }

  .mobile-footer-card h3{
    margin-bottom:18px;
    color:var(--gold-light);
    font-size:19px;
    text-align:center;
  }

  .mobile-footer-card h3 i{margin-left:7px}

  .mobile-footer-card a{
    min-height:50px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    color:#eee9e0;
    font-size:14px;
  }

  .mobile-footer-card a i{color:var(--gold)}

  .mobile-service{
    min-height:66px;
    display:flex;
    align-items:center;
    gap:12px;
    color:#eee9e0;
    font-size:13px;
  }

  .mobile-service i{
    width:30px;
    color:var(--gold-light);
    font-size:24px;
    text-align:center;
  }

  .mobile-contact-card{
    margin-top:18px;
    overflow:hidden;
    border:1px solid var(--gold);
    border-radius:20px;
    background:rgba(255,255,255,.012);
  }

  .mobile-contact-row{
    min-height:92px;
    padding:17px 18px;
    display:grid;
    grid-template-columns:52px 1fr;
    gap:14px;
    align-items:center;
    border-bottom:1px solid rgba(217,170,79,.22);
  }

  .mobile-contact-row:last-child{border-bottom:0}

  .mobile-contact-icon{
    width:48px;
    height:48px;
    border:1px solid var(--gold);
    border-radius:50%;
    display:grid;
    place-items:center;
    color:var(--gold-light);
    font-size:22px;
  }

  .mobile-contact-row strong{
    display:block;
    color:var(--gold-light);
    font-size:15px;
    margin-bottom:3px;
  }

  .mobile-contact-row span,
  .mobile-contact-row a{
    color:#e5dfd6;
    font-size:12px;
  }

  .mobile-footer-socials{
    margin:26px 0 20px;
    display:flex;
    justify-content:center;
    gap:22px;
  }

  .mobile-footer-socials a{
    width:48px;
    height:48px;
    border:1px solid var(--gold);
    border-radius:14px;
    display:grid;
    place-items:center;
    color:var(--gold-light);
    font-size:22px;
  }

  .mobile-copy{
    padding-top:20px;
    border-top:1px solid rgba(217,170,79,.25);
    color:#9d9890;
    text-align:center;
    font-size:13px;
  }

  .mobile-bottom-nav{
    display:grid;
    grid-template-columns:repeat(6,1fr);
    position:fixed;
    right:10px;
    left:10px;
    bottom:10px;
    z-index:1300;
    height:72px;
    padding:7px;
    border:1px solid var(--gold);
    border-radius:22px;
    background:rgba(7,8,8,.96);
    backdrop-filter:blur(18px);
    box-shadow:0 18px 40px rgba(0,0,0,.42);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button{
    border:0;
    border-radius:16px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    color:#c8c3ba;
    background:transparent;
    font-family:inherit;
    font-size:9px;
  }

  .mobile-bottom-nav i{font-size:20px}

  .mobile-bottom-nav .active{
    color:var(--gold-light);
    background:linear-gradient(145deg,rgba(217,170,79,.22),rgba(217,170,79,.05));
  }

  .mobile-bottom-nav .contact{
    color:#171208;
    background:linear-gradient(135deg,var(--gold-light),var(--gold));
  }
}

@media(max-width:620px){
  .container{width:calc(100% - 22px)}
  .brand-copy{display:none}
  .lang-switch>:nth-child(2),
  .lang-switch>:nth-child(3){display:none}
  .lang-switch::after{content:"EN";color:#ddd6c9;margin-right:4px}

  .mobile-footer{padding-inline:14px}
  .mobile-footer-grid{gap:10px}
  .mobile-footer-card{padding:18px 12px}
  .mobile-footer-card h3{font-size:17px}
  .mobile-footer-card a,
  .mobile-service{font-size:12px}
  .mobile-trust div{font-size:11px;gap:7px}
}

@media(max-width:390px){
  .lang-switch,
  .quote-btn,
  .menu-toggle{width:40px;height:40px;min-height:40px;padding:0}
  .mobile-footer-card{min-height:315px}
  .mobile-bottom-nav{right:6px;left:6px;bottom:6px;height:66px}
  .mobile-bottom-nav a,
  .mobile-bottom-nav button{font-size:8px}
}

/* ---------- تحسين الأحجام والتناسب في الشاشات الصغيرة ---------- */
@media(max-width:850px){
  .mobile-menu{
    width:min(350px,88%);
    padding:18px 16px;
    border-radius:22px 0 0 22px;
  }

  .mobile-menu-head{padding-bottom:18px}

  .mobile-menu-logo{
    width:80px;
    height:100px;
    margin-bottom:7px;
    border-radius:26px;
  }

  .mobile-menu-logo::before{inset:14px}

  .mobile-menu-brand strong{font-size:20px}

  .mobile-menu-brand small{font-size:11px}

  .close-menu{
    width:44px;
    height:44px;
    flex-basis:44px;
    border-radius:13px;
    font-size:20px;
  }

  .menu-caption{
    margin:16px 0 10px;
    font-size:12px;
  }

  .mobile-links{gap:7px}

  .mobile-links a{
    min-height:58px;
    padding:0 16px;
    border-radius:13px;
    font-size:14px;
  }

  .mobile-links a i:first-child{
    width:28px;
    font-size:21px;
  }

  .mobile-links a i:last-child{font-size:12px}

  .mobile-menu-actions{
    gap:9px;
    margin-top:20px;
  }

  .mobile-menu-actions a{
    min-height:54px;
    border-radius:13px;
    gap:9px;
    font-size:14px;
  }

  .mobile-languages{
    min-height:52px;
    margin-top:18px;
    border-radius:13px;
  }

  .mobile-languages a{font-size:14px}

  .mobile-menu-footer{
    margin-top:24px;
    padding-top:18px;
  }

  .mobile-menu-socials a{
    width:36px;
    height:36px;
    font-size:14px;
  }

  .mobile-menu-footer span{font-size:8px}

  .mobile-footer{padding:38px 12px 92px}

  .mobile-footer-logo{
    width:86px;
    height:108px;
    margin-bottom:13px;
    border-radius:28px;
  }

  .mobile-footer-logo::before{inset:14px}

  .mobile-footer-brand h2{font-size:23px}

  .mobile-footer-brand .en{
    font-size:10px;
    letter-spacing:2px;
  }

  .mobile-footer-brand p{
    margin-top:15px;
    font-size:12px;
    line-height:1.8;
  }

  .mobile-trust{
    margin:22px 0 18px;
    padding:13px 10px;
    border-radius:15px;
    gap:10px;
  }

  .mobile-trust i{font-size:25px}

  .mobile-trust div{gap:6px;font-size:10px}

  .mobile-footer-grid{gap:9px}

  .mobile-footer-card{
    min-height:266px;
    padding:15px 10px;
    border-radius:16px;
  }

  .mobile-footer-card h3{
    margin-bottom:12px;
    font-size:15px;
  }

  .mobile-footer-card a{
    min-height:39px;
    font-size:11px;
  }

  .mobile-footer-card a i{font-size:10px}

  .mobile-service{
    min-height:49px;
    gap:8px;
    font-size:10px;
  }

  .mobile-service i{
    width:23px;
    font-size:18px;
  }

  .mobile-contact-card{
    margin-top:13px;
    border-radius:16px;
  }

  .mobile-contact-row{
    min-height:72px;
    padding:12px 13px;
    grid-template-columns:40px 1fr;
    gap:10px;
  }

  .mobile-contact-icon{
    width:38px;
    height:38px;
    font-size:17px;
  }

  .mobile-contact-row strong{font-size:12px}

  .mobile-contact-row span,
  .mobile-contact-row a{font-size:10px}

  .mobile-footer-socials{
    margin:19px 0 15px;
    gap:14px;
  }

  .mobile-footer-socials a{
    width:39px;
    height:39px;
    border-radius:11px;
    font-size:17px;
  }

  .mobile-copy{
    padding-top:15px;
    font-size:10px;
  }

  .mobile-bottom-nav{
    right:7px;
    left:7px;
    bottom:7px;
    height:64px;
    padding:5px;
    border-radius:18px;
    grid-template-columns:repeat(6,1fr);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button{
    gap:3px;
    border-radius:12px;
    font-size:7px;
    line-height:1.15;
  }

  .mobile-bottom-nav i{font-size:16px}
}

@media(max-width:390px){
  .mobile-menu{
    width:min(330px,90%);
    padding:15px 13px;
  }

  .mobile-links a{
    min-height:54px;
    font-size:13px;
  }

  .mobile-menu-actions a{font-size:12px}

  .mobile-footer{padding-inline:9px}

  .mobile-footer-card{
    min-height:252px;
    padding:13px 8px;
  }

  .mobile-footer-card h3{font-size:14px}

  .mobile-footer-card a,
  .mobile-service{font-size:9px}

  .mobile-bottom-nav{
    right:4px;
    left:4px;
    bottom:4px;
    height:60px;
  }

  .mobile-bottom-nav i{font-size:15px}

  .mobile-bottom-nav a,
  .mobile-bottom-nav button{font-size:6.5px}
}

/* ---------- ضبط هيدر الجوال: توزيع احترافي متوازن ----------
   كل عنصر يأخذ حجمه من محتواه (Flexbox) بدل أعمدة Grid ثابتة،
   لتفادي أي التباس في ترتيب الأعمدة مع اتجاه RTL ولضمان عدم
   انضغاط نص "AR | EN" داخل عمود أضيق من محتواه. */
@media(max-width:850px){
  .main-header{height:74px}

  .header-inner{
    width:100%;
    max-width:none;
    padding:0 14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
  }

  .brand{
    min-width:auto;
    flex:0 0 auto;
    margin:0;
  }

  .brand-symbol{
    width:54px;
    height:54px;
  }

  .brand-copy{display:none}

  .header-actions{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:9px;
    margin:0;
  }

  .menu-toggle,
  .quote-btn{
    flex:0 0 44px;
    width:44px;
    height:44px;
    min-width:44px;
    min-height:44px;
    margin:0;
    padding:0;
    border-radius:12px;
    display:grid;
    place-items:center;
  }

  .menu-toggle{font-size:19px}

  .quote-btn i{
    margin:0;
    font-size:15px;
  }

  .quote-btn span{display:none}

  .lang-switch{
    flex:0 0 auto;
    width:auto;
    min-width:0;
    height:44px;
    min-height:44px;
    padding:0 14px;
    margin:0;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-size:11px;
    white-space:nowrap;
  }

  .lang-switch::after{content:none}

  .lang-switch>*{display:inline !important}
}

@media(max-width:430px){
  .header-inner{
    padding:0 10px;
    gap:8px;
  }

  .brand-symbol{
    width:46px;
    height:46px;
  }

  .header-actions{gap:7px}

  .menu-toggle,
  .quote-btn{
    flex:0 0 40px;
    width:40px;
    height:40px;
    min-width:40px;
    min-height:40px;
    border-radius:11px;
  }

  .lang-switch{
    height:40px;
    min-height:40px;
    padding:0 11px;
    gap:6px;
    border-radius:11px;
    font-size:10px;
  }
}

@media(max-width:350px){
  .header-inner{
    padding:0 8px;
    gap:6px;
  }

  .brand-symbol{
    width:40px;
    height:40px;
  }

  .header-actions{gap:6px}

  .menu-toggle,
  .quote-btn{
    flex:0 0 36px;
    width:36px;
    height:36px;
    min-width:36px;
    min-height:36px;
    border-radius:10px;
  }

  .lang-switch{
    height:36px;
    min-height:36px;
    padding:0 9px;
    gap:5px;
    font-size:9px;
  }
}
