/* Maryam Publications WordPress integration layer. */

:root {
  --mp-admin-bar: 0px;
}

.admin-bar {
  --mp-admin-bar: 32px;
}

@media (max-width: 782px) {
  .admin-bar {
    --mp-admin-bar: 46px;
  }
}

html {
  scroll-padding-top: calc(var(--header-height) + var(--mp-admin-bar) + 18px);
}

body {
  overflow-wrap: break-word;
}

body.admin-bar .site-header {
  top: var(--mp-admin-bar);
}

.shell {
  width: min(calc(100% - (var(--mp-shell-pad) * 2)), var(--shell));
}

.brand img,
.mobile-menu__head img,
.footer-brand img {
  height: auto;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.mp-site-main {
  min-height: 55vh;
}

.mp-page-hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 68px;
  background: linear-gradient(135deg, #fff 0%, var(--red-soft) 100%);
  border-bottom: 1px solid var(--line);
}

.mp-page-hero::after {
  content: "";
  position: absolute;
  top: -140px;
  right: -90px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(194, 30, 46, 0.055);
}

.mp-page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.mp-page-hero h1 {
  margin: 0 0 13px;
  font-size: clamp(2.25rem, 4vw, 3.4rem);
}

.mp-page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--body);
  font-size: 1.08rem;
}

.mp-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mp-breadcrumbs a:hover {
  color: var(--red);
}

.mp-content-area {
  padding: var(--mp-section-space) 0;
}

.mp-content-area--narrow .entry-content {
  max-width: var(--mp-content);
  margin-inline: auto;
}

.entry-content > *:first-child,
.entry-summary > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child,
.entry-summary > *:last-child {
  margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 1.8em;
  margin-bottom: 0.65em;
}

.entry-content img {
  border-radius: var(--radius-md);
}

.mp-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--mp-grid-gap);
}

.mp-entry-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.mp-entry-card:hover {
  transform: translateY(-4px);
  border-color: rgba(194, 30, 46, .32);
  box-shadow: var(--shadow-md);
}

.mp-entry-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}

.mp-entry-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.mp-entry-card:hover .mp-entry-card__image img {
  transform: scale(1.025);
}

.mp-entry-card__body {
  padding: 24px;
}

.mp-entry-card__meta {
  margin: 0 0 10px;
  color: var(--red);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.mp-entry-card h2,
.mp-entry-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.mp-entry-card p:last-child {
  margin-bottom: 0;
}

.navigation.pagination {
  margin-top: 46px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.page-numbers.current,
.page-numbers:hover {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.mp-empty-state,
.mp-404 {
  max-width: 720px;
  margin-inline: auto;
  padding: 64px 28px;
  text-align: center;
}

.mp-404__code {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-family: var(--mp-font-heading);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 800;
  line-height: .95;
}

.search-form {
  display: flex;
  gap: 10px;
  width: min(100%, 620px);
  margin: 28px auto 0;
}

.search-form label {
  flex: 1;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  min-height: var(--mp-input-height);
  padding: 11px 15px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--mp-input-radius);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(194, 30, 46, .12);
  outline: 0;
}

.search-submit,
button:not(.icon-button):not(.mobile-menu-button):not(.mobile-menu-close),
input[type="submit"] {
  min-height: var(--mp-button-height);
  padding: 10px 20px;
  border: 0;
  border-radius: var(--mp-button-radius);
  background: var(--red);
  color: #fff;
  font-family: var(--mp-font-heading);
  font-weight: 700;
  cursor: pointer;
}

.mp-disable-animations *,
.mp-disable-animations *::before,
.mp-disable-animations *::after {
  animation: none !important;
  transition: none !important;
}

@media (max-width: 900px) {
  .mp-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .shell {
    width: min(calc(100% - (var(--mp-shell-pad-mobile) * 2)), var(--shell));
  }

  .mp-page-hero {
    padding: 54px 0 48px;
  }

  .mp-content-area {
    padding: var(--mp-section-space-mobile) 0;
  }

  .mp-post-grid {
    grid-template-columns: 1fr;
  }

  .search-form {
    flex-direction: column;
  }
}

