/* Bridge: keep Smart School forms/tables usable inside Alufuq shell */

.alufuq-body {
  background: transparent;
}

.alufuq-body .toparea {
  display: none !important;
}

.brand-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  box-shadow: inset 0 0 0 2px rgba(212, 168, 75, 0.35);
}

.brand-logo-img--footer {
  margin-bottom: 1rem;
  width: 56px;
  height: 56px;
}

.alufuq-header .dropdown-menu {
  text-align: start;
  min-width: 180px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0.4rem 0;
}

.alufuq-header .dropdown-menu > li > a {
  display: block;
  padding: 0.55rem 1rem;
  color: var(--ink-soft);
}

.alufuq-header .dropdown-menu > li > a:hover {
  background: var(--mint);
  color: var(--ink);
}

.alufuq-hero .bs-slider,
.alufuq-hero .hero-carousel,
.alufuq-hero .carousel,
.alufuq-hero #bootstrap-touch-slider {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 100% !important;
}

.alufuq-hero .carousel-inner,
.alufuq-hero .item,
.alufuq-hero .item.active {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 100% !important;
  margin: 0 !important;
}

.alufuq-hero .item img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
}

.alufuq-hero .carousel-control {
  z-index: 3;
  background: transparent;
  text-shadow: none;
  opacity: 0.85;
  width: 50px;
}

.alufuq-hero .carousel-control .fa {
  font-size: 28px;
  color: #fff;
  position: absolute;
  top: 50%;
  margin-top: -14px;
}

.alufuq-hero .hero-media::after,
.alufuq-hero .carousel-inner.hero-media::after,
.alufuq-hero .carousel-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to left, rgba(6, 37, 31, 0.88) 0%, rgba(6, 37, 31, 0.55) 55%, rgba(6, 37, 31, 0.28) 100%),
    linear-gradient(0deg, rgba(6, 37, 31, 0.8) 0%, rgba(6, 37, 31, 0.25) 45%, transparent 70%);
}

html[dir="ltr"] .alufuq-hero .hero-media::after,
html[dir="ltr"] .alufuq-hero .carousel-inner.hero-media::after,
html[dir="ltr"] .alufuq-hero .carousel-inner::after {
  background:
    linear-gradient(to right, rgba(6, 37, 31, 0.88) 0%, rgba(6, 37, 31, 0.55) 55%, rgba(6, 37, 31, 0.28) 100%),
    linear-gradient(0deg, rgba(6, 37, 31, 0.8) 0%, rgba(6, 37, 31, 0.25) 45%, transparent 70%);
}

.alufuq-hero .hero-content {
  position: relative;
  z-index: 2;
  color: #fffdf8 !important;
}

/* LTR mode when English is selected */
html[dir="ltr"] body,
body.afu-ltr,
body.is-ltr {
  direction: ltr !important;
  text-align: left;
}

html[dir="ltr"] .header-top,
html[dir="ltr"] .footer-cta-inner,
html[dir="ltr"] .footer-bottom-inner,
html[dir="ltr"] .footer-brand-link,
html[dir="ltr"] .footer-contact-list li,
html[dir="ltr"] .brand {
  flex-direction: row;
}

html[dir="ltr"] .nav-list {
  direction: ltr;
}

html[dir="ltr"] .alufuq-header .dropdown-menu {
  text-align: left;
  left: 0;
  right: auto;
}

html[dir="ltr"] .hero-content,
html[dir="ltr"] .section-head,
html[dir="ltr"] .footer-cta-copy,
html[dir="ltr"] .footer-col,
html[dir="ltr"] .footer-brand {
  text-align: left;
}

html[dir="ltr"] .footer-col h4::after {
  left: 0;
  right: auto;
}

html[dir="rtl"] body,
body.afu-rtl,
body.is-rtl {
  direction: rtl !important;
}

.page-hero-fallback {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, #0d3d34, #1a6b5c 55%, #0a2f2a),
    radial-gradient(circle at 80% 20%, rgba(212, 168, 75, 0.25), transparent 50%);
}

.alufuq-content-wrap {
  position: relative;
  z-index: 1;
}

.alufuq-content,
.alufuq-home-body {
  color: var(--ink);
  text-align: start;
}

.alufuq-content img,
.alufuq-home-body img {
  max-width: 100%;
  height: auto;
}

.alufuq-content .table,
.alufuq-content table {
  width: 100%;
  background: var(--cream);
}

.alufuq-content .form-control,
.alufuq-content select.form-control,
.alufuq-content textarea.form-control {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  height: auto;
  padding: 0.7rem 0.9rem;
  text-align: start;
}

.alufuq-content .onlineformbtn,
.alufuq-content .btn-primary,
.alufuq-content .mdbtn.onlineformbtn {
  background: linear-gradient(135deg, var(--ink-soft), var(--teal)) !important;
  border: 0 !important;
  color: #fff !important;
  border-radius: var(--radius);
  padding: 0.7rem 1.25rem;
  font-weight: 600;
}

.alufuq-content .onlineformbtn:hover,
.alufuq-content .btn-primary:hover {
  filter: brightness(1.05);
}

.alufuq-sidebar .catetab {
  background: var(--ink-soft);
  color: #fff;
  padding: 0.75rem 1rem;
  font-family: var(--font-display);
}

.alufuq-sidebar .complain a {
  display: block;
  background: var(--gold);
  color: var(--ink);
  padding: 0.85rem 1rem;
  font-weight: 700;
  text-align: center;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.footer-social li a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: 50%;
  color: var(--cream);
}

.footer-social li a:hover {
  background: rgba(255, 253, 248, 0.12);
  color: var(--gold-soft);
}

.afu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.35rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.afu-btn:hover {
  transform: translateY(-2px);
  text-decoration: none !important;
}

.afu-btn-primary {
  background: linear-gradient(135deg, var(--ink-soft), var(--teal));
  color: var(--cream) !important;
  box-shadow: 0 8px 24px rgba(26, 107, 92, 0.3);
}

.afu-btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--ink) !important;
  box-shadow: 0 8px 24px rgba(184, 134, 11, 0.28);
}

.afu-btn-outline {
  background: transparent;
  color: var(--ink) !important;
  border: 1.5px solid rgba(6, 37, 31, 0.25);
}

.afu-btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: var(--cream) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

@media (max-width: 980px) {
  .header-actions .afu-btn-outline {
    display: none;
  }
}

.cookieConsent {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 120;
  background: var(--ink);
  color: #fff;
  padding: 1rem;
  text-align: center;
}

.cookieConsentOK {
  margin-inline-start: 0.75rem;
  background: var(--gold);
  color: var(--ink);
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  display: inline-block;
}

/* Two-row header overrides */
.alufuq-header {
  height: auto !important;
  min-height: 0 !important;
}

.alufuq-header .header-shell {
  width: 100%;
}

.alufuq-header .nav-list a {
  font-size: 16px !important;
  font-weight: 700 !important;
  padding: 11px 13px !important;
}

@media (max-width: 980px) {
  .alufuq-header .nav-list a {
    font-size: 18px !important;
    padding: 14px 16px !important;
  }
}

@media (max-width: 980px) {
  .alufuq-header .nav-list .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    box-shadow: none;
    border: 0;
    background: transparent;
  }
}

/* ── Demo structure × آفاق skin ── */
.afu-home-wrap {
  width: 100%;
  overflow-x: hidden;
  padding: 0;
}

.afu-home-content {
  padding: 0 !important;
}

.afu-home-content > .alufuq-home-body,
.afu-home-content .alufuq-home-body {
  margin: 0;
}

.alufuq-body .head-title {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  position: relative;
}

.alufuq-body .divider {
  width: 64px;
  height: 3px;
  background: var(--gold);
  margin: 1rem auto 1.5rem;
}

.alufuq-body .service-box {
  border: 0;
  background: transparent;
  float: none !important;
  width: 100% !important;
  margin: 0 0 1.25rem !important;
  padding: 0 !important;
  box-shadow: none !important;
  color: var(--ink) !important;
}

.alufuq-body .afu-demo-services .row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -12px;
  margin-right: -12px;
  align-items: stretch;
}

.alufuq-body .afu-demo-services [class*="col-"] {
  float: none !important;
  display: flex;
  flex: 0 0 33.333%;
  max-width: 33.333%;
  width: 33.333% !important;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

@media (max-width: 991px) {
  .alufuq-body .afu-demo-services [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
    width: 50% !important;
  }
}

@media (max-width: 767px) {
  .alufuq-body .afu-demo-services [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100% !important;
  }
}

.alufuq-body .service-box-content {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 24px 76px !important;
  box-shadow: var(--shadow);
  min-height: 150px;
  width: 100%;
  transition: transform 0.25s ease;
  color: var(--ink) !important;
}

html[dir="rtl"] .alufuq-body .service-box-content {
  padding: 24px 76px 24px 24px !important;
}

.alufuq-body .service-box-content:hover {
  transform: translateY(-4px);
}

.alufuq-body .service-box-content h3,
.alufuq-body .service-box-content h3 a,
.alufuq-body .service-box-content p {
  color: var(--ink) !important;
}

.alufuq-body .service-box-content h3 a {
  font-family: var(--font-display);
}

.alufuq-body .service-box-content p {
  width: 100% !important;
  font-weight: 400;
  opacity: 0.88;
}

.alufuq-body .service-box-icon {
  background: var(--ink-soft) !important;
  color: var(--gold-soft);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.25rem;
  padding-top: 0 !important;
}

.alufuq-body .service-box-icon img {
  filter: brightness(0) invert(1);
}

.alufuq-body .service-box-icon i {
  color: var(--gold) !important;
  font-size: 1.35rem !important;
}

.afu-demo-services {
  padding: 2.5rem 1.25rem 1.5rem;
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  clear: both;
  /* Original theme pulls .service-inner up with absolute -188px; keep cards in normal flow */
  min-height: 0;
  overflow: visible;
}

.afu-demo-services .service-inner {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  z-index: auto !important;
  width: 100%;
}

.alufuq-body .afu-demo-services .service-box-content {
  min-height: 150px;
  width: 100%;
}

.alufuq-body .afu-demo-services .service-box-icon {
  position: absolute;
  top: 20px;
  inset-inline-start: 16px;
  left: auto;
  width: 48px;
  height: 48px;
}

html[dir="rtl"] .alufuq-body .afu-demo-services .service-box-icon {
  right: 16px;
  left: auto;
}

html[dir="ltr"] .alufuq-body .afu-demo-services .service-box-icon {
  left: 16px;
  right: auto;
}

.alufuq-hero {
  margin-bottom: 0;
}

.alufuq-body .afu-home-content > section:first-child,
.alufuq-body .afu-demo-services {
  clear: both;
}

.afu-intro-band {
  padding: 2.5rem 1rem 3rem;
  clear: both;
  position: relative;
  z-index: 1;
}

.afu-intro-band .row {
  display: block;
  clear: both;
}

.afu-intro-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 1.25rem;
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
}

.afu-about-section.bg-gray,
.alufuq-body .afu-about-section {
  background: var(--sand) !important;
}

.alufuq-body .about-right h3 {
  font-family: var(--font-display);
  color: var(--ink-soft);
}

.alufuq-body .accrodion2 .panel-heading {
  background: var(--cream);
}

.alufuq-body .accrodion2 .panel-title a {
  color: var(--ink);
  font-weight: 600;
}

.alufuq-body .courses-box {
  border-color: var(--line) !important;
  overflow: hidden;
  border-radius: var(--radius);
}

.alufuq-body .courses-box:hover .course-inner {
  background: var(--ink-soft) !important;
}

.alufuq-body .course-subject {
  background: var(--gold) !important;
  color: var(--ink) !important;
}

.alufuq-body .btn-read {
  background: var(--teal) !important;
  color: #fff !important;
  border-radius: var(--radius);
}

.alufuq-body .courses-box:hover .btn-read {
  background: var(--gold) !important;
  color: var(--ink) !important;
}

.alufuq-body .countdown_bg,
.afu-counter-section {
  background: linear-gradient(135deg, var(--ink) 0%, var(--teal) 100%) !important;
}

.alufuq-body .countdown_bg:after {
  background: transparent !important;
}

.alufuq-body .counter-main {
  background: rgba(255, 253, 248, 0.1);
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  color: #fff;
}

.alufuq-body .counter-main i,
.alufuq-body .countdown_bg i {
  color: var(--gold-soft) !important;
}

.alufuq-body .counter-title,
.alufuq-body .counter-content {
  color: #fff !important;
  text-align: start;
}

.alufuq-body .staffteam {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.alufuq-body .staffteamimg img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.alufuq-body .staff-content {
  padding: 1rem;
  text-align: center;
}

.alufuq-body .staff-content h3 {
  font-family: var(--font-display);
  margin: 0 0 0.25rem;
}

.alufuq-body .testimonial_bg {
  background: var(--ink-soft) !important;
}

.alufuq-body .testimonial_bg:after {
  opacity: 0.35;
}

.alufuq-body .testi_description {
  background: rgba(255, 253, 248, 0.08) !important;
  border-radius: var(--radius);
}

.alufuq-body .testimonialimg img {
  object-fit: cover;
}

/* Hide empty/broken media placeholders */
.afu-empty-media,
.alufuq-body .about-img:empty,
.alufuq-body img[src=""],
.alufuq-body img:not([src]) {
  display: none !important;
}

.alufuq-body .countdown_bg .col-lg-6:has(img[src=""]),
.alufuq-body .countdown_bg .col-md-6:empty {
  display: none;
}

.alufuq-body .countdown_bg .col-lg-6:only-child,
.alufuq-body .countdown_bg .counter-wrapper {
  width: 100%;
  max-width: 100%;
}

.alufuq-body .aboutspage img,
.alufuq-body .about-right img,
.alufuq-body .ss-about img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.alufuq-body .aboutspage .col-md-6:has(img[style*="display: none"]),
.alufuq-body .aboutspage .afu-empty-media {
  display: none !important;
}

/* Tighter CMS sections */
.afu-home-content .row {
  margin-left: 0;
  margin-right: 0;
}

.alufuq-body .servicebox,
.alufuq-body .courses-section,
.alufuq-body .afu-about-section,
.alufuq-body .countdown_bg,
.alufuq-body .staff,
.alufuq-body .testimonial_bg {
  clear: both;
}

.alufuq-header .dropdown-menu {
  z-index: 120;
}
