:root {
  --uvu-green: #006633;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  background-color: white;
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-family: 'Rubik', 'Tajawal', sans-serif;
  color: var(--uvu-green);
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
}

/* ================= HERO SECTION ================= */
@media (max-width: 480px) {
  .hero-intro {
    font-size: 1.9rem;
    margin-top: -3rem; /* Raise it up slightly */
  }
}


.hero-section {
  position: relative;
  text-align: center;
  padding: 2rem 1rem 4rem;
  background-color: #f9f9f9;
}

.hero-text {
  padding-top: 6rem;
}

@media (max-width: 768px) {
  .hero-text {
    padding-top: 7rem;
  }
}

.hero-intro {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--uvu-green);
}

@media (max-width: 480px) {
  .hero-intro {
    font-size: 1.9rem;
  }
}

.hero-subtext,
.hero-closing {
  font-size: 1.1rem;
  color: #1a2e49;
  margin: 1rem auto;
  max-width: 500px;
}

.hero-name {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--uvu-green);
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 90vw;
  margin: 1rem auto;
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 6vw;
    max-width: 100vw;
  }
}

.hero-photo-wrapper {
  width: 260px;
  height: 260px;
  margin: 1.5rem auto;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Scroll Down Arrows */
.scroll-down {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
}

.scroll-down i {
  display: block;
  font-size: 2rem;
  color: var(--uvu-green);
  margin: 0.3rem 0;
  animation: fadeBounce 1.2s ease-in-out infinite;
}

.scroll-down i:nth-child(1) { animation-delay: 1.5s; }
.scroll-down i:nth-child(2) { animation-delay: 1.8s; }

/* ================= Mobile Navigation ================= */
.mobile-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5rem;
  background-color: white;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mobile-site-name {
  font-weight: bold;
  font-size: 1rem;
  color: var(--uvu-green);
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--uvu-green);
  cursor: pointer;
  z-index: 1000;
}

/* Mobile Dropdown Menu */
.nav-menu {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  width: 90%;
  max-width: 400px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: 1rem 0;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 200;
  transition: all 0.3s ease;
}

.nav-menu.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.nav-menu a {
  width: 100%;
  text-align: center;
  padding: 1rem;
  text-decoration: none;
  color: var(--uvu-green);
  font-weight: bold;
  font-size: 1rem;
  border-bottom: 1px solid #eee;
  transition: background-color 0.3s ease;
}

.nav-menu a:hover {
  background-color: #f4f4f4;
}

/* ================= Desktop Navigation ================= */


/* Desktop Navbar */
.desktop-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex;
  justify-content: center;
}

/* Inner Container */
.nav-container {
  max-width: 1200px;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Name (left) */
.site-name-desktop {
  font-weight: bold;
  font-size: 1.3rem;
  color: var(--uvu-green);
  white-space: nowrap;
}

/* Nav links (right) */
.desktop-nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.desktop-nav-links li a {
  text-decoration: none;
  color: var(--uvu-green);
  font-weight: bold;
  transition: color 0.3s ease;
}

.desktop-nav-links li a:hover {
  color: #004d26;
}

/* Responsive */
@media screen and (max-width: 767px) {
  .desktop-navbar {
    display: none;
  }
}



/* ================= Section Top Padding ================= */
#about,
#education,
#experience,
#conferences,
#certificates,
#training,
#contact {
  padding-top: 5rem;
}

/* ================= Animations ================= */
@keyframes fadeBounce {
  0% { opacity: 0; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(5px); }
  100% { opacity: 0; transform: translateY(10px); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: translateY(-100px); }
  60% { opacity: 1; transform: translateY(30px); }
  80% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

.bounce-in {
  animation: bounceIn 1.2s ease-out;
  animation-delay: 0.6s;
  animation-fill-mode: both;
}

/* ================= EDUCATION SECTION ================= */
.education-section {
  padding: 3rem 1.5rem;
  background-color: #ffffff;
}

/* Education grid layout */
.education-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}





/* Text inside card */
.degree-title {
  font-weight: bold;
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--uvu-green);
}

.university-name,
.education-date {
  color: #555;
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

.lang-ar .education-card {
  text-align: center !important;
}
.lang-ar .degree-title,
.lang-ar .university-name,
.lang-ar .education-date {
  text-align: center !important;
}

.lang-ar {
  direction: rtl;
  text-align: right;
}


/* Responsive: Stack on small screens */
@media (max-width: 768px) {
  .education-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* ================= EXPERIENCE SECTION ================= */
.experience-section {
  padding: 3rem 1.5rem;
  background-color: #f9f9f9;
}
.experience-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}
.experience-card {
  background-color: #ffffff;
  border-left: 5px solid var(--uvu-green);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.job-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--uvu-green);
}
.job-dates {
  font-size: 0.95rem;
  color: #777;
  margin-bottom: 0.5rem;
}
.job-description {
  color: #333;
  line-height: 1.5;
  font-size: 1rem;
}
.sticky-title {
  position: sticky;
  top: 0;
  left: 0;
  background-color: #f9f9f9; /* Updated to match experience background */
  padding: 0.8rem 1rem;
  font-size: 1.3rem;
  font-weight: bold;
  z-index: 100;
  border-left: 4px solid var(--uvu-green);
  color: #333;
}

@media (min-width: 769px) {
  .sticky-title {
    position: static;
    border-left: none;
    padding-left: 0;
  }
}

/* ================= CERTIFICATES SECTION ================= */
.certificates-section {
  padding: 3rem 1.5rem;
  background-color: #ffffff;
}
.certificates-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 1rem;
}

.certificate-card {
  text-align: center;
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 350px;
}

.certificate-card img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
}

.certificate-title {
  font-weight: bold;
  font-size: 1rem;
  margin-top: 1rem;
}

.certificate-source {
  font-size: 0.9rem;
  color: #666;
}


/* ================= TRAINING SECTION ================= */
.training-section {
  padding: 3rem 1.5rem;
  background-color: #f9f9f9;
}
.training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 2rem 1.5rem;
}
.training-card {
  text-align: center;
  background-color: f9f9f9;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  max-width: 300px;
  margin: 0 auto;
}
.training-card img {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.training-card img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ================= CONTACT SECTION ================= */
.contact-section {
  background-color: #ffffff;
  padding: 4rem 2rem;
  text-align: center;
}
.contact-form {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
  gap: 1rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
.contact-form button {
  background-color: var(--uvu-green);
  color: white;
  padding: 0.9rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
.contact-form button:hover {
  background-color: #145c2b;
}
.contact-links {
  margin-top: 2rem;
  text-align: center;
}
.contact-icon {
  display: inline-block;
  margin: 0 1rem;
  font-size: 1rem;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}
.contact-icon i {
  margin-right: 0.5rem;
  color: var(--uvu-green);
}
.contact-icon:hover {
  color: var(--uvu-green);
}


/* ================= ABOUT SECTION ================= */
.about-section {
  padding: 3rem 1.5rem;
  background-color: #ffffff;
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.about-text {
  max-width: 800px;
  text-align: left;
  color: #333;
  line-height: 1.6;
  font-size: 1rem;
}
.about-name {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--uvu-green);
  margin-bottom: 1rem;
  text-align: center;
}
@media (min-width: 768px) {
  .about-content {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
  }
  .about-text {
    flex: 1;
    padding-left: 2rem;
  }
}

.about-text p {
  margin-bottom: 1.5rem;
}



.csw63-section {
  padding: 4rem 1.5rem;
  background-color: #ffffff;
}

.section-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-title {
  font-size: 2rem;
  color: var(--uvu-green);
  text-align: center;
  margin-bottom: 2rem;
}


.section-intro {
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 2.5rem auto;
  padding: 0 1rem;
  text-align: left;
}

.story-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-direction: row;
  flex-wrap: wrap;
}

.story-block.reverse {
  flex-direction: row-reverse;
}

.story-image {
  flex: 1 1 300px;
  max-width: 500px;
}

.story-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.story-text {
  flex: 1 1 300px;
  max-width: 500px;
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .story-block {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .story-block.reverse {
    flex-direction: row-reverse;
  }

  .story-image,
  .story-text {
    flex: 0 0 48%;
    max-width: 48%;
  }

  .story-text {
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
  }

  .story-image img {
    width: 100%;
    border-radius: 10px;
  }

  .csw63-section {
    padding: 2rem 1rem;
  }

  .section-header {
    padding-bottom: 2rem;
  }

  .section-intro {
    font-size: 0.95rem;
    padding: 0 1rem;
  }
}



/* === Section: Conferences & Global Impact === */
#conferences {
  padding: 4rem 1.5rem;
  background-color: #f9f9f9;
}




.event-subtitle {
  font-size: 1.4rem;
  color: #247151; /* UVU green */
  font-weight: 600;
  margin: 3rem auto 1rem auto;
  text-align: center;
  position: relative;
}

.event-subtitle::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background-color: #247151;
  margin: 0.5rem auto 0 auto;
  border-radius: 2px;
}

.mini-event-block {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.mini-event-block p {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
}

.mini-gallery {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.mini-gallery img {
  width: 100%;
  max-width: 180px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#typewriter-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  font-weight: bold;
  font-size: 1.5rem; /* desktop size */
}

@media (max-width: 480px) {
  .mini-event-block {
    padding-left: 1.2rem;
  }
}



/* === LIGHTBOX STYLES === */
.lightbox-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 1rem;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
  transition: transform 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

@media (max-width: 768px) {
  .lightbox-close {
    top: 10px;
    right: 20px;
    font-size: 2rem;
  }

  .lightbox-img {
    max-width: 95%;
    max-height: 70vh;
  }
}


.story-image a {
  display: block;
  width: 100%;
}

.story-image a img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}


.education-card {
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: center;
  flex: 1 1 300px;
  max-width: 45%;
  min-width: 280px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}


/* Image wrapper to position overlay */
.image-wrapper {
  position: relative;
  width: 100%;
}



/* Overlay that will appear after delay */
.click-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* dark overlay */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  transition: opacity 0.4s ease;
  opacity: 1;
  z-index: 5;
}

/* Hidden initially */
.hidden {
  display: none;
}

#conferences .lang-en {
  direction: ltr !important;
  text-align: left !important;
}


#conferences .conferences-content .lang-en {
  direction: ltr !important;
  text-align: left !important;
}

.education-thumbnail {
  width: 100%;
  max-height: 250px; /* or use height: auto if you prefer flexible height */
  display: block;
  object-fit: contain;
  border-radius: 8px;
  border: 3px solid var(--uvu-green);
  transition: transform 0.3s ease;
}


.special-photo {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  filter: contrast(105%) brightness(105%);
}


.site-story-section {
  padding: 3rem 1.5rem;
  background-color: #ffffff;
  color: #333;
}

.site-story-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

.site-story-content p {
  margin-bottom: 1.5rem;
}

/* Fix overlapping buttons on mobile */
.language-toggle {
  position: fixed;
  top: 1rem;
  right: 4rem;
  z-index: 9999;
  background-color: transparent;
  color: var(--uvu-green, #006633);
  border: 2px solid var(--uvu-green, #006633);
  padding: 0.4rem 0.8rem;
  font-weight: bold;
  font-family: 'Rubik', 'Tajawal', sans-serif;
  border-radius: 5px;
  cursor: pointer;
}


@media (max-width: 768px) {
  html[lang="ar"] .language-toggle {
    right: auto;
    left: 1rem;
  }
}



/* Make nav links inline horizontally for desktop */
.desktop-nav-links li {
  display: inline-block;
  margin-left: 1.2rem;
}

@media (max-width: 768px) {
  html[lang="ar"] .language-toggle {
    right: auto;
    left: 1rem;
  }
}

@media (max-width: 768px) {
  html[lang="ar"] .language-toggle {
    top: 1rem;
    left: 4rem;  /* Push to the right of the menu button */
    right: auto;
  }
}


.job-title {
  margin-bottom: 0.6rem; /* Adjust this value as you like */
}



.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  background-color: #f1f1f1;
  color: var(--uvu-green);
  font-size: 0.9rem;
  margin-top: 3rem;
  border-top: 1px solid #ddd;
}


.conferences-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: left;
}



html[dir="rtl"] [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}


#lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}


/* General section padding for all text containers */
.story-block,
.text-container,
.section-text {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Optional: slightly more padding on small screens */
@media (max-width: 768px) {
  .story-block,
  .text-container,
  .section-text {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }
}


.conference-section {
  padding: 3rem 1.5rem;
  background-color: #f9f9f9; /* optional */
  text-align: center;
}

.event-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--uvu-green);
  margin-bottom: 1.5rem;
}



.lang-ar #conferences {
  direction: rtl;
  text-align: right;
}

.lang-ar .section-intro {
  direction: rtl;
  text-align: right;
  line-height: 1.8;
  padding: 0 1rem; /* Optional: adds space on the left/right edges */
}
