/* SimplyIrfan Magazine v2.10.20 — reference-matched full-screen mobile drawer. */
.mobile-menu-backdrop[hidden],
.mobile-menu--slide[hidden] { display: none !important; }

@media (max-width: 900px) {
  .site-header .mobile-menu-backdrop:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: block;
    background: rgba(9, 13, 24, .42);
    opacity: 0;
    transition: opacity .26s ease;
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
  }
  .site-header .mobile-menu-backdrop.is-visible { opacity: 1; }

  .site-header .mobile-menu--slide:not([hidden]) {
    position: fixed !important;
    z-index: 1001 !important;
    inset: 0 auto 0 0 !important;
    display: flex !important;
    flex-direction: column !important;
    width: min(100vw, 430px) !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-right: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    box-shadow: 12px 0 38px rgba(9, 13, 24, .12) !important;
    transform: translate3d(-102%, 0, 0);
    visibility: hidden;
    transition: transform .28s cubic-bezier(.2,.75,.25,1), visibility 0s linear .28s;
    overscroll-behavior: contain;
  }
  .site-header .mobile-menu--slide.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    transition: transform .28s cubic-bezier(.2,.75,.25,1), visibility 0s;
  }

  /* Top row: close icon and site identity, with no divider below it. */
  .si-mobile-drawer-header {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0,1fr);
    align-items: center;
    gap: 14px;
    flex: 0 0 88px;
    min-height: 88px;
    padding: max(8px, env(safe-area-inset-top)) 24px 12px;
    border: 0;
    background: var(--surface);
  }
  .si-mobile-drawer-close {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    font-size: 34px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
  }
  .si-mobile-drawer-close:hover { background: transparent; }
  .si-mobile-drawer-brand { display: flex; align-items: center; min-width: 0; }
  .si-mobile-drawer-brand .custom-logo-link { display: inline-flex; align-items: center; max-width: 100%; }
  .si-mobile-drawer-brand .custom-logo { display: block; width: auto; max-width: min(190px, 60vw); max-height: 54px; object-fit: contain; }
  .si-mobile-drawer-site-name {
    display: inline-block;
    max-width: 100%;
    color: var(--text);
    font-size: clamp(38px, 10.5vw, 43px);
    font-weight: 900;
    letter-spacing: -.065em;
    line-height: 1.05;
    overflow-wrap: anywhere;
    text-decoration: none !important;
  }

  /* Spacious primary navigation, matching the supplied Flux-style reference. */
  .si-mobile-drawer-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 22px 34px 24px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }
  .si-mobile-drawer-nav .mobile-nav-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }
  .si-mobile-drawer-nav .mobile-nav-list > li {
    display: grid;
    grid-template-columns: minmax(0,1fr) 42px;
    align-items: center;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .si-mobile-drawer-nav .mobile-nav-list > li > a {
    display: flex !important;
    align-items: center;
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
    min-height: 50px;
    padding: 9px 4px !important;
    text-decoration: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--text) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere;
  }
  .si-mobile-drawer-nav .mobile-nav-list > li.menu-item-has-children > a { grid-column: 1; }
  .si-mobile-drawer-nav .mobile-nav-list > li.current-menu-item > a,
  .si-mobile-drawer-nav .mobile-nav-list > li.current-menu-ancestor > a { color: var(--text) !important; }
  .si-mobile-drawer-nav .mobile-nav-list > li.menu-item-new > a::after {
    content: "NEW";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 2px 5px;
    border-radius: 0;
    background: #e52d55;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: .015em;
  }
  .si-mobile-drawer-nav .mobile-submenu-toggle {
    display: inline-grid !important;
    place-items: center;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 42px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--muted) !important;
    font-size: 21px !important;
    line-height: 1 !important;
  }
  .si-mobile-drawer-nav .mobile-submenu-toggle span { display: block; transition: transform .18s ease; }
  .si-mobile-drawer-nav .mobile-submenu-toggle.is-expanded span { transform: rotate(180deg); }
  .si-mobile-drawer-nav .mobile-nav-list > li > .sub-menu {
    display: grid !important;
    grid-column: 1 / -1;
    gap: 2px;
    width: 100%;
    margin: 0 0 8px 0 !important;
    padding: 4px 0 7px 14px !important;
    border-left: 2px solid var(--accent-soft);
    list-style: none;
  }
  .si-mobile-drawer-nav .mobile-nav-list > li > .sub-menu[hidden] { display: none !important; }
  .si-mobile-drawer-nav .mobile-nav-list .sub-menu li.menu-item-has-children { display: flex; align-items: center; flex-wrap: wrap; }
  .si-mobile-drawer-nav .mobile-nav-list .sub-menu li.menu-item-has-children > a { flex: 1 1 0; min-width: 0; }
  .si-mobile-drawer-nav .mobile-nav-list .sub-menu a {
    display: flex;
    align-items: center;
    min-height: 43px;
    padding: 8px 10px !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--muted) !important;
    font-size: 15px !important;
    font-weight: 550 !important;
  }

  /* Bottom dock: CTA first, then social circles and the legal/theme row. */
  .si-mobile-drawer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    flex: 0 0 auto;
    margin: 0 0 20px;
    padding: 10px 18px;
    border: 1px solid #07885f;
    border-radius: 4px;
    background: #07885f;
    color: #fff !important;
    font-size: 18px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    box-shadow: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
  }
  .si-mobile-drawer-cta:hover {
    background: #067451;
    border-color: #067451;
    color: #fff !important;
    transform: translateY(-1px);
  }
  .si-mobile-drawer-cta:focus-visible {
    outline: 3px solid var(--accent) !important;
    outline-offset: 3px !important;
  }

  /* Bottom dock: CTA, social circles, then a thin rule and theme/legal controls. */
  .si-mobile-drawer-bottom {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    padding: 0 26px 0 22px;
    border: 0;
    background: var(--surface);
  }
  .si-mobile-drawer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    margin: 0 0 19px;
  }
  .si-mobile-drawer-social a {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    background: var(--text);
    color: var(--surface) !important;
    text-decoration: none !important;
  }
  .si-mobile-drawer-social svg { display: block; width: 17px; height: 17px; fill: currentColor; }
  .si-mobile-drawer-social--youtube { background: #f00000 !important; color: #fff !important; }
  .si-mobile-drawer-social--x { background: #050505 !important; color: #fff !important; }
  .si-mobile-drawer-social--facebook { background: #0866e8 !important; color: #fff !important; }
  .si-mobile-drawer-social--instagram { background: linear-gradient(135deg,#6750d8,#e52d76 58%,#ff9a35) !important; color: #fff !important; }
  .si-mobile-drawer-social--instagram svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
  .si-mobile-drawer-social--instagram .si-instagram-dot { fill: currentColor; stroke: none; }
  .si-mobile-drawer-legal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 53px;
    padding-top: 0;
    border-top: 1px solid var(--line);
  }
  .si-mobile-drawer-theme {
    display: inline-grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }
  .si-mobile-drawer-theme svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  .si-mobile-drawer-theme .sun { display: none; }
  html[data-theme="dark"] .si-mobile-drawer-theme .moon { display: none; }
  html[data-theme="dark"] .si-mobile-drawer-theme .sun { display: block; }
  .si-mobile-drawer-legal { display: flex; align-items: center; justify-content: flex-end; gap: 18px; min-width: 0; }
  .si-mobile-drawer-legal a { color: var(--muted); font-size: 12px; line-height: 1.4; white-space: nowrap; text-decoration: none !important; }

  .si-mobile-drawer-nav a:focus-visible,
  .si-mobile-drawer-close:focus-visible,
  .si-mobile-drawer-cta:focus-visible,
  .si-mobile-drawer-social a:focus-visible,
  .si-mobile-drawer-legal a:focus-visible,
  .si-mobile-drawer-theme:focus-visible {
    outline: 3px solid var(--accent) !important;
    outline-offset: 3px !important;
  }
  body.si-mobile-drawer-open { overflow: hidden !important; }
}

@media (min-width: 901px) {
  .mobile-menu-backdrop,
  .mobile-menu--slide { display: none !important; }
}

@media (max-height: 680px) and (max-width: 780px) {
  .si-mobile-drawer-cta { min-height: 44px; margin-bottom: 12px; font-size: 16px; }
  .si-mobile-drawer-social { margin-bottom: 12px; }
  .si-mobile-drawer-legal-row { min-height: 48px; }
}

@media (max-width: 360px) {
  .si-mobile-drawer-header { grid-template-columns: 44px minmax(0,1fr); gap: 12px; padding-inline: 20px; }
  .si-mobile-drawer-scroll { padding-inline: 30px; }
  .si-mobile-drawer-nav .mobile-nav-list > li > a { font-size: 19px !important; }
  .si-mobile-drawer-legal { gap: 10px; }
  .si-mobile-drawer-legal a { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .mobile-menu--slide,
  .site-header .mobile-menu-backdrop,
  .si-mobile-drawer-nav .mobile-submenu-toggle span { transition: none !important; }
}

/* v2.10.60: deterministic mobile drawer social brand mark rendering */
.si-mobile-drawer-social a { box-sizing:border-box; padding:0 !important; line-height:0 !important; overflow:hidden; }
.si-mobile-drawer-social a > svg.si-brand-icon { display:block !important; width:18px !important; height:18px !important; min-width:18px; max-width:18px; flex:0 0 18px; overflow:visible; fill:none !important; stroke:none !important; }
.si-mobile-drawer-social a > svg.si-brand-icon path { fill:#fff !important; stroke:none !important; }
.si-mobile-drawer-social a > svg.si-brand-icon rect { fill:none !important; stroke:#fff !important; stroke-width:2 !important; }
.si-mobile-drawer-social a > svg.si-brand-icon circle { fill:none !important; stroke:#fff !important; stroke-width:2 !important; }
.si-mobile-drawer-social a > svg.si-brand-icon circle:last-child { fill:#fff !important; stroke:none !important; }
.si-mobile-drawer-social a.si-mobile-drawer-social--youtube > svg.si-brand-icon { width:20px !important; height:20px !important; min-width:20px; max-width:20px; }
.si-mobile-drawer-social a.si-mobile-drawer-social--youtube > svg.si-brand-icon path:last-child { fill:#f00000 !important; }
