/* ==========================================================================
   Irhal Next-Decade Standalone Editorial & Detail Reader System (2026+)
   100% standalone styling for all Travel Stories, Travel News, City Articles,
   Venue Detail pages (Hotels, Restaurants, Sights, Mosques, Shopping, Tours,
   Festivals, Family), Itinerary Detail pages, Prayer Times, and Offer Readers.
   ========================================================================== */

#irhal-sites-legacy :is(.ir-detail-page, .ir-editorial-layout, .ir-offer-reader) {
  box-sizing: border-box;
  width: 100%;
  max-width: 1380px;
  margin-inline: auto;
  padding-inline: clamp(18px, 3vw, 40px);
}

#irhal-sites-legacy .ir-detail-page :is(.ir-detail-heading, [class*="max-w-[96rem]"]) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

/* Main Content + Sticky Stone Sidebar Grid */
#irhal-sites-legacy :is(.ir-editorial-layout, .ir-offer-reader-layout, .ir-detail-grid) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 350px);
  column-gap: clamp(28px, 3.6vw, 56px);
  row-gap: 36px;
  align-items: start;
}

#irhal-sites-legacy .ir-guide-item-reader .ir-detail-grid {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 340px);
}

#irhal-sites-legacy :is(.ir-detail-grid, .ir-editorial-layout, .ir-offer-reader-layout) > * {
  min-width: 0;
}

#irhal-sites-legacy .ir-detail-page .ir-detail-grid {
  width: 100%;
  max-width: none;
  padding-inline: 0;
  padding-block: clamp(24px, 3vw, 40px) clamp(48px, 6vw, 72px);
}

#irhal-sites-legacy .ir-editorial-layout,
#irhal-sites-legacy .ir-offer-reader {
  padding-block: clamp(24px, 3vw, 40px) clamp(48px, 6vw, 72px);
}

/* Editorial & Detail Headings */
#irhal-sites-legacy :is(.ir-editorial-heading, .ir-detail-heading) {
  text-align: start;
  max-width: none;
  margin: 0 0 28px;
}

#irhal-sites-legacy .ir-detail-page > .ir-detail-heading {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

#irhal-sites-legacy .ir-detail-heading > div {
  padding-block: 16px 24px;
  padding-inline: 0;
}

#irhal-sites-legacy :is(.ir-detail-page, .ir-editorial-reader, .ir-offer-reader) h1 {
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.028em;
  color: #111111;
  text-wrap: balance;
  overflow-wrap: anywhere;
  margin: 12px 0 16px;
}

#irhal-sites-legacy[dir="rtl"] :is(.ir-detail-page, .ir-editorial-reader, .ir-offer-reader) h1 {
  letter-spacing: 0;
  line-height: 1.24;
}

#irhal-sites-legacy :is(.ir-detail-page, .ir-editorial-reader, .ir-offer-reader) h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #111111;
}

#irhal-sites-legacy[dir="rtl"] :is(.ir-detail-page, .ir-editorial-reader, .ir-offer-reader) h2 {
  letter-spacing: 0;
  line-height: 1.38;
}

#irhal-sites-legacy :is(.ir-editorial-heading, .ir-detail-heading) > p,
#irhal-sites-legacy .ir-detail-heading p {
  max-width: 70ch;
  margin-inline: 0;
  margin-top: 12px;
  font-family: inherit;
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.68;
  color: #525252;
}

#irhal-sites-legacy .ir-editorial-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

#irhal-sites-legacy .ir-editorial-meta > :is(div, span, time) {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #e6e6e1;
  background: #f6f6f3;
  color: #525252;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: none;
}

#irhal-sites-legacy .ir-editorial-meta > time {
  border-color: rgba(208, 20, 23, 0.22);
  background: rgba(208, 20, 23, 0.06);
  color: #d01417;
}

/* Hero & Inline Editorial Media */
#irhal-sites-legacy :is(.ir-editorial-hero, .ir-offer-reader-hero) {
  margin: 24px 0 32px;
}

#irhal-sites-legacy :is(.ir-editorial-hero, .ir-offer-reader-hero) > div {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 580px;
  border: 1px solid #e6e6e1;
  border-radius: 22px;
  overflow: hidden;
  background: #f6f6f3;
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.08);
}

#irhal-sites-legacy :is(.ir-editorial-hero, .ir-offer-reader-hero) img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
}

#irhal-sites-legacy .guide-source-photo {
  width: 100%;
  margin-inline: 0;
}

#irhal-sites-legacy .guide-source-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 16px;
}

#irhal-sites-legacy .ir-detail-media figure > button {
  width: 100%;
  max-width: none;
  aspect-ratio: 3 / 2;
  max-height: 560px;
  height: auto;
  border-radius: 18px;
  overflow: hidden;
}

#irhal-sites-legacy .ir-detail-media figure > div {
  border-radius: 18px;
  overflow: hidden;
}

#irhal-sites-legacy :is(.ir-detail-media, .ir-editorial-prose) figcaption {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #525252;
  margin-top: 10px;
  overflow-wrap: anywhere;
}

/* Long-Form Editorial Prose */
#irhal-sites-legacy :is(.ir-editorial-prose, .ir-editorial-lead) {
  width: 100%;
  max-width: 72ch;
  margin: 28px 0 48px;
  font-family: inherit;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #222222;
}

#irhal-sites-legacy .ir-editorial-prose p {
  line-height: 1.8;
}

#irhal-sites-legacy[dir="rtl"] .ir-editorial-prose p {
  line-height: 1.95;
}

#irhal-sites-legacy :is(.ir-editorial-prose, .ir-editorial-lead, .ir-detail-grid) :is(p, li, a, figcaption) {
  overflow-wrap: anywhere;
}

#irhal-sites-legacy :is(.ir-detail-page, .ir-editorial-layout, .ir-offer-reader) .font-editorial {
  font-family: inherit;
}

#irhal-sites-legacy .ir-guide-item-reader .guide-content > :is(p, h2, h3) {
  max-width: 74ch;
}

/* Modern Stone Sidebar (Replaces Legacy Red-Top-Bar Sidebar) */
#irhal-sites-legacy :is(.ir-editorial-related, .ir-detail-grid > aside) {
  margin-top: 0;
  min-width: 0;
  border: 1px solid #e6e6e1;
  border-radius: 20px;
  background: #f6f6f3;
  padding: 24px;
}

#irhal-sites-legacy :is(.ir-detail-grid > aside, .ir-editorial-related) h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111111;
}

#irhal-sites-legacy .ir-editorial-related img {
  border-radius: 12px;
}

#irhal-sites-legacy .ir-editorial-related time {
  font-family: inherit;
}

/* Unified Next-Decade Red Action Buttons */
#irhal-sites-legacy :is(.ir-detail-page, .ir-editorial-layout, .ir-offer-reader) :is([data-slot="button"][data-variant="red"], button.bg-irhal-red) {
  background: #d01417;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 700;
}

#irhal-sites-legacy :is(.ir-detail-page, .ir-editorial-layout, .ir-offer-reader) :is([data-slot="button"][data-variant="red"], button.bg-irhal-red):hover {
  background: #b11013;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  #irhal-sites-legacy :is(.ir-editorial-layout, .ir-offer-reader-layout, .ir-detail-grid),
  #irhal-sites-legacy .ir-guide-item-reader .ir-detail-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  #irhal-sites-legacy .ir-detail-grid > aside {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 700px) {
  #irhal-sites-legacy :is(.ir-editorial-hero, .ir-offer-reader-hero) > div {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }

  #irhal-sites-legacy :is(.ir-editorial-prose, .ir-editorial-lead, .ir-detail-heading p) {
    font-size: 1rem;
  }

  #irhal-sites-legacy .guide-source-photo img,
  #irhal-sites-legacy .ir-detail-media figure > button {
    max-height: 400px;
  }

  #irhal-sites-legacy :is(.ir-editorial-related, .ir-detail-grid > aside) {
    padding: 18px;
    border-radius: 16px;
  }
}

@media print {
  #irhal-sites-legacy :is(.ir-detail-page, .ir-editorial-layout, .ir-offer-reader) {
    width: 100%;
    max-width: none;
  }

  #irhal-sites-legacy :is(.ir-editorial-layout, .ir-offer-reader-layout, .ir-detail-grid) {
    display: block;
  }
}
