/* Global Styles */
@font-face {
  font-family: "Cairo";
  src: url("../../../../assets/fonts/cairo/Cairo-Regular.ttf")
      format("truetype"),
    url("../../../../assets/fonts/cairo/Cairo-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Cairo";
  src: url("../../../../assets/fonts/cairo/Cairo-Bold.ttf") format("truetype"),
    url("../../../../assets/fonts/cairo/Cairo-Bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}

body {
  font-family: "Cairo", sans-serif;
  direction: rtl;
  background-color: #f0f4f8; /* Soft background */
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}
.grdHd {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 10px;
  margin: 5px;
}
.grdHd .facLab {
  font-family: "Aref Ruqaa", "Cairo", serif;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
  color: #37474f;
  text-align: center;
  user-select: none;
  background: linear-gradient(180deg, #91bee2, #c6d6e6, #ffffff);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  gap: 5px;
  word-spacing: 5px;
}

.grdHd .facLab img {
  width: 110px;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.grdHd .title {
  font-family: "Aref Ruqaa", "Cairo", serif;

  text-align: center;
  padding: 20px 20px;
  background: linear-gradient(135deg, #f6d365 0%, #fda085 50%, #fbc687 100%);
  color: #060f60;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  align-content: center;
}

.grdHd .title h1 {
  font-size: 36px;
  font-weight: 700;
  margin: 0;
  line-height: 2.5;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.grdHd .title:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.grdHd .title h1 {
  font-size: 32px;
}

/* Content Section */
.content {
  display: grid;
  grid-template-columns: 1fr 2fr; /* RightBar takes 1 part, Gallery takes 2 */
  gap: 20px;
  padding: 15px;
}

/* Right Sidebar & Gallery Boxes */
.rightBar,
.gallery {
  background: linear-gradient(to top left, #e3f2fd, #ffffff);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rightBar:hover,
.gallery:hover {
  transform: scale(1.01);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Headings */
h2 {
  font-size: 1.25em;
  color: #0257b1;
  background-color: #e8f0fe;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Paragraph Styles */
.rightBar p {
  text-align: justify;
  text-indent: 24px;
  font-size: 1.1em;
  margin: 16px 0;
  padding: 12px 16px;
  color: #333333;
  letter-spacing: 0.5px;
}

/* Video Section */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  padding: 20px;
  justify-content: center;
  cursor: pointer;
}

.videos div {
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.videos div:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.videos video {
  width: 100%;
  height: auto;
  max-height: 150px;
  border-radius: 8px;
}

/* Responsive Adjustments for Videos */
@media (max-width: 768px) {
  .videos {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  .videos video {
    max-height: 120px;
  }
}

/* Image Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out;
  cursor: pointer;
}

.gallery img:hover {
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  .content {
    grid-template-columns: 1fr;
  }
}

/* Preview Section */
/* This section is hidden by default and will be activated via JavaScript */
.preview-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.preview-container.active {
  visibility: visible;
  opacity: 1;
}

.preview-container img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

/* Image Preview Styles */
.preview-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  flex-direction: column;
}

.preview-container.active {
  display: flex;
}

#preview-image {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
}

.preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 15px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#prev-button {
  right: 20px;
}

#next-button {
  left: 20px;
}

#close-button {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 5px;
}

.preview-nav:hover,
#close-button:hover {
  background: rgba(0, 0, 0, 0.8);
}

.image-counter {
  color: white;
  font-size: 18px;
  margin-top: 10px;
  font-family: 'Cairo', sans-serif;
}