/* Custom styling for HSEEG Landing Page */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Bitter:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Montserrat:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary-blue: #007bbf;
  --primary-blue-dark: #006096;
  --banner-orange: #f59e0b;
  --dark-bg: #3a3a3a;
  --dark-card: #2e2e2e;
  --text-dark: #212121;
  --font-serif: 'Bitter', 'Cairo', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', 'Montserrat', 'Cairo', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Cairo', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-serif);
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--dark-bg);
  color: #f3f4f6;
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  -webkit-text-size-adjust: 100%;
}

/* Typography Helpers */
.font-montserrat {
  font-family: var(--font-sans);
}

.font-bitter {
  font-family: var(--font-serif);
}

.font-arabic {
  font-family: var(--font-arabic) !important;
}

/* Universal Arabic Typography & Modern Font Rendering */
:lang(ar),
[dir="rtl"],
.font-arabic,
.arabic-text {
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Fallback for Arabic characters inside Latin font declarations */
@font-face {
  font-family: 'Bitter';
  src: local('Cairo');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: 'Montserrat';
  src: local('Cairo');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* Announcement Top Bar */
.top-notice-bar {
  background-color: var(--banner-orange);
  color: #1a1a1a;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  position: relative;
  z-index: 20;
}

.top-notice-btn {
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  padding: 0.2rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
  transition: all 0.2s ease;
  background: transparent;
}

.top-notice-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Navbar */
.site-nav {
  background-color: var(--primary-blue);
  color: #ffffff;
  font-family: var(--font-serif);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  transition: background-color 0.3s ease;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.85rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  opacity: 0.85;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.5rem;
  right: 0.5rem;
  height: 4px;
  background-color: #ffffff;
  border-radius: 2px 2px 0 0;
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  color: #212121;
  min-width: 270px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  border-radius: 8px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 50;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.65rem 1.25rem;
  color: #333333;
  text-decoration: none;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
  background-color: #f3f4f6;
  color: var(--primary-blue);
  padding-left: 1.4rem;
}

.dropdown-item .badge-sub {
  font-size: 0.75rem;
  background-color: #e0f2fe;
  color: #0369a1;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: var(--font-sans);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 400px;
  height: auto;
  padding: 5rem 1rem 4rem;
  background: url('../images/hero_bg.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(31, 31, 31, 0.55);
}

.hero-title {
  position: relative;
  z-index: 10;
  font-family: var(--font-sans);
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  padding: 0 1rem;
}

/* Graphic Cards (Mission & Vision) */
.graphic-card-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #ffffff;
  cursor: pointer;
  position: relative;
}

.graphic-card-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.5);
}

.graphic-card-container img {
  width: 100%;
  height: auto;
  display: block;
}

.zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.2s ease;
}

.graphic-card-container:hover .zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

/* 8 Core Competencies Cards */
.hse-card {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.hse-card:hover {
  transform: translateY(-4px);
}

.hse-card-img-wrap {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  position: relative;
  background: #1f1f1f;
  aspect-ratio: 16 / 10;
}

.hse-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hse-card:hover .hse-card-img-wrap img {
  transform: scale(1.03);
}

.hse-card-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.hse-card-desc {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #d1d5db;
  line-height: 1.6;
}

/* OUR IMPACT Section */
.impact-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.impact-title {
  font-family: var(--font-sans);
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 1.5rem;
}

.impact-p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #e5e7eb;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.impact-btn {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(46, 46, 46, 0.8);
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.75rem 2.5rem;
  text-decoration: none;
  transition: all 0.25s ease;
  margin-top: 1rem;
  border-radius: 4px;
  text-align: center;
}

.impact-btn:hover {
  background: #ffffff;
  color: #1a1a1a;
  border-color: #ffffff;
  box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

/* Slider Controls */
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.25s ease;
}

.carousel-dot.active {
  background-color: #ffffff;
  transform: scale(1.3);
}

/* Video Section */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
  background: #000;
}

.video-container iframe,
.video-container .video-poster-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-poster-wrap {
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background-color: rgba(239, 68, 68, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.5);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: #dc2626;
}

/* Footer Section */
.footer-main {
  background-color: #ffffff;
  color: #212121;
  padding: 4rem 1rem 3rem;
  border-top: 1px solid #e5e7eb;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

@media (max-width: 900px) {
  .footer-col {
    align-items: center;
    text-align: center;
  }
}

.footer-col-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.25rem;
  padding-bottom: 0.25rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: #374151;
}

.footer-contact-link {
  color: #007bbf;
  text-decoration: underline;
  transition: color 0.15s ease;
  word-break: break-all;
}

.footer-contact-link:hover {
  color: #005080;
  opacity: 0.85;
}

/* Map Card */
.footer-map-container {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d1d5db;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  background: #f1f5f9;
}

.footer-map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-overlay-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ffffff;
  color: #1a73e8;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  z-index: 5;
  transition: all 0.15s ease;
}

.map-overlay-badge:hover {
  background: #f8fafc;
  color: #1557b0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Bottom Bar */
.bottom-bar {
  background-color: #3a3a3a;
  color: #ffffff;
  padding: 1.25rem 1rem;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-img {
  max-width: 95vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #ffffff;
  font-size: 2.5rem;
  cursor: pointer;
  background: transparent;
  border: none;
  line-height: 1;
  transition: transform 0.2s ease;
}

.lightbox-close:hover {
  transform: scale(1.15);
}

/* Floating Action Button */
.floating-contact-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #25d366;
  color: #ffffff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
  z-index: 35;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.floating-contact-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.65);
}

/* Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.search-modal.active {
  display: flex;
}

.search-box {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  overflow: hidden;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 25px;
  left: 25px;
  background: rgba(31, 31, 31, 0.85);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.2);
  z-index: 45;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-to-top:hover {
  background: var(--primary-blue);
  transform: translateY(-2px);
}

.back-to-top.show {
  display: flex;
}

/* Operational & Field Gallery Styles */
.gallery-section-container {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.gallery-filter-btn {
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
  cursor: pointer;
  white-space: nowrap;
}

.gallery-filter-btn:hover {
  background: #f3f4f6;
  color: #111827;
  border-color: #d1d5db;
}

.gallery-filter-btn.active {
  background: var(--primary-blue);
  color: #ffffff;
  border-color: var(--primary-blue);
  box-shadow: 0 4px 12px rgba(0, 123, 191, 0.25);
}

.gallery-card {
  background: #ffffff;
  border-radius: 0.875rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -8px rgba(0, 0, 0, 0.12);
  border-color: #bfdbfe;
}

.gallery-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: #1f2937;
}

.gallery-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover .gallery-img-wrapper img {
  transform: scale(1.06);
}

.gallery-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.gallery-lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

.gallery-lightbox-modal {
  background: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  max-width: 900px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================================
   SKELETON LOADING & SHIMMER EFFECTS
   Modern ultra-smooth pulsing skeleton loaders for API content
   ============================================================ */
@keyframes hseeg-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 35%, #f8fafc 50%, #e2e8f0 65%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: hseeg-shimmer 1.8s ease-in-out infinite;
}

.skeleton-shimmer-dark {
  background: linear-gradient(90deg, #1e293b 0%, #334155 35%, #475569 50%, #334155 65%, #1e293b 100%);
  background-size: 200% 100%;
  animation: hseeg-shimmer 1.8s ease-in-out infinite;
}

.skeleton-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .45;
  }
}

/* ============================================================
   RESPONSIVE FILTER BARS & NO-SCROLLBAR UTILITIES
   Smooth horizontal touch-scrolling without ugly scrollbar bars
   ============================================================ */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.no-scrollbar {
  -ms-overflow-style: none !important; /* IE and Edge */
  scrollbar-width: none !important; /* Firefox */
  -webkit-overflow-scrolling: touch;
}



/* Global Media & SVG Responsive Safety Constraint */
img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
}
