:root {
  --primary-color: #055083;
  --primary-light: #5dade2;
  --primary-dark: #005b96;
  --primary-blue: #4ea8de;
  --accent-color: #f3c87e;
  --background-general: #f9fbfd;
  --background-alt: #e6f0fa;
  --card-background: #ffffff;
  --glass-background: rgba(219, 218, 218, 0.2);
  --bg-light: #f8faff;
  --card-bg: #ffffff;
  --text-secondary: #585757;
  --text-body: #333333;
  --text-blue: #0a72b3;
  --text-heading: #002a4a;
  --text-dark: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --glass-border: rgba(0, 0, 0, 0.301);
  --shadow-light: 0 6px 20px rgba(0, 0, 0, 0.07);
  --shadow-dark: 0 10px 35px rgba(0, 0, 0, 0.15);
  --soft-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

body.dark-mode {
  --primary-color: #07294b;
  --primary-light: #33698d;
  --primary-dark: #003051;
  --primary-blue: #0a72b3;
  --accent-color: #b89861;
  --background-general: #1f2b3f;
  --background-alt: #1f2e46;
  --card-background: #18273d;
  --glass-background: rgba(255, 255, 255, 0.05);
  --bg-light: #1a202c;
  --card-bg: #27405d;
  --text-secondary: #a2a2ac;
  --text-body: #d1d5db;
  --text-blue: #4ea8de;
  --text-heading: #e6f0fa;
  --text-dark: #9eaebe;
  --text-muted: #9ca3af;
  --border-color: #2d3748;
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-light: 0 6px 20px rgba(0, 0, 0, 0.6);
  --shadow-dark: 0 10px 35px rgba(0, 0, 0, 0.8);
  --soft-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", sans-serif;
  direction: rtl;
  line-height: 1.8;
  background-color: var(--background-general);
  color: var(--text-body);
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
  display: flex;
  height: 100vh;
  flex-direction: column;
}

main {
  flex: 1;
}

body.sub-page main {
  padding-top: 90px;
}

body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.7;
  transition: background 0.3s ease-out;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 600;
}

p {
  color: var(--text-body);
}

select {
  width: 100%;
  padding: 10px;
  font-family: "Cairo", sans-serif;
  border-radius: 6px;
  font-size: 1rem;
  border: 1px solid var(--glass-border);
  background-color: var(--glass-background);
  color: var(--text-body);
}

select:focus {
  outline: none;
  border: 1px solid var(--primary-blue);
}

option {
  color: var(--primary-color);
}

textarea {
  width: 100%;
  border: 1px solid var(--glass-border);
  background-color: var(--glass-background);
  color: var(--text-body);
}

textarea:focus {
  outline: none;
  border: 1px solid var(--primary-blue);
}

label span {
  color: red;
}

.profile-circle,
.dashboard-circle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  flex-direction: column;
}

.dashboard-circle span {
  width: max-content;
  height: 35px;
  border-radius: 20px;
  padding: 3px 12px;
  background: #f3ece533;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  border: 1px solid var(--glass-border);
}

.profile-circle span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f3ece533;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  user-select: none;
  border: 1px solid var(--glass-border);
}

.profile-circle:hover span,
.dashboard-circle:hover span {
  outline: 1px solid #074e9b;
}

.profile-circle.active span {
  box-shadow: inset 0px 0px 5px var(--primary-color);
  outline: 2px solid #013b79;
  outline: 2px solid #074e9b;
}

.profile-info {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 3rem;
  border-radius: 8px;
  padding: 0.7rem 1.7rem;
  background-color: gainsboro;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.profile-info p {
  color: #030438;
}

.profile-circle.active .profile-info {
  display: flex;
}

.profile-info .userName {
  text-align: center;
  font-weight: 700;
  width: 90%;
  overflow-wrap: anywhere;
  margin: auto;
  line-height: 1;
}

.profile-info .userEmail {
  text-align: center;
  width: 100%;
  font-weight: 600;
  max-width: 15ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
}

.profile-info .logOutBtn {
  text-align: center;
  width: max-content;
  padding: 3px 10px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid rgb(119, 121, 124);
  transition: transform 0.2s ease;
}

.profile-info .logOutBtn:hover {
  border: 1px solid #005b96;
  cursor: pointer;
  background-color: #e9e6e6;
  color: #005b96;
  box-shadow: 1px 1px 8px #c7c2c268;
  /* transform: scale(1.02); */
}

.popup {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  padding: 8px 10px;
  border-radius: 100px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1010;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  min-width: 250px;
  opacity: 0;
  transition: all 0.7s ease-in-out;
}

.popup.show {
  top: 30px;
  opacity: 1;
}

.popup.hide {
  top: -100px;
  opacity: 0;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.341);
  z-index: 1010;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.section-padding {
  padding: 60px 0;
}

.bg-light {
  background-color: var(--background-alt);
}

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

.mt-4 {
  margin-top: 40px;
}

/* filter buttons*/
.filter-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-dark);
}

.filter-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.filter-btn.active {
  background-color: var(--primary-blue);
  color: #fff;
  border-color: var(--primary-blue);
}

/* buttons style */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(
    170deg,
    var(--primary-light) 1%,
    var(--primary-color)
  );
  box-shadow: 0px 0px 10px 2px rgb(0 0 0 / 7%);
  border: none;
  transition: all 0.4s;
  background: linear-gradient(0deg, var(--primary-blue), var(--primary-light));
  color: #fff;
}

.btn-primary:hover {
  box-shadow: inset 0 1px 5px rgb(0 0 0 / 25%),
    0px 0px 10px 2px rgb(0 0 0 / 17%);
}

.btn-card {
  display: inline-block;
  background: var(--primary-light);
  color: #fff;
  padding: 6px 16px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-card:hover {
  background-color: var(--primary-blue);
  color: #e4e5f0;
  transform: translateY(-2px);
}

/* header section */
#main-header {
  background-color: var(--primary-dark);
  background-color: transparent;
  padding: 15px 0;
  position: fixed;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#main-header.scrolled {
  background-color: var(--primary-dark);
  box-shadow: 0 1px 30px 0px rgb(0 0 0 / 48%);
}

#main-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  max-width: 1200px;
  margin: auto;
  padding: 0 25px;
}

#main-header .logo {
  transition: color 0.3s ease;
  font-size: initial;
  font-weight: initial;
  display: flex;
  align-items: center;
  margin-left: 5px;
}

#main-header .logo img {
  height: 60px;
  width: auto;
}

#main-header.scrolled .logo {
  color: #fff;
}

.theme-toggle-btn {
  background: var(--glass-background);
  border: 1px solid var(--glass-border);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.theme-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.4);
  transform: rotate(30deg);
}

body.dark-mode .theme-toggle-btn:hover {
  background-color: rgba(0, 0, 0, 0.4);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

/*  hero section */
.hero {
  background: url("https://via.placeholder.com/1920x1080?text=خلفية+سنهور+البحرية+الجديدة")
    no-repeat center center/cover;
  color: #fff;
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--primary-dark) 0%, transparent 70%);
  opacity: 0.3;
}

.hero h1 {
  font-size: 3.8rem;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.3;
  background: linear-gradient(50deg, var(--primary-light), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 span {
  display: block;
  color: var(--accent-color);
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: -1px -1px 3px #0008;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  z-index: 5;
  position: relative;
}

.hero-slider-container {
  position: relative;
  width: 100%;
  max-width: 100vw;
  height: 400px;
  overflow: hidden;
  margin-bottom: 0;
  background: #222;
}

.hero-slider {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-slide {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.hero-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(
    to top,
    var(--primary-color) 10%,
    transparent 100%
  );
  z-index: 3;
  pointer-events: none;
}

.hero-content {
  margin-top: 6rem;
  color: #fff;
  position: relative;
  z-index: 10;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.hero-slider-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-bg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s cubic-bezier(0.77, 0, 0.18, 1),
    transform 1.2s cubic-bezier(0.77, 0, 0.18, 1);
  z-index: 1;
}

.hero-bg-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.auth-links {
  display: flex;
  /* gap: 10px; */
}

.hero-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  width: 100%;
  z-index: 3;
  pointer-events: none;
}

.waves {
  position: relative;
  width: 100%;
  height: 165px;
  min-height: 100px;
  max-height: 150px;
  z-index: 1;
}

.parallax > use {
  animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
}

.parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}

.parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
}

.parallax > use:nth-child(4) {
  animation-delay: -5s;
  animation-duration: 15s;
}

@keyframes move-forever {
  0% {
    transform: translate3d(-90px, 0, 0);
  }
  100% {
    transform: translate3d(85px, 0, 0);
  }
}

#useDark {
  fill: var(--background-general);
}

/* share sections style*/
.section-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 55px;
  position: relative;
  display: inline-block;
  color: var(--text-heading);
}

.section-title::after {
  content: "";
  position: absolute;
  width: 80%;
  height: 5px;
  background: var(--accent-color);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 5px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 50px;
}

/* services section */
.cards-container {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.7rem;
}

.card {
  background: var(--card-background);
  border-radius: 15px;
  padding: 35px;
  box-shadow: 0px 0px 10px 2px rgb(0 0 0 / 7%);
  transition: transform 0.7s ease-in-out;
  text-align: center;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  width: 360px;
}

body.dark-mode .card {
  box-shadow: 0px 0px 7px 2px rgb(123 123 123 / 7%);
}

.card:hover {
  transform: translateY(-15px);
  box-shadow: 0px 0px 10px 3px rgb(0 0 0 / 11%);
}

body.dark-mode .card:hover {
  box-shadow: 0px 0px 10px 3px rgb(123 123 123 / 13%);
}

.card i {
  font-size: 4rem;
  background: linear-gradient(45deg, var(--primary-blue), #086299);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.3s ease;
}
body.dark-mode .card i {
  background: linear-gradient(45deg, #30a8f3, #086299);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.3s ease;
}

.card:hover i {
  transform: scale(1.1);
}

.card h3 {
  font-size: 1.8rem;
  color: var(--text-heading);
}

.card p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
}

/* about section*/
.about-container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.about-map {
  flex: 1;
  min-width: 300px;
  height: 500px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-dark);
}

.about-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.about-details {
  flex: 1.5;
}

.info-block {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.info-block .icon {
  font-size: 2rem;
  color: var(--primary-blue);
  margin-top: 5px;
}

.info-block h4 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text-heading);
}

.info-block p {
  margin: 0;
  line-height: 1.8;
}

/* news section */
.news-grid,
.announcements-grid {
  display: flex;
  flex-direction: column;
  gap: 1.7rem;
  margin-top: 25px;
  width: 75%;
}

.news-item,
.announcement-item {
  background: var(--card-background);
  border-radius: 15px;
  box-shadow: 0px 0px 10px 2px rgb(0 0 0 / 7%);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease,
    background-color 0.5s ease, border-color 0.5s ease;
  border: 1px solid var(--border-color);
}

.news-item:hover,
.announcement-item:hover {
  transform: translateY(-8px);
  box-shadow: 0px 0px 10px 3px rgb(0 0 0 / 11%);
}

body.dark-mode .news-item,
body.dark-mode .announcement-item {
  box-shadow: 0px 0px 7px 2px rgb(123 123 123 / 7%);
}

body.dark-mode .news-item:hover,
body.dark-mode .announcement-item:hover {
  box-shadow: 0px 0px 10px 3px rgb(123 123 123 / 13%);
}

.news-item img,
.announcement-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.news-item:hover img,
.announcement-item:hover img {
  transform: scale(1.05);
}

.news-item h3,
.announcement-item h3 {
  font-size: 1.5rem;
  padding: 20px 25px 0;
  margin-bottom: 10px;
  color: var(--text-heading);
}

.news-item .news-date,
.announcement-item .announcement-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0 25px;
  margin-bottom: 15px;
}
.news-item .news-date i,
.announcement-item .announcement-date i {
  margin-left: 5px;
  color: var(--accent-color);
}

.news-item p,
.announcement-item p {
  font-size: 1rem;
  padding: 0 25px 20px;
  color: var(--text-body);
}

.news-item .read-more,
.announcement-item .read-more {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--text-secondary);
  font-weight: 600;
  transition: color 0.3s ease;
}

.news-item .read-more p:hover,
.announcement-item .read-more p:hover {
  color: var(--primary-blue);
}

.news-item .read-more i,
.announcement-item .read-more i {
  padding: 0 8px;
  transition: all 0.3s ease;
}

.news-item .read-more p:hover i,
.announcement-item .read-more p:hover i {
  padding-right: 16px;
  padding-left: 0px;
}

/* Reveal on Scroll */
.reveal {
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
  transform: translateY(0);
}

/* header style in sub page */
body.sub-page {
  min-height: max-content;
  background-repeat: no-repeat;
  font-family: "Cairo", "Montserrat", sans-serif;
  background-color: var(--background-general);
}

.sub-page #main-header {
  background-color: var(--primary-dark);
}

/* form style */
.form-container {
  box-shadow: 0 8px 32px rgba(44, 62, 80, 0.1);
  margin: 40px auto 0 auto;
  position: relative;
  background-color: var(--card-background);
  padding: 40px;
  border-radius: 15px;
  width: 30rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: max-content;
}

.form-container h2 {
  font-size: 1.7rem;
  margin-bottom: 18px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-secondary);
  font-weight: 600;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  font-size: 1rem;
  background: lightgray;
  background: var(--glass-background);
  transition: border 0.2s;
  color: var(--text-body);
}

.form-group input:focus {
  border: 1.5px solid #1877f2;
  outline: none;
  background: #fff;
  color: var(--primary-color);
}

.switch-auth {
  text-align: center;
  margin-top: 22px;
}

.switch-auth a {
  color: #1877f2;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.switch-auth a:hover {
  color: #145db2;
}

/* footer style */
footer {
  background-color: var(--primary-color);
  color: #fff;
  padding: 30px;
  margin-top: auto;
}

.footer-content {
  margin-bottom: 30px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col h3 {
  color: var(--accent-color);
  margin-bottom: 25px;
  font-size: 1.4rem;
}

.footer-col p,
.footer-col li {
  font-size: 0.95rem;
  line-height: 2;
  color: #fff;
}

.footer-col ul li a {
  color: #fff;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-light);
}

.footer-col p i {
  margin-left: 10px;
  color: var(--accent-color);
}

.footer-bottom a {
  padding: 0 5px;
  margin: 0 5px;
  color: #007adf;
  font-weight: bold;
  text-shadow: 0 1px 1px black;
}

.social-icons {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.social-icons a {
  color: #fff;
  font-size: 1.4rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
  color: var(--primary-light);
  transform: translateY(-5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 0.9rem;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  padding: 3px 12px;
  position: relative;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  background-color: var(--accent-color);
  bottom: -5px;
  right: 0;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
  left: 0;
}

.nav-links a.active {
  background-color: #f3ece533;
  color: #070849;
  border-radius: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btns {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-right: 1rem;
}

.user-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.3rem;
}

.nav-links #logo-sec {
  display: none;
}

@media (max-width: 992px) {
  .about-container {
    flex-direction: column-reverse;
  }
  .about-map {
    width: 100%;
    height: 300px;
  }
  .hero h1 {
    font-size: 3rem;
  }
  .hero p {
    font-size: 1.2rem;
  }
  .about-content {
    flex-direction: column;
    text-align: center;
  }
  .about-text .section-title {
    text-align: center;
  }
  .about-text .section-title::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
  .about-image {
    margin-bottom: 30px;
  }
  .numbers-flex-list {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .number-flex-item {
    width: 100%;
    max-width: 400px;
    justify-content: flex-start;
  }
  .section-subtitle {
    margin-bottom: 0px;
  }
  .section-padding {
    padding: 40px 0;
  }
  .nav-links .btns {
    gap: 0.8rem;
  }
  .user-actions {
    gap: 0.8rem;
  }
  .nav-links {
    gap: 1rem;
  }
  .nav-links a {
    font-size: 0.85rem;
    padding: 3px 4px;
  }
}

@media (max-width: 868px) {
  .nav-links {
    display: flex;
    flex-direction: column;
    background-color: var(--primary-dark);
    position: fixed;
    top: 0;
    right: -70%;
    width: max-content;
    height: 100%;
    padding: 1.1rem;
    box-shadow: 0 0px 14px 2px rgb(0 0 0 / 16%);
    transition: right 0.4s ease;
    z-index: 1000;
  }
  .nav-links a {
    font-size: 1rem;
  }
  .nav-links.active {
    display: flex;
    gap: 0;
    right: 0;
    justify-content: flex-start;
    align-items: center;
  }
  .nav-links.active .btns {
    flex-direction: column;
    position: absolute;
    bottom: 1.1rem;
  }
  .nav-links.active .user-actions {
    padding-top: 1.3rem;
  }
  .nav-links.active .profile-info {
    display: flex;
    flex-direction: column;
    position: unset;
    border-radius: 8px;
    background-color: transparent;
    justify-content: center;
    gap: 8px;
    align-items: flex-end;
    padding: 0px 5px;
  }
  .nav-links.active .profile-info div {
    padding: 0px 4px;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
  }
  .nav-links.active .profile-info p {
    align-items: end;
    color: #fff;
  }
  .profile-info .userName {
    text-align: end;
    margin: 0;
  }
  .auth-links {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .profile-info .logOutBtn {
    width: max-content;
    height: 30px;
    border-radius: 20px;
    padding: 0px 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
  }
  .nav-links.active .profile-circle,
  .dashboard-circle {
    flex-direction: row-reverse;
    align-items: flex-start;
  }
  .nav-links.active .profile-circle {
    border-top: 1px solid #fff;
    padding-top: 0.8rem;
    gap: 0;
  }
  .nav-links #logo-sec {
    display: block;
    border-bottom: 1px solid #fff;
    padding-bottom: 12px;
  }
  .nav-links a::after {
    display: none;
  }
  .nav-links li {
    margin: 15px 0;
  }
  .nav-links .top-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    justify-content: flex-start;
  }
  .nav-links .dashboard-circle,
  .nav-links .profile-circle,
  .nav-links .theme-toggle-btn {
    position: static;
  }
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  .mobile-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  .menu-toggle {
    display: block;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero h1 span {
    display: inline;
  }
  .hero p {
    font-size: 1rem;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .waves {
    height: 66px;
    min-height: 40px;
  }
  .btn {
    padding: 12px 25px;
  }
  .section-title {
    font-size: 2.2rem;
  }
  .section-subtitle {
    font-size: 1rem;
  }
  .profile-reverse {
    flex-direction: column;
  }
  .card {
    width: 450px;
  }
}

@media (max-width: 600px) {
  .form-container {
    padding: 24px 20px 18px 20px;
    width: 23rem;
  }
  .hero-content h1 {
    font-size: 1.2rem;
  }
  .hero-slider,
  .hero-slide,
  .hero-gradient,
  .hero-content {
    width: 100% !important;
  }
  .footer-content {
    flex-direction: column;
  }
  .footer-col {
    align-items: center;
    padding-bottom: 25px;
  }
  .footer-col h3 {
    margin-bottom: 5px;
  }
  .footer-content {
    margin-bottom: 0px;
  }
  .form-container {
    max-height: 75%;
    overflow: auto;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  .card {
    width: 300px;
  }
  .footer-content {
    grid-template-columns: 1fr;
  }
  .footer-col {
    text-align: center;
  }
  .social-icons {
    justify-content: center;
  }
  .footer-content {
    grid-template-columns: 1fr;
  }
  .footer-col {
    text-align: center;
  }
  .form-container {
    width: 18rem;
  }
  .nav-links {
    width: 60%;
  }
  .nav-links li {
    margin: 4px 0;
  }
}

@media (max-width: 321px) {
  .form-container {
    width: 16rem;
  }
  .nav-links {
    width: 70%;
  }
}




/* نافذة الآية */
#ayahModal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(2,8,20,0.55); /* غطاء مظلم بلوري */
  backdrop-filter: blur(6px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
  direction: rtl;
  font-family: "Cairo", sans-serif;
  padding: 24px;
}

#ayahModal.active {
  opacity: 1;
  visibility: visible;
}

/* صندوق المحتوى بنمط زجاجي خفيف ليتناسق مع الموقع */
#ayahContent {
  position: relative;
  width: 100%;
  max-width: 680px;
  background: linear-gradient(180deg, #002a4a57, #08619966);
  border-radius: 12px;
  padding: 26px 28px 20px 28px;
  color: var(--text-body, #ffffff);
  box-shadow: 0 18px 40px rgba(3,10,20,0.55);
  border: 1px solid rgba(255,255,255,0.04);
  transform: translateY(-6px) scale(0.98);
  transition: transform 260ms cubic-bezier(.2,.9,.2,1);
  text-align: center;
}

/* عند الفتح */
#ayahModal.active #ayahContent {
  transform: translateY(0) scale(1);
}

/* ترويسة العنوان في منتصف الصندوق */
#ayahContent h3 {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}

/* نص الآية */
#ayahContent p {
  margin: 8px 0 6px 0;
  font-size: 20px;
  line-height: 1.6;
  color: rgba(255,255,255,0.95);
  font-family: "Amiri", serif; /* نص القرآن */
  direction: rtl;
  word-break: break-word;
}

/* معلومات السورة والآية */
#ayahContent small {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
}

/* زر الإغلاق: أيقونة دائرية على اليسار داخل الصندوق */
#closeAyah {
  position: absolute;
  top: 14px;
  left: 14px; /* top-left كما طلبت */
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 180ms ease;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

/* نص الزر كإكس بدل "إغلاق" */
#closeAyah::after {
  content: "✕";
  display: inline-block;
  transform: translateY(-1px);
}

/* Hover effect */
#closeAyah:hover {
  background: rgba(255,255,255,0.12);
  transform: rotate(90deg);
}

/* صغير ومتماشي مع الموبايل */
@media (max-width: 480px) {
  #ayahContent {
    padding: 18px 16px;
    border-radius: 10px;
  }
  #ayahContent h3 { font-size: 18px; }
  #ayahContent p { font-size: 18px; }
  #closeAyah { top: 10px; left: 10px; width: 34px; height: 34px; font-size: 16px; }
}