/* ================== Base font size ================== */
html { font-size: 18px; }
@media (max-width: 992px) { html { font-size: 17px; } }
@media (max-width: 576px) { html { font-size: 16px; } }

/* ================== Theme basics ================== */
:root{ --primary:#0a6b5f; --ulfgreen:#0a6b5f; --ulfgreen-ink:#07574d; --ulfgreen-soft:rgba(10,107,95,.10); }
.btn-primary{ background:var(--primary); border-color:var(--primary); }
.icon-list a{ color:inherit } .icon-list a:hover{ color:var(--primary) }

/* ================== HERO / Carousel (clean) ================== */
/* ارتفاع السلايدر */
.min-vh-75{ min-height:78vh; }
@media (max-width:992px){ .min-vh-75{ min-height:70vh; } }
@media (max-width:576px){ .min-vh-75{ min-height:64vh; } }

/* الخلفية والطبقة الداكنة */
.hero-slide{
  position:relative;
  min-height:75vh;
  display:block;
  background-color:#222;
  background-image: var(--bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero-slide::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.28),rgba(0,0,0,.55));
}
.hero-slide-video{ background-image:none; background-color:#000; }
.hero-slide-video::after{ display:none; }
.hero-video{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover; z-index:0;
}
.hero-video-overlay{
  position:absolute; inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.28),rgba(0,0,0,.55));
  z-index:1;
}
.hero-slide-video > .container{ z-index:2; }

/* تموضع المحتوى فوق الصورة (الأساس: ديسكتوب يسار) */
.hero-slide > .container{
  position:absolute;
  left:50%; top:50%;
  transform:translate(-50%,-50%);     /* تصحيح -80%, 50% */
  text-align:left;
  z-index:2;
  width:min(92%,1140px);
  padding:0;                          /* لا نستخدم py-5 هنا */
}

/* موضع كل سلايد على الديسكتوب (عدّل القيم حسب صورك) */
#heroCarousel .carousel-item:nth-child(1) > .container{ top:38%; }
#heroCarousel .carousel-item:nth-child(2) > .container{ top:46%; }
#heroCarousel .carousel-item:nth-child(3) > .container{ top:40%; }

/* أحجام النصوص مع clamp */
.hero-slide h1{
  font-size:clamp(1.8rem,4.5vw,4.2rem);
  line-height:1.1;
  text-shadow:0 2px 10px rgba(0,0,0,.35);
  max-width:900px;
}
.hero-slide p{
  font-size:clamp(1rem,1.2vw + .6rem,1.35rem);
  text-shadow:0 2px 8px rgba(0,0,0,.3);
  max-width:680px;
  margin-top:.75rem;
}
.hero-slide .btn{ padding:.7rem 1.15rem; font-weight:700; }

/* ===== موبايل: وسط + ترتيب الأزرار عمودياً + حواف آمنة ===== */
@media (max-width:768px){
  #heroCarousel .carousel-item > .container{
    top:55%;
    text-align:center;
    padding-left:max(16px, env(safe-area-inset-left));
    padding-right:max(16px, env(safe-area-inset-right));
  }
  .hero-slide::after{ background:linear-gradient(180deg,rgba(0,0,0,.40),rgba(0,0,0,.65)); }
  .hero-slide h1{ max-width:95%; }
  .hero-slide p{ max-width:88%; margin-inline:auto; }
  .hero-slide .d-flex{ flex-direction:column; align-items:center; gap:.6rem; }
  .hero-slide .btn-lg{ padding:.6rem 1rem; font-size:1rem; width:auto; max-width:280px; }
}
@media (max-width:576px){
  #heroCarousel .carousel-item > .container{ top:56%; }
  .carousel-control-prev, .carousel-control-next{ display:none; }
}

/* مؤشرات السلايدر */
.carousel-indicators [data-bs-target]{ width:10px; height:10px; border-radius:50%; background-color:rgba(255,255,255,.6); }
.carousel-indicators .active{ background-color:#fff; }

/* ================== Faculties (كما اعتمدنا سابقًا) ================== */
.text-ulfgreen{ color:var(--ulfgreen); }
.fac-list{ margin:0; padding:0; }
.fac-item{ display:flex; align-items:center; gap:.85rem; padding:.55rem 0; }
.fac-icon{
  width:44px; height:44px; flex:0 0 44px; display:grid; place-items:center;
  color:var(--ulfgreen); background:var(--ulfgreen-soft); border:2px solid var(--ulfgreen); border-radius:12px;
}
.fac-icon i{ font-size:1.2rem; }
.fac-link{ font-weight:700; color:var(--ulfgreen); text-decoration:none; }
.fac-item:hover .fac-link{ color:var(--ulfgreen-ink); }
.fac-item:hover .fac-icon{ background:var(--ulfgreen); color:#fff; border-color:var(--ulfgreen); transform:translateX(2px); }

/* خريطة */
.map-box{ height:280px; }
.map-box iframe{ width:100%; height:100%; border:0; }

/* ===== News Card Colors ===== */
.news-title{
  color: var(--primary);
}

.news-date{
  color: rgba(10,107,95,.75); /* أخضر فاتح */
}

.news-read{
  color: var(--primary);
  font-weight: 600;
}

.news-read:hover{
  text-decoration: underline;
}

/* ===== News Image (Top Focus) ===== */
.news-img-wrap{
  height: 220px;              /* ارتفاع ثابت للكرت */
  background: #7b5c8d;        /* لون احتياطي */
  overflow: hidden;           /* إخفاء الزائد */
}

.news-img-top{
  width: 100%;
  height: 100%;
  object-fit: cover;          /* يملأ بدون فراغ */
  object-position: top center;/* 👈 يركّز على الجزء العلوي */
  display: block;
}

/* ================== Arabic HERO professional ================== */
.lang-ar .hero-slide > .container{
  text-align: right;
  direction: rtl;
}

.lang-ar .hero-slide h1,
.lang-ar .hero-slide p{
  white-space: pre-line;   /* يحترم Enter من DB */
}

/* عنوان عربي أجمل */
.lang-ar .hero-slide h1{
  margin-bottom: .15rem !important;   /* مسافة صغيرة تحت العنوان */
  white-space: pre-line;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
  max-width: 920px;
}

/* وصف عربي مقروء */
.lang-ar .hero-slide p{
  margin-top: 0 !important;           /* يلغي أي مسافة فوق الوصف */
  white-space: pre-line;
  line-height: 1.8;
  font-weight: 500;
  max-width: 620px;
}

/* الأزرار من اليمين بالعربي */
.lang-ar .hero-slide .d-flex{
  justify-content: flex-start;
}

/* موبايل: وسط */
@media (max-width:768px){
  .lang-ar .hero-slide > .container{ text-align:center; }
  .lang-ar .hero-slide .d-flex{ justify-content:center; }
}

html.lang-ar #heroCarousel .hero-slide h1{
  margin: 0 0 .1rem 0 !important;
  padding: 0 !important;
}

html.lang-ar #heroCarousel .hero-slide p{
  margin: 0 !important;
  padding: 0 !important;
}

.whatsapp-fab{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
  z-index: 1050;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.whatsapp-fab svg{
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.whatsapp-fab:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0,0,0,.30);
  filter: brightness(1.03);
}

.whatsapp-fab:active{
  transform: translateY(0);
}

.whatsapp-fab::after{
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: rgba(37, 211, 102, .25);
  animation: waPulse 1.8s ease-out infinite;
  z-index: -1;
}

@keyframes waPulse{
  0%   { transform: scale(.75); opacity: .85; }
  100% { transform: scale(1.2); opacity: 0; }
}

/* ===============================
   WhatsApp Floating Button
   =============================== */

.whatsapp-fab{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
  z-index: 9999;
  text-decoration: none;
  transition: transform .15s ease,
              box-shadow .15s ease,
              filter .15s ease;
}

/* أيقونة واتساب */
.whatsapp-fab svg{
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* Hover effect */
.whatsapp-fab:hover{
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(0,0,0,.35);
  filter: brightness(1.05);
}

/* Pulse animation */
.whatsapp-fab::after{
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: rgba(37, 211, 102, .25);
  animation: whatsapp-pulse 1.8s infinite;
  z-index: -1;
}

@keyframes whatsapp-pulse{
  0%   { transform: scale(.8); opacity: .8; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Tooltip */
.whatsapp-tooltip{
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.85);
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.whatsapp-fab:hover .whatsapp-tooltip{
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}

/* Mobile optimization */
@media (max-width: 576px){
  .whatsapp-fab{
    width: 60px;
    height: 60px;
    right: 14px;
    bottom: 14px;
  }
  .whatsapp-fab svg{
    width: 28px;
    height: 28px;
  }
  .whatsapp-tooltip{
    display: none;
  }
}
/* ===== Engineering dropdown (fixed & clean) ===== */

/* خلي عنصر القائمة مثل باقي العناصر */
.fac-item-dropdown{
  display: flex;          /* مثل باقي fac-item غالباً */
  align-items: center;
  flex-wrap: wrap;        /* مهم: يسمح للـ submenu ينزل تحت */
}

/* زر التبديل: بدون أي ستايل افتراضي */
.fac-item-dropdown .fac-toggle{
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  font: inherit;                 /* أولاً */
  color: var(--ulfgreen);        /* لون نفس الباقي */
  font-weight: 700;              /* نفس .fac-link عندك */
  font-size: 1rem;               /* ثابت */

  flex: 0 1 auto;
}

/* شيل flex:1 لأنه كان سبب التمدد */
.fac-item-dropdown .fac-title{
  flex: 0 1 auto;
}

/* شيل أي Focus ring نهائياً */
.fac-item-dropdown .fac-toggle:focus,
.fac-item-dropdown .fac-toggle:focus-visible,
.fac-item-dropdown .fac-toggle:active{
  outline: none !important;
  box-shadow: none !important;
}

/* underline لطيف */
.fac-item-dropdown .fac-toggle:hover .fac-title,
.fac-item-dropdown .fac-toggle:focus-visible .fac-title{
  text-decoration: underline;
}

/* submenu ينزل تحت وبمحاذاة النص (بعد الأيقونة) */
.fac-item-dropdown .fac-submenu{
  width: 100%;                 /* ينزل سطر جديد */
  margin-top: .35rem;
  padding: 0;
  padding-inline-start: 3.2rem; /* نفس مساحة الأيقونة تقريباً */
}

/* روابط submenu */
.fac-item-dropdown .fac-sublink{
  display: block;
  padding: .18rem 0;
  text-decoration: none;
  color: #6c757d;
  font-size: .95rem;
}

.fac-item-dropdown .fac-sublink:hover{
  color: #0f6b3b;
  text-decoration: underline;
}

/* السهم */
.fac-item-dropdown .fac-caret{
  transition: transform .2s ease;
  opacity: .8;
  font-size: .9rem;
}

.fac-item-dropdown.open .fac-caret{
  transform: rotate(180deg);
}

/* تنظيف عام لأي fac-link حتى ما يطلع مربع */
.fac-list .fac-link{
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
}
/* ===== Programs cards (PRO) ===== */
.prog-card{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:14px 16px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  background:#fff;
  transition: .15s ease;
  height:100%;
}

.prog-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
  border-color: rgba(10,107,95,.20);
}

.prog-icon{
  width:48px;
  height:48px;
  flex:0 0 48px;
  display:grid;
  place-items:center;         /* ✅ يوسّط الأيقونة */
  border-radius:12px;
  background: rgba(10,107,95,.10);
  color: var(--primary);
}

.prog-icon i{ font-size:18px; line-height:1; }

.prog-body{ min-width:0; }     /* ✅ مهم للـ ellipsis */
.prog-title{
  margin:0;
  font-weight:800;
  color: var(--primary);
  text-decoration:none;
  line-height:1.25;

  /* ✅ يخلي العنوان سطرين كحد أقصى */
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.prog-sub{
  margin:4px 0 0;
  color: rgba(15,23,42,.65);
  font-size:.92rem;
  line-height:1.35;
  white-space:normal;
  overflow:visible;
}

/* RTL تحسين بسيط */
.lang-ar .prog-card{ flex-direction:row-reverse; text-align:right; }

/* content typography */
.content-pro h5{
  margin-top: 1.35rem;
  margin-bottom: .55rem;
  font-weight: 800;
  color: #0f172a;
}

.content-pro p{
  line-height: 1.8;
  color: rgba(15,23,42,.82);
  margin-bottom: .9rem;
}

.content-pro ul, .content-pro ol{
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

/* Mechanical table */
.me-table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
  background:#fff;
}

.me-table th{
  background:#f1c40f;
  color:#000;
  padding:10px 8px;
  border:2px solid #000;
  text-align:center;
  white-space:nowrap;
}

.me-table td{
  background:#dff6f8;
  border:1px solid #000;
  padding:8px 10px;
}

.me-table td.year,
.me-table td.semester{
  background:#cceff3;
  font-weight:800;
  text-align:center;
  white-space:nowrap;
}

.me-table td.ects{
  background:#f9e79f;
  text-align:center;
  font-weight:800;
  white-space:nowrap;
}

.me-table tr:hover td{ background:#bfe6eb; }

.me-table tr.semester-spacer td{
  height: 18px;
  background: transparent;
  border: none;
  padding: 0;
}
.me-table tr.semester-spacer:hover td{ background: transparent; }

.me-table tr.total-row td{
  background:#fff3b0;
  font-weight:800;
  border-top:3px solid #000;
}

.me-table tr.total-row td.total-label{
  text-align:left;
  padding-right:10px;
}

.me-table tr.total-row td.ects{
  background:#f1c40f;
  text-align:center;
  font-size:16px;
}



