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

:root {
  --primary: #0059b3;
  --secondary: #62a7ed;
  --bg: #fbfcfe;
  --text: #1d2a3a;
  --muted: #5a6b7d;
  --white: #fff;
  --border: #e6edf5;
  --shadow: 0 10px 25px rgba(0, 89, 179, 0.12);
}

body {
  font-family: "Tajawal", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

nav {
  padding: 14px 0;
}

.nav-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.nav-container .logo {
  justify-self: start;
}

.nav-container .lang-switch {
  justify-self: end;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  overflow: hidden;
}

.logo-img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  margin-top: 4px;
}

.logo-hover-text {
  display: inline-block;
  margin-top: 4px;
  margin-inline-start: 10px;
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 800;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  transform: translateX(16px);
  transition:
    opacity 220ms ease,
    transform 320ms ease;
}

[dir="rtl"] .logo-hover-text {
  transform: translateX(16px);
}

[dir="ltr"] .logo-hover-text {
  transform: translateX(-16px);
}

.logo-link:hover .logo-hover-text {
  max-width: 260px;
  opacity: 1;
  transform: translateX(0);
}

.logo-text {
  color: var(--primary);
  font-size: 1.45rem;
  font-weight: 800;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
}

.nav-links a.active,
.nav-links a:hover {
  background: rgba(98, 167, 237, 0.18);
  color: var(--primary);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-btn {
  border: 2px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.lang-btn:hover {
  background: var(--primary);
  color: var(--white);
}

.mobile-menu-toggle {
  display: none;
  border: none;
  background: var(--secondary);
  color: var(--white);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  padding: 64px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.about-hero {
  padding: 48px 0;
}

.about-hero h1 {
  font-size: 2.4rem;
  margin: 0 0 10px;
}

.about-hero-text {
  margin: 0;
  max-width: 95ch;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
}

.about-photo-card .about-more-text {
  display: none;
}

.about-photo-card.about-more-open .about-more-text {
  display: block;
}

.about-more-btn {
  margin-top: 12px;
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(98, 167, 237, 0.12);
  color: var(--primary);
  font-weight: 900;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}

.about-more-btn:hover {
  background: rgba(98, 167, 237, 0.2);
}

.about-hero-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.about-hero-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 14px;
  backdrop-filter: blur(8px);
}

.about-hero-card h3 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 1.1rem;
}

.about-hero-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.hero-grid.hero-grid--single {
  grid-template-columns: 1fr;
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 58ch;
}

.search-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(10px);
}

.search-card label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  padding: 12px 12px;
  border-radius: 12px;
  outline: none;
}

.search-row input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.primary-btn {
  border: none;
  background: var(--secondary);
  color: var(--white);
  font-weight: 900;
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.primary-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 89, 179, 0.18);
}

.primary-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.card .primary-btn {
  min-width: 220px;
  display: flex;
  width: max-content;
  margin: 12px auto 0;
}

.cta-card {
  text-align: center;
}

.whatsapp-cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.social-card {
  background: rgba(0, 89, 179, 0.06);
  border-color: rgba(0, 89, 179, 0.18);
}

.social-card p {
  color: var(--muted);
}

.social-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.social-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(98, 167, 237, 0.35);
  background: rgba(255, 255, 255, 0.6);
  color: var(--primary);
  text-decoration: none;
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 89, 179, 0.14);
}

.social-icon.facebook:hover {
  border-color: rgba(24, 119, 242, 0.5);
  color: #1877f2;
}

.social-icon.instagram:hover {
  border-color: rgba(228, 64, 95, 0.5);
  color: #e4405f;
}

.section {
  padding: 56px 0;
}

.section h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 14px;
}

.page-header {
  padding: 2.2rem 0;
  background: linear-gradient(180deg, rgba(98, 167, 237, 0.12), transparent);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  color: var(--primary);
  font-size: 2.2rem;
  margin: 0 0 0.6rem;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.program-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.program-card.featured {
  border-color: rgba(98, 167, 237, 0.45);
  background: linear-gradient(180deg, rgba(98, 167, 237, 0.12), var(--white));
}

.program-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.program-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(98, 167, 237, 0.18);
  color: var(--primary);
  font-size: 1.35rem;
}

.program-header h3 {
  margin: 0;
}

.program-badge {
  margin-inline-start: auto;
  background: rgba(98, 167, 237, 0.22);
  color: var(--primary);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
}

.program-content p {
  color: var(--muted);
  margin: 0 0 12px;
}

.program-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.program-features {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  gap: 8px;
}

.program-features li {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7fbff;
  color: var(--text);
}

.program-btn {
  width: 100%;
  border: none;
  background: var(--secondary);
  color: var(--white);
  font-weight: 900;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
}

.program-btn:hover {
  background: var(--primary);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.benefit-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.benefit-item i {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.benefit-item p {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  background: #e9f2ff;
}

.card h3 {
  margin-top: 12px;
  margin-bottom: 6px;
}

.card p {
  color: var(--muted);
}

.video-embed {
  margin-top: 16px;
  aspect-ratio: 16 / 9;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.shared-card {
  cursor: pointer;
}

.shared-thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.shared-thumb img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.shared-card:focus-visible {
  outline: 3px solid rgba(98, 167, 237, 0.55);
  outline-offset: 3px;
  border-radius: 16px;
}

.shared-video {
  position: relative;
}

.shared-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.35));
  border-radius: 12px;
  transition: background 200ms ease;
}

.shared-play i {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(98, 167, 237, 0.35);
  color: var(--primary);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
  transform: scale(1);
  transition: transform 200ms ease;
}

.shared-card:hover .shared-play {
  background: linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.45));
}

.shared-card:hover .shared-play i {
  transform: scale(1.05);
}

.shared-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.shared-modal.open {
  display: flex;
}

.shared-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 25, 40, 0.55);
  backdrop-filter: blur(6px);
}

body.modal-open header {
  filter: blur(6px);
  pointer-events: none;
}

body.modal-open {
  overflow: hidden;
}

.shared-window {
  position: relative;
  width: min(980px, 100%);
  max-height: 92vh;
  background: var(--white);
  border: 1px solid rgba(98, 167, 237, 0.25);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: auto;
  animation: shared-pop 160ms ease-out;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.shared-window::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@keyframes shared-pop {
  from {
    transform: translateY(8px) scale(0.98);
    opacity: 0.6;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.shared-close {
  position: sticky;
  top: 12px;
  inset-inline-start: 12px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(98, 167, 237, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  cursor: pointer;
  z-index: 3;
}

.shared-close:hover {
  background: rgba(255, 255, 255, 1);
}

.shared-media {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
}

.shared-expanded-card {
  background: var(--white);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.shared-expanded-card img {
  width: 100%;
  height: clamp(320px, 60vh, 640px);
  display: block;
  object-fit: cover;
  background: #e9f2ff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.shared-expanded-body {
  padding: 16px;
  border-top: 1px solid rgba(98, 167, 237, 0.18);
  overflow: visible;
  flex: 0 0 auto;
  min-height: auto;
  padding-bottom: 28px;
  transform: translateY(var(--shared-stretch, 0px));
  transition: transform 180ms ease;
}

.shared-expanded-body h3 {
  margin: 0 0 8px;
  color: var(--primary);
}

.shared-expanded-body p {
  margin: 0;
  color: var(--muted);
}

.shared-media img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 78vh;
  object-fit: contain;
  background: #e9f2ff;
}

.shared-media .shared-expanded-card img {
  height: min(62vh, 520px);
  max-height: none;
  object-fit: cover;
}

.shared-media iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  background: #000;
}

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.news-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  background: #e9f2ff;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.news-body p {
  color: var(--muted);
  margin-top: 10px;
}

.news-body p:first-child {
  margin-top: 0;
}

.news-card .news-body {
  position: relative;
  max-height: 230px;
  overflow: hidden;
}

.news-card .news-body::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 64px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 1)
  );
  pointer-events: none;
}

.news-card.expanded .news-body {
  max-height: none;
}

.news-card.expanded .news-body::after {
  display: none;
}

.news-card--short .news-body {
  max-height: none;
}

.news-card--short .news-body::after {
  display: none;
}

.news-more {
  margin-top: 12px;
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(98, 167, 237, 0.12);
  color: var(--primary);
  font-weight: 900;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}

.news-more:hover {
  background: rgba(98, 167, 237, 0.2);
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.news-tag {
  background: rgba(98, 167, 237, 0.22);
  color: var(--primary);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.faq-summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--text);
  list-style: none;
  font-size: 1.05rem;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 2px;
}

.faq-chevron {
  color: var(--secondary);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  margin-top: 10px;
  color: var(--muted);
}

/* Departments dropdown lists */
.dept-level {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.dept-level + .dept-level {
  margin-top: 12px;
}

.dept-summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--primary);
  list-style: none;
  font-size: 1.2rem;
}

.dept-summary::-webkit-details-marker {
  display: none;
}

.dept-summary-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 2px;
}

.dept-chevron {
  color: var(--secondary);
}

.dept-level[open] .dept-chevron {
  transform: rotate(180deg);
}

.faculties {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.faculty {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: #ffffff;
}

.faculty-summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
  list-style: none;
  font-size: 1.05rem;
}

.faculty-summary::-webkit-details-marker {
  display: none;
}

.faculty-summary-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.programs {
  margin-top: 10px;
  padding-inline-start: 18px;
  color: var(--muted);
  font-size: 1rem;
}

.programs li {
  padding: 6px 0;
  color: var(--text);
  font-weight: 600;
}

.dept-summary-inner span {
  color: var(--primary);
}

.faculty-summary-inner span {
  color: var(--secondary);
}

.news-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

footer {
  padding: 28px 0;
  background: var(--white);
  border-top: 1px solid var(--border);
}

footer p {
  color: var(--muted);
  text-align: center;
}

/* Navigation Dropdowns (Desktop) */
.nav-item-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-chevron {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
  pointer-events: none;
}

.nav-item-dropdown.open .nav-chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 190px;
  list-style: none;
  padding: 6px;
  z-index: 1100;
  animation: navDropdownFadeIn 0.2s ease forwards;
}

@keyframes navDropdownFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 6px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.nav-item-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  display: block;
  padding: 8px 14px;
  color: var(--text);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
  white-space: nowrap;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
  background: rgba(98, 167, 237, 0.12);
  color: var(--primary);
}

/* Mobile */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .about-hero-grid {
    grid-template-columns: 1fr;
  }

  .cards,
  .news-grid,
  .programs-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-container {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "logo lang toggle"
      "links links links";
    align-items: center;
    gap: 10px;
  }

  .logo {
    grid-area: logo;
    min-width: 0;
  }

  .lang-switch {
    grid-area: lang;
  }

  .mobile-menu-toggle {
    grid-area: toggle;
  }

  .nav-links {
    display: none;
    grid-area: links;
    position: static;
    background: var(--white);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    gap: 6px;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-container {
    position: relative;
  }

  .nav-item-dropdown:hover .dropdown-menu {
    display: none;
  }

  .nav-item-dropdown.open .dropdown-menu {
    display: block;
    position: static;
    transform: none;
    animation: none;
    min-width: unset;
    box-shadow: none;
    border: 0;
    padding: 6px 0 0 0;
  }

  .dropdown-menu a {
    text-align: center;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .logo-img {
    width: 56px;
    height: 56px;
  }

  .logo-hover-text {
    font-size: 1rem;
  }

  .logo-text {
    font-size: 1.15rem;
  }
}

/* ==========================================================================
   Dashboard and Password Gate UI
   ========================================================================== */

/* Password Gate */
#password-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 30% 30%, #152c4e, #0a1424);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: "Tajawal", sans-serif;
  color: #fff;
  overflow: hidden;
}

#password-gate::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 89, 179, 0.25) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  pointer-events: none;
  animation: floatBG 12s infinite alternate ease-in-out;
}

#password-gate::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(98, 167, 237, 0.18) 0%, transparent 70%);
  bottom: -15%;
  right: -15%;
  pointer-events: none;
  animation: floatBG 16s infinite alternate-reverse ease-in-out;
}

@keyframes floatBG {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.1); }
}

.gate-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 40px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: gatePop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gatePop {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.gate-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
}

.gate-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 30%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gate-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

.gate-form-group {
  margin-bottom: 20px;
  text-align: start;
}

[dir="rtl"] .gate-form-group {
  text-align: right;
}

.gate-form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.gate-input-wrapper {
  position: relative;
}

.gate-input-wrapper i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
}

[dir="rtl"] .gate-input-wrapper i {
  right: 16px;
}
[dir="ltr"] .gate-input-wrapper i {
  left: 16px;
}

.gate-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  outline: none;
  font-size: 1rem;
  transition: all 0.3s;
}

[dir="rtl"] .gate-input {
  padding: 14px 44px 14px 16px;
}
[dir="ltr"] .gate-input {
  padding: 14px 16px 14px 44px;
}

.gate-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(98, 167, 237, 0.25);
}

.gate-input:focus + i {
  color: var(--secondary);
}

.gate-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 89, 179, 0.3);
  transition: all 0.3s;
}

.gate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 89, 179, 0.45);
  filter: brightness(1.1);
}

.gate-btn:active {
  transform: translateY(0);
}

.gate-error {
  display: none;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-top: 16px;
  align-items: center;
  gap: 8px;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.gate-lang-switch {
  margin-top: 24px;
}

.gate-lang-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.gate-lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}


/* Dashboard Layout & Styling */
#dashboard-wrapper {
  animation: fadeIn 0.4s ease-out;
}

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

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.stat-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.stat-card.primary .stat-icon-wrapper {
  background: rgba(0, 89, 179, 0.1);
  color: var(--primary);
}

.stat-card.secondary .stat-icon-wrapper {
  background: rgba(98, 167, 237, 0.15);
  color: var(--primary);
}

.stat-card.success .stat-icon-wrapper {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.stat-card.warning .stat-icon-wrapper {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.stat-info {
  flex: 1;
}

.stat-info h4 {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-info .stat-number {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.dashboard-panel-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.panel-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}

.panel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.panel-card-header h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin: 0;
}

.panel-card-header .header-badge {
  background: rgba(0, 89, 179, 0.08);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Admin Table styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
}

[dir="rtl"] .admin-table {
  text-align: right;
}

.admin-table th {
  padding: 14px 16px;
  background: #f7f9fc;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.92rem;
  white-space: nowrap;
}

.admin-table tbody tr {
  transition: background 0.2s;
}

.admin-table tbody tr:hover {
  background: #fbfcfe;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge.badge-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.badge.badge-approved {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.badge.badge-completed {
  background: rgba(0, 89, 179, 0.08);
  color: var(--primary);
}

/* Action Buttons inside tables */
.btn-action-group {
  display: flex;
  gap: 6px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-icon.delete:hover {
  background: #ef4444;
  border-color: #ef4444;
}

/* News List inside Dashboard sidebar */
.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.dashboard-list-item:hover {
  border-color: var(--secondary);
}

.dashboard-list-item img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #e9f2ff;
}

.list-item-body {
  flex: 1;
  min-width: 0;
}

.list-item-body h4 {
  margin: 0 0 2px;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-body p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Settings Form elements */
.dashboard-form {
  display: grid;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfe;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  background: #fff;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.logout-nav-item a {
  background: rgba(239, 68, 68, 0.08) !important;
  color: #ef4444 !important;
}

.logout-nav-item a:hover {
  background: #ef4444 !important;
  color: #fff !important;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }
}

