/* ============ قائمة الموبايل ============ */
/* مخفية افتراضيًا على كل الشاشات، وتظهر فقط تحت 1024px */
#cordoba-mobile-nav,
#cordoba-mobile-drawer {
  display: none;
}

@media (min-width: 1024px) {
  #cordoba-mobile-nav,
  #cordoba-mobile-drawer {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  #cordoba-mobile-nav {
    display: flex;
    direction: rtl;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
    width: 100%;
    padding: 11px 8px;
    box-sizing: border-box;
    background: var(--cordoba-ivory);
    border-top: 1px solid var(--cordoba-border);
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    position: relative;
    z-index: 30;
  }
  #cordoba-mobile-nav a,
  #cordoba-mobile-nav button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 9px 8px;
    border: 0;
    border-radius: 30px;
    background: transparent;
    color: var(--cordoba-brown);
    text-decoration: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
  }
  #cordoba-mobile-nav .cordoba-sections-button {
    background: var(--cordoba-burgundy);
    color: #fff;
  }
  #cordoba-mobile-nav .cordoba-home-button {
    background: #EDE4D4;
  }

  #cordoba-mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    direction: rtl;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
  }
  #cordoba-mobile-drawer.cordoba-open {
    display: block;
  }
  #cordoba-mobile-drawer .cordoba-overlay {
    position: absolute;
    inset: 0;
    background: rgba(40, 25, 20, .5);
  }
  #cordoba-mobile-drawer .cordoba-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(88%, 420px);
    height: 100%;
    background: var(--cordoba-ivory);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px rgba(0,0,0,.15);
  }
  .cordoba-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 18px;
    border-bottom: 1px solid var(--cordoba-border);
  }
  .cordoba-drawer-header h2 {
    margin: 0;
    color: var(--cordoba-brown);
    font-size: 21px;
    font-weight: 800;
  }
  .cordoba-close-button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #EDE4D4;
    color: var(--cordoba-burgundy);
    font-size: 26px;
    cursor: pointer;
  }
  /* 4 روابط = عمودين × صفين (بدل 3 أعمدة اللي كان بيسيب الرابع لوحده) */
  .cordoba-quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 15px;
    border-bottom: 1px solid var(--cordoba-border);
  }
  .cordoba-quick-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    padding: 8px 4px;
    border-radius: 30px;
    background: #EDE4D4;
    color: var(--cordoba-brown);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
  }
  .cordoba-quick-links a.highlight {
    background: var(--cordoba-burgundy);
    color: #FFFFFF;
  }
  .cordoba-menu-content {
    overflow-y: auto;
    padding: 12px 16px 35px;
  }
  .cordoba-menu-heading {
    color: var(--cordoba-gold);
    font-size: 13px;
    font-weight: 800;
    margin: 8px 5px;
  }
  body.cordoba-menu-active {
    overflow: hidden !important;
  }

  #cordoba-mobile-drawer .cordoba-tabs { display:flex; gap:8px; overflow-x:auto; padding:0 0 14px; scrollbar-width:thin; }
  #cordoba-mobile-drawer .cordoba-tab { flex:0 0 auto; border:1px solid var(--cordoba-border); border-radius:999px; background:#fff; color:var(--cordoba-brown); padding:9px 18px; font:700 14px 'IBM Plex Sans Arabic',sans-serif; cursor:pointer; }
  #cordoba-mobile-drawer .cordoba-tab[aria-selected="true"] { background:var(--cordoba-burgundy); border-color:var(--cordoba-burgundy); color:#fff; }
  #cordoba-mobile-drawer .cordoba-cards-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  #cordoba-mobile-drawer .cordoba-card { display:flex; flex-direction:column; gap:8px; min-width:0; padding:8px; border:1px solid var(--cordoba-border); border-radius:15px; background:#fff; color:var(--cordoba-brown); text-decoration:none; }
  #cordoba-mobile-drawer .cordoba-card img { display:block; width:100%; aspect-ratio:1/1; object-fit:contain; background:#f7f3ec; border-radius:10px; }
  #cordoba-mobile-drawer .cordoba-card .cordoba-img-fallback { aspect-ratio:1/1; }
  #cordoba-mobile-drawer .cordoba-card span { display:block; text-align:center; font-size:12px; line-height:1.55; font-weight:700; }
}
