/* Small, safe overrides for the Laravel-integrated site.
   Keep changes minimal and avoid touching the theme file. */

/* Fix: a legacy inline style forced `.row { display: block !important; }`.
   We removed it from the layout; do NOT redefine `.row` here. */

/* Match theme hover color without inline styles */
a.color-6:hover {
  color: #04c9fd !important;
}

/* Images: make all images responsive by default */
.page-wrapper img {
  max-width: 100%;
  height: auto;
}

/* Avoid inline images creating baseline gaps */
.page-wrapper img {
  display: block;
}

/* CMS/editor content: keep images centered and not overflowing */
.content-area img,
.cms-content img,
.widget img,
.entry-add img,
.entry-loc img {
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

/* If a component needs inline images, opt back in */
.page-wrapper .img-inline {
  display: inline-block;
  vertical-align: middle;
}

/* CMS content typography: applies automatically to page descriptions */
.cms-content,
.content-area {
  color: #646c77;
}
.cms-content p,
.content-area p {
  line-height: 1.85;
  margin: 0 0 14px;
}
.cms-content h1,
.cms-content h2,
.cms-content h3,
.cms-content h4,
.cms-content h5,
.cms-content h6,
.content-area h1,
.content-area h2,
.content-area h3,
.content-area h4,
.content-area h5,
.content-area h6 {
  margin: 18px 0 12px;
  line-height: 1.25;
}
.cms-content ul,
.cms-content ol,
.content-area ul,
.content-area ol {
  padding-inline-start: 22px;
  margin: 0 0 14px;
}
.cms-content li,
.content-area li {
  margin: 0 0 6px;
}
.cms-content blockquote,
.content-area blockquote {
  border-inline-start: 4px solid rgba(253, 30, 80, 0.7);
  padding: 8px 14px;
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.65);
}
.cms-content table,
.content-area table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
}
.cms-content table th,
.cms-content table td,
.content-area table th,
.content-area table td {
  border: 1px solid rgba(39, 0, 128, 0.15);
  padding: 10px;
  vertical-align: top;
}
.cms-content a,
.content-area a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Header tweaks:
   Avoid overriding theme layout rules; only fix what’s broken in RTL/LTR. */

/* Force header background to white (normal + sticky + mobile menu) */
header.site-header,
header.site-header .navigation,
header.site-header .sticky-header,
header.site-header #navbar {
  background: #fff !important;
}

/* Language switcher position (matches old HTML float:right) */
header.site-header .header-lang-switch {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 15px;
  z-index: 20;
}
html[dir="rtl"] header.site-header .header-lang-switch {
  right: auto;
  left: 15px;
}

header.site-header .header-lang-switch .theme-btn {
  padding: 6px 14px;
  line-height: 1.2;
}

/* Logo sizing so it matches legacy header */
header.site-header .navbar-brand img {
  max-height: 60px;
  width: auto;
}

/* Responsive: hide top logo, show it inside sidebar menu */
header.site-header .sidebar-logo {
  display: none;
  padding: 20px 15px 10px;
  text-align: center;
}
header.site-header .sidebar-logo img {
  max-width: 180px;
  height: auto;
}

@media (max-width: 991px) {
  header.site-header .navbar-header .navbar-brand {
    display: none;
  }
  header.site-header .sidebar-logo {
    display: block;
  }
}

@media (max-width: 991px) {
  header.site-header .header-lang-switch {
    right: 65px; /* keep clear of menu button */
  }
  html[dir="rtl"] header.site-header .header-lang-switch {
    left: 65px;
  }
}

/* Responsive header alignment (LTR/RTL) */
@media (max-width: 991px) {
  /* Theme places menu button on the right; flip it for RTL */
  html[dir="rtl"] header.site-header .navbar-header .open-btn {
    right: auto !important;
    left: 15px !important;
  }

  /* Language switch stays opposite the menu button */
  header.site-header .header-lang-switch {
    right: 65px;
    left: auto;
  }
  html[dir="rtl"] header.site-header .header-lang-switch {
    left: 65px;
    right: auto;
  }
}

/* RTL: make the off-canvas menu slide from the left */
@media (max-width: 991px) {
  html[dir="rtl"] header.site-header #navbar {
    right: auto;
    left: -330px;
  }

  html[dir="rtl"] header.site-header .slideInn {
    right: auto !important;
    left: 0 !important;
  }

  html[dir="rtl"] header.site-header #navbar .close-navbar {
    left: auto;
    right: -41px;
  }

  html[dir="rtl"] header.site-header #navbar > ul > li > a {
    padding: 10px 35px 10px 15px;
    text-align: right;
  }
}

@media (max-width: 991px) {
  /* Prevent overlap with the close button (theme puts it at top:90px) */
  header.site-header #navbar .navbar-nav {
    padding-top: 20px;
  }

  header.site-header #navbar .sidebar-logo {
    padding-top: 60px;
  }
}

/* The legacy theme CSS incorrectly turns every Bootstrap `.row`
   into a flex column-reverse on small screens. Keep Bootstrap grid working. */
@media only screen and (max-width: 960px) {
  .row {
    display: block !important;
    flex-direction: initial !important;
  }
}

@media (max-width: 767px) {
  .services-section-s2 .services-grids .grid {
    height: auto !important;
  }
}

.theme-btn-s4 {
  padding-top: 25px;
}

/* Forms: make inline-styled pages look acceptable on mobile */
form[dir="rtl"] label,
form[dir="rtl"] .control-label {
  text-align: right;
}

.alert {
  border-radius: 6px;
}



/* Page title: keep theme's vertical centering intact.
   (The theme uses table/table-cell; avoid padding-top hacks here.) */
.page-title .page-title-col {
  padding-top: 0;
}

/* Arabic/long titles: allow wrapping without breaking layout */
.page-title h2 {
  line-height: 1.2;
  text-wrap: balance;
}

/* Page title alignment: start (LTR left, RTL right) instead of center */
.page-title {
  text-align: left;
}
html[dir="rtl"] .page-title {
  text-align: right;
}
@media (max-width: 767px) {
  .page-title {
    text-align: center;
  }
}

/* Page title backgrounds (from old HTML landing images) */
.page-register .page-title {
  background-image: url("../images/landing/register.jpg");
}
.page-incubator .page-title {
  background-image: url("../images/landing/registeration-en.jpg");
}
.page-contact .page-title {
  background-image: url("../images/landing/contact.jpg");
}
.page-about .page-title {
  background-image: url("../images/landing/about-page-title.jpg");
}
.page-schedule .page-title {
  background-image: url("../images/landing/register.jpg");
}
.page-team .page-title {
  background-image: url("../images/landing/team.jpg");
}

/* RTL (Arabic) page-title backgrounds */
html[dir="rtl"] .page-incubator .page-title {
  background-image: url("../images/landing/registeration-ar.jpg");
}
html[dir="rtl"] .page-about .page-title {
  background-image: url("../images/landing/about-page-title-ar.jpg");
}

/* Reduce inline styles in form pages */
.festival-form-section {
  background: #fff;
  padding-top: 3% !important;
  padding-bottom: 5%;
}
.festival-form-container {
  margin-top: 7%;
  margin-bottom: 7%;
}

/* Generic white sections with tighter vertical spacing (used by content pages) */
.festival-section--white {
  background: #fff;
}
.festival-section--tight {
  padding-top: 3% !important;
  padding-bottom: 1% !important;
}

/* “Call” page typography (replaces inline font-size) */
.festival-call-intro {
  font-size: 19px;
}

/* Make long Arabic/English paragraphs wrap nicely */
.festival-prose {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* RTL/LTR helpers for pages that had inline left-align */
.festival-text-start {
  text-align: left;
}
html[dir="rtl"] .festival-text-start {
  text-align: right;
}

/* Team page: replace removed inline padding-top */
.festival-team-section {
  padding-top: 50px;
}

/* Team grids: fix image sizing + text alignment (RTL/LTR safe) */
.team-section .team-grids .team-grid {
  text-align: center;
}

/* Trustees committee: fix float grid gaps by using flex layout */
.team-section .team-grids {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

/* Headings inside the grid (Board/Partners/Honorees) must be full-width */
.team-section .team-grids > .row {
  width: 100%;
  flex: 0 0 100%;
  margin-left: 0;
  margin-right: 0;
}
.team-section .team-grids > .row > [class*="col-"] {
  float: none;
}

.team-section .team-grids .grid {
  float: none !important;
  display: flex;
  flex-direction: column;
}
@media (min-width: 992px) {
  .team-section .team-grids .grid {
    width: 25% !important;
  }
}
@media (max-width: 991px) {
  .team-section .team-grids .grid {
    width: 50% !important;
  }
}
@media (max-width: 500px) {
  .team-section .team-grids .grid {
    width: 100% !important;
  }
}

/* Make the card content stretch evenly */
.team-section .team-grids .grid .member-info {
  margin-top: auto;
}

/* People (trustees): enforce consistent photo box */
.team-section .team-grids .team-grid--person .img-holder {
  width: 100%;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f4f6;
}
.team-section .team-grids .team-grid--person .img-holder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
  .team-section .team-grids .team-grid--person .img-holder {
    height: 0;
    padding-bottom: 100%;
  }
  .team-section .team-grids .team-grid--person .img-holder img {
    position: absolute;
    inset: 0;
  }
}

/* If a trustee has no image (or broken image), keep layout stable */
.team-section .team-grids .team-grid--person:not(:has(.img-holder)) {
  padding-top: 0;
}
.team-section .team-grids .team-grid--person .img-holder img:not([src]),
.team-section .team-grids .team-grid--person .img-holder img[src=""] {
  display: none;
}

/* Honorees: same sizing rule */
.team-section .team-grids .team-grid--honoree {
  padding: 0 12px 25px;
}
.team-section .team-grids .team-grid--honoree .img-holder {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f4f6;
  border-radius: 10px;
}
.team-section .team-grids .team-grid--honoree .img-holder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Partners: keep logos fully visible (no cropping) */
.team-section .team-grids .team-grid--logo .img-holder {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.team-section .team-grids .team-grid--logo .img-holder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Text blocks: align using logical start (RTL/LTR) */
.team-section .team-grids .team-grid--text .details,
.team-section .team-grids .team-grid--person .member-info .details {
  text-align: start;
}

/* Make the “details” panel consistent height */
.team-section .team-grids .member-info .details {
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 991px) {
  .team-section .team-grids .member-info .details {
    height: 110px;
  }
}

/* Clamp text so cards don't grow unevenly */
.team-section .team-grids .member-info .details h4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  overflow: hidden;
}
.team-section .team-grids .member-info .details .post {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* Fix theme’s title-text alignment (it’s reversed for LTR) */
html[dir="ltr"] .team-section .title-text {
  text-align: left;
}
html[dir="rtl"] .team-section .title-text {
  text-align: right;
}
@media (max-width: 991px) {
  .team-section .title-text {
    text-align: center !important;
  }
}

/* RTL float direction for grid cards (theme floats left only) */
html[dir="rtl"] .team-section .team-grids .grid {
  float: right;
}

/* Schedule filters: enforce proper RTL flow/alignment */
/* The theme builds “tabs” using floated <a>. Replace with flex so wrapping/alignment works. */
.schedule-section .grid-filters ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  margin: 0;
}
html[dir="rtl"] .schedule-section .grid-filters ul {
  direction: rtl;
 }

.schedule-section .grid-filters li {
  margin: 0;
}

.schedule-section .grid-filters li a {
  float: none !important;
  display: block;
  white-space: normal;
  line-height: 1.2;
  min-width: 170px;
  text-align: center;
}

@media (max-width: 767px) {
  .schedule-section .grid-filters li a {
    min-width: 140px;
  }
}

/* Schedule cards: our Blade uses an empty <div> inside .image-box (no <img>).
   Give it a height so Isotope can calculate and show all items. */
.schedule-grid .image-box {
  height: 200px;
}
@media (max-width: 1199px) {
  .schedule-grid .image-box {
    height: 161px;
  }
}
@media (max-width: 991px) {
  .schedule-grid .image-box {
    height: 142px;
  }
}
.schedule-grid .image-box > div {
  height: 100%;
}

/* Schedule: actors/cast line under title */
.schedule-actors {
  margin: -6px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #222882;
  text-transform: none;
  line-height: 1.3;
}
html[dir="rtl"] .schedule-actors {
  direction: rtl;
}

/* Schedule: long description / participants list */
.schedule-desc {
  font-size: 13px;
  line-height: 1.45;
  color: #282828;
  margin: 0 0 10px;
  text-align: start;
  max-height: 170px;
  overflow: auto;
  padding-right: 6px;
}
html[dir="rtl"] .schedule-desc {
  direction: rtl;
  padding-right: 0;
  padding-left: 6px;
}

.section-title-s4{
  text-align: justify;
}