.top-adv, .front-second-sidbar .main-banner { display: none; }
.front-image-gallery .jcarousel-list { transition: right 240ms ease-out; }
.jcarousel-container [role="button"]:focus-visible { outline: 2px solid #742786; outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) {
  .front-image-gallery .jcarousel-list { transition: none; }
}

/* Scale the rightmost hand-drawn oval in the original 923 × 42 menu sprite
   to each label. Its own 73 × 35 frame includes the full ink stroke. */
#nice-menu-1 > li > a.menu__link {
  position: relative;
  top: -5px;
  display: block;
  padding-inline: 12px;
  min-height: 32px;
  line-height: 32px;
  white-space: nowrap;
  background: transparent;
}
#nice-menu-1 > li > a.menu__link::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("/sites/all/themes/arabcartoon/images/menu-arabic-hover.png");
  background-repeat: no-repeat;
  background-position: right top;
  background-size: 1264.38356% 120%;
  opacity: 0;
}
#nice-menu-1 > li > a.menu__link:is(:hover, :focus-visible, [aria-current])::before {
  opacity: 1;
}

.editorial-index, .archive-entry, .newspaper-archive { padding: 4px 14px 18px; }
.archive-entry .reviewed-body p { margin-block: 0.8em; }
.archive-entry img { height: auto; max-width: 100%; }
.archive-entry .archive-figure { margin: 1rem 0; }
.archive-entry .archive-figure img { max-height: 640px; }
.archive-entry figcaption, .entry-source { color: #464146; }
.entry-photos { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.archive-entry .gallery-image { margin: 0; }
.entry-links { padding-inline-start: 1.5em; }
.news-list-row { padding: 14px 0; border-bottom: 1px solid #d8d5d8; }
.news-with-image {
  display: grid;
  grid-template-columns: minmax(0, min(30%, 220px)) minmax(0, 1fr);
  gap: min(3%, 15px);
  align-items: start;
}
.news-thumbnail { display: block; justify-self: start; max-width: 100%; box-sizing: border-box; border: 1px dotted #ccc; }
.news-thumbnail img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}
.news-summary { min-width: 0; }
.news-list-row h2, .news-list-row p { margin: 4px 0; }
.news-list-row time { color: #625969; font-size: 0.875rem; }
.section-links, .entry-index { margin: 12px 0; }
#paper-filter, .day-nav, .archive-pager { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#paper-filter { padding-block: 10px; }
#paper-filter label { font-weight: bold; }
#paper-filter input, #paper-filter select { min-height: 36px; padding: 1px 8px; box-sizing: border-box; font: inherit; }
#paper-filter input[type=date] { width: auto; min-width: 160px; background: white; color: #211925; border: 1px solid #928592; }
.day-nav, .archive-pager { margin-block: 12px; gap: 20px; }
.newspaper-archive [hidden], .archive-pager[hidden] { display: none; }
#paper-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 15px; align-items: start; }
#paper-grid figure { margin: 0; min-width: 0; }
#paper-grid figure > a, .paper-missing { display: grid; place-items: center; height: 156px; background: #f8f7f8; }
#paper-grid img { max-width: 100%; max-height: 156px; width: auto; height: auto; }
#paper-grid figcaption { padding: 3px; font-weight: bold; }
.newspaper-credit { padding-top: 15px; border-top: 1px solid #d8d5d8; }

.section-tabs, .archive-related { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin-block: .8rem 1.3rem; }
.section-tabs { border-bottom: 1px solid #ddd6dd; padding-bottom: .45rem; }
.section-tabs a { color: #533857; padding: .2rem .15rem; }
.section-tabs a[aria-current] { color: #61356c; border-bottom: 2px solid #ad64b7; font-weight: bold; text-decoration: none; }
.material-meta, .byline { color: #59515a; font-size: .9rem; line-height: 1.6; }
.archive-material .reviewed-body { white-space: pre-line; }
.archive-material .reviewed-body img { height: auto; max-width: 100%; }
.archive-related a, .result-link { text-decoration: underline; }
#archive-search-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem; margin-block: 1.2rem .5rem; }
#archive-search-form div { display: grid; gap: .2rem; }
#archive-search-form div:first-child { flex: 1 1 16rem; }
#archive-search-form label { font-weight: 700; }
#archive-search-form input, #archive-search-form select, #archive-search-form button { box-sizing: border-box; min-height: 40px; max-width: 100%; font: inherit; padding: .35rem .6rem; }
#archive-search-form button { color: white; background: #694172; border: 1px solid #60346a; border-radius: 3px; cursor: pointer; }
#search-hint { color: #514c51; font-size: .9rem; }
.archive-grid-thumb { max-width: min(100%, 200px); max-height: 140px; width: auto; height: auto; }

html.artwork-open { overflow: hidden; }
.archive-artwork-link { cursor: zoom-in; }
.archive-artwork-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  box-sizing: border-box;
  max-width: calc(100% - 1.5rem);
  max-height: calc(100% - 1.5rem);
  padding: .75rem;
  border: 1px solid #76677b;
  border-radius: 4px;
  background: white;
  color: #211925;
  box-shadow: 0 4px 32px #0005;
}
.archive-artwork-dialog[open] { display: grid; gap: .5rem; justify-items: center; }
.archive-artwork-dialog::backdrop { background: rgb(20 16 22 / 78%); }
.archive-artwork-dialog [hidden] { display: none; }
.archive-artwork-dialog button {
  justify-self: end;
  min-height: 40px;
  padding: .25rem 1rem;
  border: 1px solid #8d7f90;
  border-radius: 3px;
  background: #f7f3f8;
  color: #392c3d;
  font: inherit;
  cursor: pointer;
}
.archive-artwork-dialog button:focus-visible { outline: 2px solid #743d80; outline-offset: 2px; }
.archive-artwork-dialog img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  max-height: calc(100dvh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
}
.archive-artwork-dialog p { margin: 0; text-align: center; }

#archive-menu-toggle, #nice-menu-1 .mobile-social-item, .mobile-more { display: none; }

@media screen and (max-width: 1039px) {
  body {
    font-size: 1rem;
    line-height: 1.7;
    background: white;
  }
  #page, .region-bottom {
    width: 100%;
    margin: 0 auto;
    box-shadow: none;
    box-sizing: border-box;
  }
  #page > :is(.sign, .pencil, .newspaper-shot, .facebook) { display: none; }
  #header {
    height: auto;
    background-color: #d5cdd9;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: right top;
  }
  #header::before, #header::after { display: none; }
  #logo {
    float: none;
    display: block;
    width: fit-content;
    max-width: calc(100% - 2rem);
    margin: 0 auto;
    padding-block: 12px;
  }
  #logo img { display: block; width: min(70vw, 330px); max-width: 100%; height: auto; }
  #header .region-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    box-sizing: border-box;
    padding: 4px clamp(12px, 4vw, 32px);
    border-block: 1px solid #d8cdda;
    border-bottom: 2px solid #9953a5;
    background: #fff;
  }
  #archive-menu-toggle, #block-menu-menu-header-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    padding-inline: 10px;
  }
  #archive-menu-toggle {
    gap: 9px;
    border: 0;
    background: transparent;
    color: #291d2c;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
  }
  #archive-menu-toggle::before {
    content: "";
    width: 20px;
    height: 14px;
    box-sizing: border-box;
    border-block: 2px solid currentColor;
    background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
  }
  #header :focus-visible { outline: 2px solid #743d80; outline-offset: -2px; }
  #block-menu-menu-header-links {
    grid-column: 2;
    position: static;
    justify-self: end;
    margin: 0;
  }
  #block-menu-menu-header-links ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  #block-menu-menu-header-links li { float: none; padding: 0; }
  #block-menu-menu-header-links li a { font-size: 1rem; }
  #block-nice-menus-1 {
    grid-column: 1 / -1;
    float: none;
    position: static;
    margin: 0;
  }
  #block-nice-menus-1[hidden] { display: none; }
  #nice-menu-1 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
    float: none;
    margin: 0;
    padding: 6px 0;
    border: 0;
    border-top: 1px solid #e6dfe7;
  }
  #nice-menu-1 > li, #nice-menu-1 .mobile-social-item {
    display: block;
    float: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }
  #nice-menu-1 > li > a.menu__link {
    display: flex;
    align-items: center;
    position: static;
    min-height: 44px;
    padding: 0 .65rem;
    color: #312735;
    border-radius: 4px;
    white-space: normal;
    line-height: 1.5;
  }
  #nice-menu-1 > li > a.menu__link::before { display: none; }
  #nice-menu-1 > li > a:is([aria-current], :hover, :focus-visible) { background: #f3ebf5; }
  #main { min-height: 0; padding: clamp(12px, 3vw, 24px) 0 24px; }
  #main #content {
    width: 100%;
    float: none;
    box-sizing: border-box;
    margin: 0 auto;
    padding-inline: clamp(12px, 4vw, 32px);
    overflow-wrap: anywhere;
  }
  #content img { max-width: 100%; height: auto; box-sizing: border-box; }
  #page-title { font-size: clamp(1.4rem, 4vw, 1.8rem); line-height: 1.45; margin-block: 0 .65em; }
  #content .editorial-index, #content .archive-entry, #content .newspaper-archive { padding: 0; }
  .archive-entry .reviewed-body { font-size: 1rem; line-height: 1.85; }
  .news-list-row h2 { font-size: clamp(1.125rem, 3vw, 1.4rem); line-height: 1.5; }
  .custom-submitted-date { font-size: .8125rem; color: #655f66; }
  .section-tabs, .archive-pager, .day-nav { gap: .25rem .75rem; }
  :is(.section-tabs, .archive-pager, .day-nav) a { display: inline-flex; align-items: center; min-height: 44px; }
  #archive-search-form > div, #paper-filter > * { min-width: 0; }
  #archive-search-form :is(input, select, button), #paper-filter :is(input, select, button) {
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    font: inherit;
    box-sizing: border-box;
  }
  #content .views-view-grid, #content .views-view-grid tbody { display: block; width: 100%; }
  #content .views-view-grid tbody {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
    align-items: start;
    gap: 14px;
  }
  #content .views-view-grid tr { display: contents; }
  #content .views-view-grid td { display: block; min-width: 0; padding: 0; font-size: .875rem; }
  #content .views-view-grid td:empty { display: none; }
  .front #content {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }
  .front #main-content { position: absolute; }
  .front-first-sidbar, .front-second-sidbar, .front-news, .front-blog, .papers-arts, .front-image-gallery {
    float: none;
    width: 100%;
    height: auto;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible;
    margin: 0;
  }
  .front-first-sidbar { display: grid; gap: 18px; }
  .front-news .desktop-more { display: none; }
  .front-news .mobile-more { display: inline; }
  .front-news .views-field-view-node a { display: inline-flex; align-items: center; min-height: 44px; color: #62346b; text-decoration: underline; }
  .front-news .views-row { display: flow-root; padding-bottom: .75rem; margin-bottom: .75rem; }
  .front-news .front-latest-image { max-width: 45%; }
  .front-news .views-field-title a, .front-blog .views-field-title a { line-height: 1.55; }
  .front-blog { padding: 14px; }
  .front-blog .front-titles, .papers-arts-title {
    width: auto;
    height: auto;
    margin: 0 0 10px;
    padding: 0;
    float: none;
    background: none;
    color: #62346b;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: start;
  }
  .front-blog .views-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 12px;
    align-items: center;
  }
  .front-blog .views-row > .views-field { float: none; width: auto; height: auto; margin: 0; }
  .front-blog .views-field-title, .front-blog .views-field-body { grid-column: 1 / -1; }
  .front-blog .views-field-body { grid-row: 3; font-size: 1rem; }
  .front-blog .views-field-name { grid-row: 2; grid-column: 2; }
  .front-blog .views-field-field-user-image img { display: block; width: 44px; height: auto; }
  .papers-arts {
    display: grid;
    gap: 12px;
    justify-items: center;
    padding: 12px;
    background-size: cover;
  }
  .papers-arts-title { justify-self: start; margin: 0; }
  .papers-arts > img { display: block; width: min(100%, 360px); margin: 0; }
  .front-image-gallery { grid-column: 1 / -1; }
  .front-image-gallery :is(.jcarousel-container-horizontal, .jcarousel-clip-horizontal) {
    width: 100%;
    height: auto;
    padding: 0;
  }
  .front-image-gallery .jcarousel-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 12px;
    right: auto !important;
    width: auto !important;
    transition: none;
  }
  .front-image-gallery .jcarousel-item { width: auto !important; height: auto; margin: 0; }
  .front-image-gallery img { display: block; width: 100%; }
  .front-image-gallery :is(.jcarousel-prev, .jcarousel-next) { display: none; }
}

@media screen and (max-width: 700px) {
  .front #content { grid-template-columns: minmax(0, 1fr); }
  .front-first-sidbar, .front-second-sidbar { display: contents; }
  .front-news { grid-row: 1; }
  .papers-arts { grid-row: 2; }
  .front-blog { grid-row: 3; }
  .front-image-gallery { grid-row: 4; }
  .front-news .front-latest-image { float: none; max-width: 100%; margin: 0 0 .6rem; }
  .front-news .front-latest-image img { display: block; width: min(100%, 440px); margin-inline: auto; }
  #paper-filter { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem .8rem; }
  #paper-filter :is(input[type=date], select) { width: 100%; min-width: 0; }
  #paper-filter button { grid-column: 2; }
  #archive-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  #archive-search-form > div:first-child { grid-column: 1 / -1; }
  .news-with-image { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .news-thumbnail { justify-self: center; }
  .news-thumbnail img { max-height: 260px; }
  #paper-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); }
}
