
body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    
  }
  
  .gov-header {
    width: 100%;
  }
  
  .news-activities-section,
  .wrap,
  .activities-track,
  .institutions-track {
    direction: ltr;
  }
  /* Arabic */
  body.ar .box-title,
  body.ar .news-list,
  body.ar .news-list li,
  body.ar .activity-body {
    direction: rtl;
    text-align: right;
  }
  
  /* French & English */
  body.fr .box-title,
  body.en .box-title,
  body.fr .news-list li,
  body.en .news-list li,
  body.fr .activity-body,
  body.en .activity-body {
    direction: ltr;
    text-align: left;
  }
  /* For Arabic text in general */
  body.ar .box-title,
  body.ar .news-list,
  body.ar .news-list li,
  body.ar .activity-body {
    direction: rtl;  /* Arabic content in RTL */
    text-align: right;  /* Align text to the right */
  }
  
  /* For News section specifically in Arabic */
  body.ar .latest-news .label {
    text-align: right; /* "Latest News" label stays aligned to the right */
  }
  
  /* Force the news item text to appear from left to right */
  body.ar .latest-news .news-items {
    direction: ltr !important; /* Override news container */
  }
  
  body.ar .latest-news .news-item-text {
    direction: ltr !important; /* Force left-to-right for news text */
    text-align: left !important; /* Ensure news text is aligned left */
  }
  /* Force News Items to be Left to Right in Arabic */
  body.ar .latest-news .news-items {
    direction: ltr !important; /* Force LTR for news items */
  }
  
  body.ar .latest-news .news-item-text {
    direction: ltr !important; /* Force LTR for each news title */
    text-align: left !important; /* Ensure text is aligned to the left */
  }
  
  /* --- Top Part --- */
  /* ========================
     Top Government Bar
  ======================== */
  .gov-top {
    position: relative;
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:  
      url("../../images/bg_header.png") center/cover no-repeat;
    overflow: hidden;
    color: #fff;
    text-align: center;
    border-bottom: 5px solid #006233; /* deep green line for official look */
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }
  
  /* Flag background */
  .flag-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
    z-index: 0;
  }
  
  /* Government text in the middle */
  .gov-text {
    position: relative;
    z-index: 2;
  }
  
  .gov-text p {
    font-size: 1.3rem;
    margin: 0;
    font-weight: 500;
    letter-spacing: 1px;
    color: #f1f1f1;
  }
  
  .gov-text h1 {
    margin: 5px 0 0 0;
    font-size: 2.5rem;
    font-weight: 800;
    color:#b8860b;/*#8A7B1F*/
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
  }
  
  /* Emblem logo on the left */
  .emblem {
    position: absolute;
    right: 40px;
    width: 150px;
    height: auto;
    z-index: 2;
    transition: transform 0.4s ease;
  }
  
  .emblem:hover {
    transform: rotate(-5deg) scale(1.05);
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .gov-top {
      height: 150px;
      flex-direction: column;
      justify-content: center;
    }
  
    .emblem {
      position: static;
      width: 80px;
      margin-bottom: 10px;
    }
  
    .gov-text h1 {
      font-size: 1.8rem;
    }
  
    .gov-text p {
      font-size: 1rem;
    }
  }
  
  
  /* ==========================
     Navbar: 
  ========================== */
  .main-navbar {
    direction: ltr;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0b5fa5;
    padding: 0px 40px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: nowrap;
  }
  
  .gov-header {
    overflow: visible;
  }
  
  .main-navbar {
    transition: box-shadow 0.4s ease, background-color 0.4s ease;
  }
  
  .main-navbar.scrolled {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.45);
    background-color: #0b5fa5;
  }
  
  /* 🔹 Logo & Text */
  .nav-left {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    white-space: nowrap;
  }
  
  .nav-left img {
    width: 50px;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
  }
  
  .nav-left img:hover {
    transform: scale(1.08);
  }
  
  /* 🔹 Arabic Menu */
  .nav-menu {
    direction: rtl;
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
  }
  
  .nav-menu li {
    position: relative;
    white-space: nowrap;
  }
  
  .nav-menu a {
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    color: #fff;
    padding: 6px 4px;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    display: inline-block;
  }
  
  .nav-menu a.active {
    color: #b8860b;
    background: #ffffff;
    border-bottom: 2px solid #b8860b;
  }
  
  .nav-menu a:hover {
    color: #b8860b;
    background: #ffffff;
    border-bottom: 2px solid #b8860b;
  }
  
  /* 🔹 Dropdown Styling */
  .dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: #0b5fa5;
    border-radius: 8px;
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    z-index: 2000;
    animation: fadeIn 0.3s ease-in-out;
  }
  
  .dropdown-menu li {
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .dropdown-menu li:last-child {
    border-bottom: none;
  }
  
  .dropdown-menu a {
    display: block;
    padding: 10px 18px;
    font-size: 0.95rem;
    color: #fff;
    transition: background 0.3s ease, padding-right 0.3s ease;
    white-space: nowrap;
  }
  
  .dropdown-menu a:hover {
        background: #ffffff;
        color: #b8860b;
  }
  
  /* 🔹 Show dropdown on hover */
  .dropdown:hover > .dropdown-menu {
    display: block;
  }
  
  /* 🔹 Submenu (second-level dropdown) */
  .dropdown-sub {
    position: relative;
  }
  
  .dropdown-submenu {
    display: none;
    position: absolute;
    top: 0;
    right: 100%;
    background: #0b5fa5;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    z-index: 2100;
    animation: fadeIn 0.3s ease forwards;
    margin:0;
    padding:0;
    list-style: none;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
  }
  
  .dropdown-sub:hover > .dropdown-submenu {
    display: block;
  }
  
  .dropdown-submenu li a {
    padding: 10px 18px;
    font-size: 0.9rem;
  }
  
  .dropdown-submenu li a:hover {
        background: #ffffff;
        color: #b8860b;
  }
  
   /* ✨ Fade-down animation */
      @keyframes fadeDown {
        from {
          opacity: 0;
          transform: translateY(-8px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
  
  /* 🔹 Responsive Navbar */
  @media (max-width: 992px) {
    .main-navbar {
      flex-direction: column;
      align-items: center;
      padding: 10px 20px;
    }
  
    .nav-menu {
      flex-wrap: wrap;
      justify-content: center;
      gap: 15px;
      margin-top: 10px;
    }
  
    .nav-left {
      margin-bottom: 10px;
    }
  
    .nav-left img {
      width: 50px;
    }
  
    .dropdown-menu,
    .dropdown-submenu {
      position: static;
      display: none;
      box-shadow: none;
      background: rgba(0, 58, 104, 0.95);
      border-radius: 6px;
    }
  
    .dropdown:hover > .dropdown-menu,
    .dropdown-sub:hover > .dropdown-submenu {
      display: block;
    }
  
    .dropdown-menu a,
    .dropdown-submenu a {
      text-align: center;
    }
  }
  
  
  
  
  /* ==========================
     Gorgeous Modern Search Bar
  ========================== */
  .search-bar {
    position: relative;
    width: 1275px;
    margin: 10px auto;
    display: flex;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
      text-align: right; /* ✅ already good */
    direction: rtl;    /* ✅ enforce RTL for Arabic */
  }
  
  .search-bar:hover {
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5);
  }
  
  .search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    direction: rtl;
    background: transparent;
  }
  
  .search-bar button {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    border: none;
    width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
  }
  
  .search-bar button:hover {
    background: linear-gradient(135deg, #ffd700, #daa520);
  }
  
  .search-bar button i {
    color: #fff;
    font-size: 18px;
    animation: spinGlow 3s infinite linear;
  }
  
  /* Looping glowing animation */
  @keyframes spinGlow {
    0% {
      transform: rotate(0deg);
      text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    50% {
      transform: rotate(180deg);
      text-shadow: 0 0 20px rgba(255, 215, 0, 0.9);
    }
    100% {
      transform: rotate(360deg);
      text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
  }
  
  
      /* ===== NEWS BAR ===== */
    .latest-news {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #004d40;
    color: #fff;
    padding: 10px 20px;
    border-top: 3px solid #b8860b;
    border-bottom: 3px solid #b8860b;
    position: relative;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
  }
  
  /* ===== LABEL ===== */
  .latest-news .label {
    background: red;
    color: #fff;
    padding: 5px 15px;
    border-radius: 25px;
    font-weight: bold;
    white-space: nowrap;
  }
  
  /* ===== CONTAINER ===== */
  .news-container {
    overflow: hidden;
    flex: 1;
    position: relative;
  }
  
  /* ===== NEWS TEXT ===== */
  .news-items {
    display: inline-flex;
    white-space: nowrap;
  }
  
  .news-items span {
    display: inline-block;
    padding: 0 20px;
    font-size: 17px;
  }
  
  /* ===== Golden Square Separator ===== */
  /* RTL (Arabic) - Golden square appears on the right */
  .latest-news.rtl-news .news-items span::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #b8860b; /* Golden color */
    margin: 0 10px;
    border-radius: 2px; /* Optional: to create a small square with rounded corners */
  }
  
  /* LTR (English/French) - Golden square appears on the left */
  .latest-news.ltr-news .news-items span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #b8860b; /* Golden color */
    margin: 0 10px;
    border-radius: 2px; /* Optional: to create a small square with rounded corners */
  }
  
  /* ===== PAUSE AND ANIMATION ===== */
  .news-items:hover {
    animation-play-state: paused;
  }
  
  /* ===== CONTROLS ===== */
  .controls {
    display: flex;
    gap: 5px;
  }
  
  .controls button {
    background: transparent;
    border: 2px solid #b8860b;
    color: #b8860b;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .controls button:hover {
    background: gold;
    color: #004d40;
  }
  
  /* ================= RTL MODE (ARABIC) ================= */
  .latest-news.rtl-news {
    direction: rtl;
  }
  
  .latest-news.rtl-news .label {
    margin-left: 15px;
  }
  
  .latest-news.rtl-news .controls {
    margin-right: 10px;
  }
  
  .latest-news.rtl-news .news-items {
    animation: scrollRTL 40s linear infinite;
  }
  
  /* ================= LTR MODE (EN/FR) ================= */
  .latest-news.ltr-news {
    direction: ltr;
  }
  
  .latest-news.ltr-news .label {
    margin-right: 15px;
  }
  
  .latest-news.ltr-news .controls {
    margin-left: 10px;
  }
  
  .latest-news.ltr-news .news-items {
    animation: scrollLTR 60s linear infinite; 
  }
  
  /* ===== ANIMATIONS ===== */
  
  /* Arabic: left → right */
  @keyframes scrollRTL {
    0%   { transform: translateX(-70%); }
    100% { transform: translateX(100%); }
  }
  
  /* English/French: right → left */
  @keyframes scrollLTR {
    0%   { transform: translateX(50%); }
    100% { transform: translateX(-100%); }
  }
  
  /* ===== Pause on hover ===== */
  .news-items:hover {
    animation-play-state: paused;
  }
  
  /* ===== Responsive ===== */
  @media(max-width:768px){
    .news-items span {
      font-size: 14px;
      padding: 0 20px;
    }
  }
  
  
  
  /* ===== Modern Slider Styles ===== */
  .slider-section {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 85vh;
    border-bottom: 4px solid #b8860b;
     z-index: 1;  /* ✅ below navbar */
  }
  
  .slider {
    position: relative;
    height: 100%;
  }
  
  .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease;
  }
  
  .slide.active {
    opacity: 1;
    z-index: 2;
  }
  
  .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(70%);
    transform: scale(1.1);
    transition: transform 10s ease;
  }
  
  .slide.active img {
    transform: scale(1);
  }
  
  .caption {
    position: absolute;
    bottom: 80px;
    right: 50px;
    color: #fff;
    text-align: right;
    background: rgba(0, 0, 0, 0.45);
    padding: 20px 35px;
    border-radius: 12px;
    max-width: 550px;
    border-right: 4px solid #b8860b;
  }
  
  .caption h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #b8860b;
  }
  
  .caption p {
    font-size: 16px;
    line-height: 1.7;
  }
  
  /* Arrows */
  .slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #b8860b;
    color: #b8860b;
    padding: 14px 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    font-size: 22px;
    z-index: 3;
  }
  
  .slider-btn:hover {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #004d40;
    transform: translateY(-50%) scale(1.1);
  }
  
  .slider-btn.prev {
    left: 20px;
  }
  
  .slider-btn.next {
    right: 20px;
  }
  
  /* Dots */
  .slider-dots {
    position: absolute;
    bottom: 25px;
    right: 50%;
    transform: translateX(50%);
    display: flex;
    gap: 10px;
  }
  
  .slider-dots span {
    width: 12px;
    height: 12px;
    background: rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
  }
  
  .slider-dots span.active {
    background: gold;
    transform: scale(1.3);
  }
   
  /* 🔹 Section Title (رؤية الوزارة) */
  
  .vision-section {
    background: linear-gradient(135deg, #d4af37, #b8860b, #c5a94d);
    color: #fff;
    overflow: hidden;
    padding: 40px 0;
    margin-top: 40px;
  }
  
  /* Container */
  .trailer-container {
    display: flex;
    align-items: center; /* Ensures both the text and image are aligned vertically */
    justify-content: space-between; /* Adds space between text and image */
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    gap: 20px;
  }
  
  /* Image */
  .trailer-image {
    flex: 1;
    min-width: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 20px;
  }
  
  .trailer-image img {
    width: 100%;
    max-width: 350px; /* Adjusts max width for better control */
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.6s ease;
  }
  
  .trailer-image img:hover {
    transform: scale(1.05);
  }
  
  /* Text */
  .trailer-text {
    flex: 1;
    min-width: 350px;
    text-align: right;
    direction: rtl;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: slideInRight 1.5s ease-out;
  }
  
  .trailer-text h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-right: 15px;
    padding-left: 15px;
    transition: all 0.3s ease; /* Smooth transition for border change */
  }
  
  .trailer-text[style*="direction: rtl"] h3 {
    border-left: 5px solid #fff; /* Line appears before text in RTL */
    padding-left: 20px; /* Adjust padding for better positioning */
    padding-right: 0; /* Remove padding on the right */
  }
  
  .trailer-text[style*="direction: ltr"] h3 {
    border-right: 5px solid #fff; /* Line appears after text in LTR */
    padding-right: 20px; /* Adjust padding for better positioning */
    padding-left: 0; /* Remove padding on the left */
  }
  
  .trailer-text p {
    font-size: 1.2rem;
    line-height: 1.9;
    color: #fff;
    font-weight: 400;
    margin-top: 0;
    letter-spacing: 0.5px;
    text-align: justify; /* Aligns the paragraph for a cleaner layout */
  }
  
  /* ✨ Animations */
  @keyframes glowText {
    0% { text-shadow: 0 0 5px #fff, 0 0 10px #ffe08a; }
    100% { text-shadow: 0 0 15px #fff6b5, 0 0 30px #fff3a0; }
  }
  
  @keyframes underlineGlow {
    0% { box-shadow: 0 0 10px #fff, 0 0 20px #ffef9f; }
    100% { box-shadow: 0 0 25px #fff3a0, 0 0 40px #ffe08a; }
  }
  
  @keyframes slideInRight {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .trailer-container {
      flex-direction: column;
      align-items: center; /* Centers content for small screens */
    }
  
    .trailer-text {
      text-align: center;
      padding: 30px 20px;
    }
  
    .trailer-text h3 {
      border: none;
    }
  
    .trailer-image img {
      max-width: 100%; /* Ensures image adapts well */
    }
  }
  
  /* ===== Modern News & Activities Section ===== */
  @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');
  
  .news-activities-section {
    background: #f7fbfd;
    padding: 28px 0 36px;
    font-family: 'Cairo', sans-serif;
    color: #123;
  }
  
  .wrap {
    width: 95%;
    margin: 0 auto;
    display: flex;
    gap: 22px;
    align-items: flex-start;
    box-sizing: border-box;
  }
  
  /* column widths */
  .col { box-sizing: border-box; }
  .left-col { width: 30%; min-width: 260px; }    /* news + campaign */
  .right-col { width: 70%; }
  
  /* common box look */
  .box {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(10, 35, 50, 0.05);
    border: 1px solid rgba(3,63,97,0.06);
    margin-bottom: 18px;
  }
  
  /* titles */
  .box-title {
    color: #004b87;
    margin: 0 0 12px 0;
    font-weight: 700;
    font-size: 24px;
    padding-bottom: 8px;
    border-bottom: 3px solid #b8860b;
  }
  
  /* --- Left: news list --- */
  .news-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .news-list li {
    font-size: 14px;
    padding: 10px 0;
    color: #223;
    position: relative;
    line-height: 1.45;
    border-left: 3px solid transparent;
    text-align: right; /* ✅ already good */
  }
  .news-list li::before {
    content: "\2022";
    color: #009444;
    position: absolute;
  
    top: 12px;
    font-size: 18px;
    transform: translateX(0);
  }
  /* Arabic bullets */
  body.ar .news-list li {
    padding-right: 26px;
    padding-left: 0;
  }
  body.ar .news-list li::before {
    right: 6px;
    left: auto;
  }
  
  /* LTR bullets */
  body.fr .news-list li,
  body.en .news-list li {
    padding-left: 26px;
    padding-right: 0;
  }
  body.fr .news-list li::before,
  body.en .news-list li::before {
    left: 6px;
    right: auto;
  }
  /* Arabic */
  body.ar .box-title {
    text-align: right;
  }
  
  /* LTR */
  body.fr .box-title,
  body.en .box-title {
    text-align: left;
  }
  body.ar .prev-acts {
    transform: rotate(180deg);
  }
  body.ar .next-acts {
    transform: rotate(180deg);
  }
  .activity-body {
    padding: 12px;
  }
  
  /* Arabic text */
  body.ar .activity-body {
    text-align: right;
    direction: rtl;
  }
  
  /* LTR text */
  body.fr .activity-body,
  body.en .activity-body {
    text-align: left;
    direction: ltr;
  }
  
  /* campaign image */
  .campaign-img {
    width: 100%;
    display: block;
    margin-top: 14px;
    border-radius: 6px;
    object-fit: cover;
    margin-bottom: 5px;
  }
  
  /* --- Right: activities --- */
  .activities-box { margin-bottom: 18px; }
  .activities-viewport {
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    padding: 6px;
  }
  .activities-track {
    display: flex;
    gap: 14px;
    transition: transform 450ms cubic-bezier(.2,.9,.2,1);
    will-change: transform;
  }
  
  /* Each card width — since 2 should be visible: make each card roughly 50% minus gap */
  .activity-card {
    background: linear-gradient(180deg,#fff,#fbfdff);
    border-radius: 8px;
    flex: 0 0 calc(50% - 7px);
    box-shadow: 0 6px 18px rgba(3,63,97,0.04);
    overflow: hidden;
    border: 1px solid rgba(0,77,135,0.04);
    display: flex;
    flex-direction: column;
  }
  .activity-card img {
    width: 100%;
    height: 90%;
    object-fit: cover;
  }
  .activity-body {
    padding: 12px;
    text-align: right;
  }
  .activity-title {
    margin: 0 0 8px;
    font-weight: 600;
    color: #003a68;
    font-size: 15px;
  }
  .activity-date {
    display: inline-block;
    background: #00864b;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
  }
  
  /* activities controls: arrows below (manual) */
  .activities-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
  }
  .act-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #00864b;
    color: #fff;
    box-shadow: 0 6px 12px rgba(0,0,0,0.06);
    cursor: pointer;
    font-size: 18px;
    transition: transform .18s ease, background .18s ease;
  }
  .act-arrow:hover { transform: translateY(-3px); background: #004b87; color: #fff; }
  
  /* pager (shows which page/pair you're on) */
  .act-pager {
    font-size: 13px;
    color: #666;
  }
  
  /* --- Institutions carousel (auto scroll) --- */


  .institutions-box{
    margin-top:10px;
  }
  
  /* viewport */
  .institutions-viewport{
    overflow:hidden;
    padding:12px 6px;
  }
  
  /* track */
  .institutions-track{
    display:flex;
    gap:22px;
    align-items:center;
    transition:transform 0.35s linear;
    will-change:transform;
  }
  
  /* link wrapper */
  .institutions-track a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
  }
  
  /* logo card */
  .inst-logo{
    width:95px;
    height:auto;
    max-height:100px;
    display:block;
  
    padding:8px;
    border-radius:10px;
    background:#ffffff;
  
    /* modern soft shadow */
    box-shadow:0 8px 22px rgba(0,0,0,0.06);
  
    /* modern grayscale effect */
    filter:grayscale(40%);
    opacity:0.85;
  
    transition:
      transform .35s cubic-bezier(.4,.0,.2,1),
      filter .3s ease,
      opacity .3s ease,
      box-shadow .3s ease;
  }
  
  /* hover effect */
  .inst-logo:hover{
    filter:grayscale(0%);
    opacity:1;
  
    transform:translateY(-6px) scale(1.05);
  
    box-shadow:0 14px 28px rgba(0,0,0,0.12);
  }
  .inst-logo:hover{
    box-shadow:
      0 14px 28px rgba(0,0,0,0.12),
      0 0 0 1px rgba(0,74,128,0.08);
  }
  .institutions-track{
    scroll-behavior:smooth;
  }

  /* small screens: stack nicely */
  @media (max-width: 980px) {
    .wrap { flex-direction: column; gap: 16px; }
    .left-col, .right-col { width: 100%; }
    .activity-card img { height: 140px; }
    .inst-logo { width: 70px; }
  }
  
  
  /* servicess of the ministery */
  
  .services-section {
    background: #f5f9fc;
    padding: 50px 20px;
    text-align: center;
    direction: rtl;
   font-family: 'Cairo', sans-serif;
  }
  
  .services-section .container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    max-width: 1300px;
    margin: auto;
  }
  .services-box-title {
    color: #004b87;
    font-weight: 700;
    font-size: 24px;
    display: inline-block; /* ✅ underline only under text */
    padding-bottom: 6px;
    border-bottom: 3px solid #b8860b;
    direction: rtl;
    text-align: right;
    margin-right: -860px; /* ✅ adds space from the right edge */
    margin-bottom: 25px; /* adds space below the title */
  }
  
  
  .service-box {
    grid-column: span 1;
    height: 260px;
    position: relative;
    perspective: 1000px;
    cursor: pointer;
  }
  
  /* Double size for large ones */
  .service-box.large {
    grid-column: span 2;
    height: 300px;
  }
  
  /* Inner box */
  .service-box .inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s ease;
    transform-style: preserve-3d;
  }
  
  /* Flip on hover */
  .service-box:hover .inner {
    transform: rotateY(180deg);
  }
  
  /* Faces */
  .service-box .front,
  .service-box .back {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    overflow: hidden;
    backface-visibility: hidden;
  }
  
  .service-box .front {
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.1rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    padding: 10px;
  }
  
  .service-box .back {
    background: #0b5fa5;
    color: #fff;
    transform: rotateY(180deg);
    padding: 15px;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  /* ✅ External button under box */
  .service-box .btn {
    display: inline-block;
    margin-top: 10px;
    background: #b8860b;
    color: #fff;
    padding: 6px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
    font-weight: 500;
  }
  
  .service-box .btn:hover {
    background: #0077b6;
  }
  .service-box .external-btn {
    display: inline-block;
    margin-top: 10px;
    background: #b8860b;
    color: #fff;
    padding: 5px 35px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
    font-weight: 500;
  }
  
  .service-box .external-btn:hover {
    background: #0077b6;
  }
  
  
  .buttons-row {
    margin-top: 35px;
  }
  
  .main-btn {
    background: #0077b6;
    color: white;
    padding: 10px 26px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    transition: 0.3s;
  }
  
  .main-btn:hover {
    background: #005f8a;
  }
  
  /* Responsive */
  @media (max-width: 1100px) {
    .services-section .container {
      grid-template-columns: 1fr 1fr 1fr;
    }
    .service-box.large {
      grid-column: span 2;
    }
  }
  
  @media (max-width: 768px) {
    .services-section .container {
      grid-template-columns: 1fr;
    }
  }
  /* 🔹 Section Title */
  .flip-title {
    color: #004b87;
    font-weight: 700;
    font-size: 24px;
    padding-bottom: 8px;
    border-bottom: 3px solid #b8860b;
    text-align: right;
    direction: rtl;
    width: fit-content;
    margin: -60px auto 30px 80px; /* move title slightly inward */
  }
  
  /* Section Container */
  .info-boxes {
    text-align: center;
    padding: 100px 5%;
    background: #f9f9f9;
  }
  
  /* Section Title */
  .info-boxes .section-title {
    font-size: 36px;
     color: #004b87;
    font-weight: 800;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
  }
  
  .info-boxes .section-title::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #b8860b, #f7e27b);
    border-radius: 3px;
  }
  
  /* Boxes Layout */
  .info-boxes .boxes {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
  }
  
  /* Flip Box Container */
  .flip-box {
    flex: 1;
    min-width: 300px;
    height: 320px; /* Reduced height */
    perspective: 1200px;
    border-radius: 20px;
    position: relative;
    overflow: hidden; /* 💡 Prevents overlap */
    z-index: 1;
  }
  
  .flip-box-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease;
    transform-style: preserve-3d;
  }
  
  .flip-box:hover .flip-box-inner {
    transform: rotateY(180deg);
  }
  
  /* Front and Back */
  .flip-box-front, .flip-box-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
    transition: all 0.5s ease;
  }
  
  /* Front Side */
  .flip-box-front {
    background-size: cover;
    background-position: center;
    color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    z-index: 2;
  }
  
  .flip-box-front h3 {
    font-size: 24px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 20px;
    border-radius: 10px;
  }
  
  /* Back Side */
  .flip-box-back {
    background: linear-gradient(135deg, #b8860b, #f7e27b);
    color: #333;
    transform: rotateY(180deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  }
  
  .flip-box-back h3 {
    font-size: 24px;
    color: #004c3f;
    margin-bottom: 15px;
  }
  
  .flip-box-back p {
    font-size: 16px;
    color: #222;
    line-height: 1.6;
    max-width: 80%;
    margin: 0 auto 20px;
  }
  
  .gold-btn {
    display: inline-block;
    background: #004c3f;
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
  }
  
  .gold-btn:hover {
    background: #b8860b;
    color: #004c3f;
  }
  
  /* Responsive Design */
  @media (max-width: 992px) {
    .info-boxes .boxes {
      flex-direction: column;
      align-items: center;
    }
  
    .flip-box {
      width: 90%;
      height: 300px;
    }
  
    .flip-box-front h3,
    .flip-box-back h3 {
      font-size: 22px;
    }
  }
  .water-stats {
    position: relative;
    background: linear-gradient(135deg, #66bb8f, #4caf7a);
  
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    overflow: hidden;
  }
  
  .water-stats::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../../images/4bbdb4cf84ac1f76a4d8d1a52e227325.png') no-repeat center center;
    background-size: 65%;
    opacity: 0.10;
    z-index: 0;
    animation: mapGlow 10s ease-in-out infinite alternate;
  }
  
  @keyframes mapGlow {
    0% { opacity: 0.08; transform: scale(1); }
    100% { opacity: 0.16; transform: scale(1.05); }
  }
  .water-stats .container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: auto;
  }
  
  .water-stats::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.08), transparent 70%);
    z-index: 0;
  }
  
  .water-stats .overlay {
    position: absolute;
    inset: 0;
  
    z-index: 0;
  }
  
  .water-stats .container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: auto;
  }
  
  
  /* 🌊 Title for Water Stats Section */
  .section-title  {
    color: #b8860b; /* golden tone for visibility on green */
    margin: 0 0 25px 0;
    font-weight: 700;
    font-size: 28px;
    padding-bottom: 8px;
    border-bottom: 3px solid rgba(255, 215, 0, 0.9);
    text-align: right;
    direction: rtl;
    position: relative;
    z-index: 2;
    display: inline-block;
  }
  
  /* Add a glowing underline effect */
  .section-title::after {
    content: "";
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to left, #b8860b, #ffffff80);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  }
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(15px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .section-title {
    animation: fadeInUp 1s ease forwards;
  }
  
  
  .stats-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .stat-box {
    flex: 1;
    min-width: 260px;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }
  
  .stat-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    transition: 0.4s;
  }
  
  .stat-box:hover::after {
    background: rgba(0,0,0,0.3);
  }
  
  .stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  }
  
  .stat-box .content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .stat-box .count {
    font-size: 2.5rem;
    font-weight: bold;
    color: #b8860b;
    transition: color 0.3s;
  }
  
  .stat-box h1 {
    font-size: 1.2rem;
    margin-top: 10px;
    color: #fff;
  }
  
  @media (max-width: 768px) {
    .stats-grid {
      flex-direction: column;
      align-items: center;
    }
    .stat-box {
      width: 90%;
    }
  }
  
  
     /* 🌍 Modern CTA with parallax background */
  .cta {
    position: relative;
    height: 350px; /* smaller height */
    background: url("../../images/cta_resized_800x600.jpg") center center / cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: #fff;
    font-family: 'Cairo', sans-serif;
  }
  
  /* Dark transparent overlay */
  .cta-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: brightness(0.9);
    z-index: 1;
  }
  
  /* Text content */
  .cta-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 20px;
  }
  
  .cta-content h3 {
      font-size: 2.2rem;
    color: #b8860b;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
  
  }
  
  .cta-content p {
    font-size: 1.1rem;
    color: #f3f3f3;
    line-height: 1.8;
    margin-bottom: 30px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
  }
  
  /* Modern Button */
  .cta-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #b8860b;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.4s;
    box-shadow: 0 0 15px rgba(255,215,0,0.4);
  }
  
  .cta-btn:hover {
    background: #fff;
    color: #004b87;
    box-shadow: 0 0 25px rgba(255,215,0,0.8);
  }
  
  /* Parallax smooth scroll effect */
  .cta {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .cta {
      height: 250px;
      background-attachment: scroll; /* disable parallax on mobile for performance */
    }
    .cta-content h3 {
      font-size: 1.5rem;
    }
    .cta-content p {
      font-size: 1rem;
    }
  }



  /* Language bar placed top-right without changing your layout */
  .top-lang-bar {
    position: absolute;
    top: 12px;
    right: 18px;
    z-index: 999;
    font-weight: 600;
     color: #b8860b; /*#8A7B1F*/
  }
  /* for RTL, place language bar top-left instead */
  [dir="rtl"] .top-lang-bar { right: 18px; left: auto; text-align: right; }
  [dir="ltr"] .top-lang-bar { right: 18px; left: auto; text-align: right; }
  .top-lang-bar a { color: #b8860b;; text-decoration:none; margin: 0 6px; }/*#8A7B1F*/
  .top-lang-bar a:hover { text-decoration:underline; }

  /* 🔹 Navbar font fix for FR & EN only */
  body.fr .nav-menu a{
    font-size: 1.05rem !important;
    font-weight: 500 !important;
  }
  
  body.en .nav-menu a {
    font-size: 1.05rem !important;
    font-weight: 500 !important;
  }
  /* Optional: keep Arabic navbar as is (stronger look) */
  body.ar .nav-menu a {
    font-size: 1.05rem;
    font-weight: 500;
  }

  .activity-link{
    text-decoration:none;
    color:inherit;
  }
  .activity-link:hover .activity-title{
    text-decoration:underline;
  }
  .news-list li{
    margin-bottom:10px;
  }
  
  .news-link{
    color:#004a80;
    text-decoration:none;
    font-weight:500;
    transition:color .2s ease;
  }
  
  .news-link:hover{
    color:#b8860b;
    text-decoration:underline;
  }
  
  .news-box {
    max-height: 450px;        /* adjust as you like */
    display: flex;
    flex-direction: column;
  }
  
  .scrollable-news {
    overflow-y: auto;         /* vertical scroll */
    overflow-x: hidden;
    padding-right: 6px;       /* space for scrollbar */
  }
  
  /* Optional: nicer scrollbar (modern browsers) */
  .scrollable-news::-webkit-scrollbar {
    width: 6px;
  }
  
  .scrollable-news::-webkit-scrollbar-thumb {
    background-color: #b8860b;
    border-radius: 4px;
  }
  
  .scrollable-news::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  /* ============ Modern Footer ============ */
/* ==========================================
   MODERN FOOTER
========================================== */

.modern-footer {
  background: #0b5fa5;
  color: #eee;
  padding: 40px 0 20px;
  font-family: 'Cairo', sans-serif;
}

/* Language direction */
.modern-footer.ar {
  direction: rtl;
  text-align: right;
}

.modern-footer.fr,
.modern-footer.en {
  direction: ltr;
  text-align: left;
}

/* Layout */
.footer-content {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-top div {
  flex: 1;
  min-width: 250px;
}

/* Titles */
.footer-top h4 {
  color: #b8860b;
  font-size: 20px;
  margin-bottom: 15px;
  border-bottom: 2px solid #b8860b;
  display: inline-block;
  padding-bottom: 5px;
}

/* Paragraphs & Lists */
.footer-top p,
.footer-top ul {
  color: #ccc;
  line-height: 1.8;
  font-size: 15px;
  margin: 0;
  padding: 0;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links a {
  text-decoration: none;
  color: #ccc;
  transition: 0.3s;
}

.footer-links a:hover {
  color: #b8860b;
  padding-right: 5px;
}

/* Map */
.footer-map {
  margin: 30px auto;
  max-width: 1000px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.25);
}

.footer-map iframe {
  width: 100%;
  height: 220px;
  border: 0;
}

/* Social Icons */
.footer-social {
  margin: 20px 0;
  text-align: center;
}

.social-icon {
  display: inline-block;
  margin: 0 10px;
  color: #b8860b;
  font-size: 22px;
  transition: 0.4s ease;
}

.social-icon:hover {
  color: #fff;
  transform: scale(1.2);
}

/* Bottom */
.footer-bottom {
  border-top: 1px solid #444;
  margin-top: 20px;
  padding-top: 15px;
  text-align: center;
}

.footer-bottom p {
  font-size: 14px;
  color: #bbb;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    text-align: center !important;
  }

  .footer-map iframe {
    height: 250px;
  }
}
