/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,
body {
    overflow-x: hidden;
}
img,
iframe,
video,
table {
    max-width: 100%;
    height: auto;
    display: block;
}
.hero-slider,
.footer-pattern {
    width: 100%;
    margin-left: 0 !important;
}

/* ===== FONT FACES - محسنة ===== */
@font-face {
    font-family: "Montserrat-Arabic-Bold";
    src: url("../fonts/Montserrat-Arabic-Light.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat-Arabic-Light";
    src: url("../fonts/Montserrat-Arabic-Light.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat-Arabic-Medium";
    src: url("../fonts/Montserrat-Arabic-Medium.ttf") format("truetype");
    font-weight: 410;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Azer Bold";
    src: url("../fonts/29LT-Azer-Bold (1).otf") format("opentype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "29LT-Azer-Bold";
    src: url("../fonts/29LT-Azer-Bold.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "29LT-Azer-Bold (1)";
    src: url("../fonts/29LT-Azer-Bold (1).otf") format("opentype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "MontserratArabicLight";
    src: url("../fonts/Montserrat-Arabic-Light.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===== NAVIGATION STYLES ===== */
.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
    position: relative;
}
.nav-link-wrapper {
    position: relative;
}
.nav-link {
    display: inline-block;
    transition: transform 0.3s ease;
    text-decoration: none; /* إضافة هذا السطر لإزالة الخط الأزرق */
}

.nav-link:hover {
    transform: scale(1.1);
}
.nav-icon {
    width: 60px;
    height: auto;
    filter: grayscale(100%) brightness(0.7);
    transition: filter 0.3s ease, border 0.3s ease, padding 0.3s ease;
}
.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
    filter: none;
}
.nav-link-wrapper:hover .nav-link .nav-icon {
    filter: none;
    border: 2px solid #fcfcfc;
    border-radius: 8px;
    padding: 2px;
}
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%);
    padding: 12px 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    list-style: none;
    z-index: 1000;
    min-width: 180px;
    text-align: center;
    font-family: "Foda Naskh", "Tajawal", sans-serif;
    background-color: #f9f5ee;
    border: 1px solid #2c3e50;
    backdrop-filter: blur(6px);
}
.dropdown li {
    margin: 8px 0;
}
.dropdown li a {
    color: #0a2c38;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease, background-color 0.3s ease;
    display: block;
    padding: 4px 8px;
    border-radius: 6px;
}
.dropdown li a:hover {
    color: #f8f8f8;
    font-weight: bold;
    background-color: #2c3e50;
}
.nav-link-wrapper:hover .dropdown {
    display: block;
}
/* .header.scrolled .nav-link-wrapper .dropdown {
    background-color: #fff;
} */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  background-color: transparent;
  backdrop-filter: none;
}

/* ===== Header Scroll State ===== */
.header.scrolled {
  background-color: #2F3C69;
  backdrop-filter: blur(8px);
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

/* ===== HERO SECTION ===== */

/* ===== NEWS SECTION ===== */
.news-title {
    font-family: "Azer Bold", sans-serif;
    font-weight: 900;
    font-size: 28px;
    color: #0a2c38;
    line-height: 1.6;
    letter-spacing: -0.5px;
    border-bottom: 2px solid #8a8a8a;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 25px;
}
.news-lead {
    font-family: "Azer Bold", "Tajawal", sans-serif;
    font-size: 35px;
    font-weight: 400;
    line-height: 1.2;
}
.news-lead1 {
    font-family: "Azer Bold", sans-serif;
    font-weight: 900;
    font-size: 22px;
    color: #0a2c38;
    line-height: 1.6;
    letter-spacing: -0.5px;
}
.news-text {
    font-family: "MontserratArabicLight", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.8;
    color: #2c3e50;
    text-align: justify;
}

/* ===== PUBLICATIONS SECTION ===== */
.publication-text {
    font-family: "Montserrat-Arabic-Medium", sans-serif;
    font-weight: normal;
    font-size: 12px;
    line-height: 1.5;
    color: #2a2a2a;
}
.publication-title {
    font-size: 22px;
    font-weight: 500;
    font-family: "29LT-Azer-Bold (1)", "Tajawal", sans-serif;
}
.cta-link {
    text-decoration: none;
}

/* ===== PROJECTS SECTION ===== */
.project-text {
    font-family: "Montserrat-Arabic-Medium", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #2a2a2a;
    line-height: 2;
    text-align: justify;
}
.project-title {
    font-size: 22px;
    font-weight: 500;
    font-family: "29LT-Azer-Bold (1)", "Tajawal", sans-serif;
}

/* ===== VIDEO SECTION ===== */
.video-caption {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(100, 100, 100, 0.5);
    color: white;
    font-size: 22px;
    font-weight: bold;
    padding: 6px 12px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    display: inline-block;
    white-space: nowrap;
    line-height: 1.4;
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter-section {
    margin-top: 40px;
}
.newsletter-form {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.newsletter-input {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    flex: 1 1 250px;
    max-width: 300px;
}
.newsletter-button {
    padding: 12px 24px;
    background-color: #2c2c2b02;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.newsletter-button:hover {
    background-color: #2c2c2b02;
}
.newsletter-success {
    background-color: #b4792c;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    text-align: center;
    transition: opacity 0.5s ease;
}
.newsletter-error {
    background-color: #e74c3c;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    text-align: center;
    transition: opacity 0.5s ease;
}
.hidden {
    display: none;
}

/* ===== FOOTER SECTION ===== */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    direction: rtl;
    gap: 50px;
    padding-top: 30px;
    padding-bottom: 20px;
}
.footer-logo {
    text-align: right;
}
.footer-contact {
    text-align: left;
    margin-inline-start: auto;
    padding-left: 60px;
}
.footer-logo-img {
    max-width: 140px;
    margin-bottom: 10px;
}
.footer-description {
    font-size: 15px;
    color: #2c3e50;
    line-height: 1.8;
    text-align: justify;
    font-family: "Montserrat-Arabic-Medium", sans-serif;
}
.contact-item {
    margin-bottom: 10px;
    font-size: 15px;
    color: #2c3e50;
}
.contact-item i {
    margin-left: 8px;
    color: #0a2c38;
}
.copyright {
    margin-top: 15px;
    font-size: 14px;
    color: #444;
}
.footer-pattern {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0;
    background-color: #fefdfb;
}
.footer-pattern img.pattern-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
img {
    will-change: transform;
}
.slide-bg {
    object-fit: cover;
    object-position: center;
}
video {
    object-fit: cover;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-logo,
    .footer-contact {
        text-align: center;
        margin: 0;
        padding-left: 0;
    }
    .contact-item i {
        margin-left: 5px;
    }
}
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
}

/* ===== CRITICAL CSS INLINED ===== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.d-flex {
    display: flex;
}
.justify-content-between {
    justify-content: space-between;
}
.align-items-center {
    align-items: center;
}
.flex-wrap {
    flex-wrap: wrap;
}
.gap-3 {
    gap: 1rem;
}


.nav-link {
  position: relative;
  color: white;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;   /* مسافة تحت النص */
  right: 0;
  left: 0;
  height: 2px;
  background-color: white;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Videos Section */
.videos-section {
  padding: 80px 0;
  background: #faf9f6;
}

.videos-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}

.videos-left-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.videos-right-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Video Item */
.video-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease;
}

.video-item:hover {
  transform: scale(1.01);
}

.video-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Video Title Overlay */
.video-title-overlay {
  position: absolute;
  bottom: 15px;
  right: 0;
  left: 0;
  text-align: center;
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
  padding: 0 10px;
  line-height: 1.4;
}

.video-item.large video {
  height: 560px;
  object-fit: cover;
}

.video-item.small video {
  height: 280px;
  object-fit: cover;
}
@media (max-width: 768px) {
  .videos-grid {
    grid-template-columns: 1fr;
  }

  .videos-left-column,
  .videos-right-column {
    width: 100%;
  }
}

.news-section a {
    text-decoration: none;
    color: inherit;
}

.news-section a:hover {
    color: inherit;
}
.publications-section a {
    text-decoration: none;
    color: inherit;
}

.publications-section a:hover {
    color: inherit;
}
.projects-section a {
    text-decoration: none;
    color: inherit;
}

.projects-section a:hover {
    color: inherit;
}
.slide {
  display: none;
  transition: opacity 0.5s ease;
}

.slide.active {
  display: block;
}
