/* ====== Variables ====== */
:root {
  --primary: #3c8dbc;     /* Calming blue */
  --secondary: #6dbf73;   /* Soft green - growth/help */
  --accent: #f4b400;      /* Optional warm accent (e.g., buttons) */
  --white: #ffffff;
  --dark: #222;
  --text-muted: #555;
  --bg-light: #ffffff;
}

/* ====== Base Styling ====== */
body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-light);
  color: var(--dark);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
}

html, body {
  height: 100%;
}

main {
  flex: 1 0 auto;
}

/* Fallback padding when JS is disabled */
.pt-navbar {
  padding-top: calc(3rem + 60px);
}

/* ====== Navbar ====== */
.navbar {
  padding: 0.3rem;
}

.navbar-brand img {
  height: 40px;
}

#mainNavbar,
#bottomNavbar {
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#mainNavbar.hidden,
#bottomNavbar.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Language switcher styling */
.navbar .text-primary {
  transition: color 0.3s ease;
}

.navbar .text-primary:hover {
  color: var(--secondary);
}

.navbar a .material-symbols-rounded {
  font-size: 1.4rem;
}

.navbar a span {
  font-size: 0.9rem;
  margin-left: 5px;
}

/* ====== Hero Section ====== */
.hero-section {
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.hero-section video {
  object-fit: cover;
  position: absolute;
  height: 100%;
  width: 100%;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2;
  padding: 2rem;
}

/* ====== Buttons ====== */
.btn-outline-light:hover {
  background-color: var(--white);
  color: var(--primary);
}

.btn-gradient {
  background: linear-gradient(135deg, #007BFF, #00BFFF);
  border: none;
  color: #fff !important;
  transition: 0.3s ease;
}

.btn-gradient:hover {
  background: linear-gradient(135deg, #0056b3, #009acd);
  color: #fff;
}

/* ====== Stats Icons ====== */
.stats-section .icon-wrapper {
  background-color: var(--primary);
  color: var(--white);
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}

/* ====== Cards ====== */
.card,
.project-card,
.news-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 10px;
}

.card:hover,
.project-card:hover,
.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.card-title {
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.card-text,
.project-card .card-text,
.news-card .card-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ====== Images ====== */
.card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.object-fit-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.news-content img {
  max-width: 100%;
  height: auto;
}

/* ====== Footer ====== */
footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 2rem 0;
  text-align: center;
}

footer img {
  height: 40px;
  margin-bottom: 1rem;
}

footer p,
footer small {
  margin-bottom: 0.25rem;
}

/* ====== Bottom Navbar (Mobile) ====== */
.navbar.fixed-bottom a {
  font-size: 0.85rem;
  text-decoration: none;
}

.navbar.fixed-bottom i {
  display: block;
  font-size: 1.2rem;
}

#bottomNavbar .text-muted {
  transition: color 0.3s ease;
}

#bottomNavbar .text-muted:hover {
  color: var(--primary);
}

#bottomNavbar a {
  font-size: 0.9rem;
  text-decoration: none;
}

#bottomNavbar .material-symbols-rounded {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

#bottomNavbar .navbar-nav .nav-item {
  padding: 0.5rem 1rem;
}

/* ====== Responsive Spacing Fixes ====== */
@media (max-width: 991.98px) {
  body {
    padding-bottom: 4.5rem; /* Space for fixed bottom navbar */
  }

  footer {
    padding-bottom: 3.7rem;
  }
}

@media (max-width: 767.98px) {
  footer {
    padding-bottom: 2rem;
  }
}

/* ====== Material Icons ====== */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Fix navbar item spacing in RTL */
[dir="rtl"] .navbar .nav-link {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
