:root {
  --primary-color: #e81a38;
  --primary-hover: #c5142e;
  --secondary-color: #333333;
  --bg-color: #f8f9fa;
  --text-color: #333333;
  --skeleton-bg: #e2e5e7;
  --skeleton-highlight: #f1f3f4;
}

html {
  scroll-behavior: smooth;
}

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

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

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
}

.soft-shadow {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

/* Premium Grid & Card Utilities */
.grid-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #fff;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.hover-lift {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.hover-lift:hover {
    transform: translateY(-12px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
    z-index: 5;
}

/* Glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.glass-badge {
    background: rgba(232, 26, 56, 0.15) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(232, 26, 56, 0.2);
    color: var(--primary-color) !important;
    font-weight: 700;
}

.img-aspect-ratio {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 Aspect Ratio */
    overflow: hidden;
    background: #f1f3f4;
}

.img-aspect-ratio img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hover-lift:hover .img-aspect-ratio img {
    transform: scale(1.1);
}

/* Empty State - Centered White Card */
.empty-state {
  padding: 5rem 2rem;
  text-align: center;
  background: #ffffff;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  max-width: 600px;
  margin: 3rem auto;
  position: relative;
  z-index: 1;
}

.empty-state-icon {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #fdfdfd, #f5f5f5);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 35% 65% 70% 30% / 30% 30% 70% 70%;
  font-size: 3.5rem;
  margin-bottom: 2rem;
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.05), inset 5px 5px 15px rgba(255, 255, 255, 0.8);
  animation: morphing 8s infinite alternate ease-in-out;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes morphing {
  0% {
    border-radius: 35% 65% 70% 30% / 30% 30% 70% 70%;
  }

  100% {
    border-radius: 65% 35% 30% 70% / 70% 70% 30% 30%;
  }
}

.empty-state:hover .empty-state-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  box-shadow: 0 20px 40px rgba(232, 26, 56, 0.2);
}

.empty-state h3 {
  font-size: 2rem;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-primary-subtle {
  background-color: rgba(232, 26, 56, 0.1) !important;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.bg-main-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
  color: white !important;
}

.bg-main-gradient p, .bg-main-gradient h4, .bg-main-gradient span {
  color: white !important;
}

#main-top-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
  color: white !important;
}

.page-header {
  padding: 4rem 0;
  margin-bottom: 2rem;
}

/* Footer Styling */
#main-footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%) !important;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--primary-color);
}

#main-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 20%, rgba(232, 26, 56, 0.05) 0%, transparent 40%);
  pointer-events: none;
}

/* Unified Button Styling */
.btn {
  font-weight: 600;
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

/* Primary Solid Button */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(232, 26, 56, 0.4);
  color: white;
}

/* Outline Primary Button */
.btn-outline-primary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(232, 26, 56, 0.4);
}

/* Dark Button */
.btn-dark {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: white;
}

.btn-dark:hover,
.btn-dark:focus {
  background-color: #1a1a1a;
  border-color: #1a1a1a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Light / Outline Secondary Button */
.btn-outline-secondary {
  border-color: #ced4da;
  color: var(--secondary-color);
}

.btn-outline-secondary:hover {
  background-color: #f8f9fa;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Circular Buttons (Social Icons) */
.btn.rounded-circle {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Skeleton Loading Animation */
@keyframes skeleton-loading {
  0% {
    background-color: var(--skeleton-bg);
  }

  50% {
    background-color: var(--skeleton-highlight);
  }

  100% {
    background-color: var(--skeleton-bg);
  }
}

.skeleton {
  animation: skeleton-loading 1.5s infinite ease-in-out;
  border-radius: 4px;
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
  width: 100%;
}

.skeleton-text-half {
  width: 50%;
}

.skeleton-img {
  height: 200px;
  width: 100%;
}

/* Card Hover Effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* RTL Support */
html[dir="rtl"] {
  text-align: right;
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html[dir="rtl"] .me-3 {
  margin-right: 0 !important;
  margin-left: 1rem !important;
}

html[dir="rtl"] .ms-3 {
  margin-left: 0 !important;
  margin-right: 1rem !important;
}

/* Navbar */
.navbar-brand img {
  height: 50px;
}

.hero-section {
  position: relative;
  background-size: cover;
  background-position: center;
  color: white;
  height: calc(100vh - 110px);
  display: flex;
  align-items: center;
}

.hero-img {
  height: calc(100vh - 110px);
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Utilities */
.hover-white:hover {
  color: white !important;
}

.page-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 4rem 0;
  margin-bottom: 3rem;
  text-align: center;
}

.page-header h1 {
  font-weight: 700;
  margin-bottom: 0;
}

/* Project Cards Premium Styles */
.project-card {
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-card .card-img-top {
  height: 240px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .card-img-top {
  transform: scale(1.05);
}

.project-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 15px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

html[dir="rtl"] .project-badge {
  right: auto;
  left: 15px;
}

.badge-ongoing {
  background-color: #28a745;
  color: white;
}

.badge-completed {
  background-color: var(--secondary-color);
  color: white;
}

/* Filter Tabs */
.filter-nav .nav-link {
  color: var(--secondary-color);
  font-weight: 600;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  margin: 0 5px;
  transition: all 0.3s ease;
}

.filter-nav .nav-link.active {
  background-color: var(--primary-color) !important;
  color: white !important;
  box-shadow: 0 5px 15px rgba(232, 26, 56, 0.3);
}

/* Project Detail */
.project-detail-header {
  background-color: #f0f2f5;
  border-radius: 30px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.project-detail-img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.project-sidebar {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 100px;
}

.project-meta-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.project-meta-icon {
  width: 40px;
  height: 40px;
  background: rgba(232, 26, 56, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  margin-right: 1rem;
  font-size: 1.2rem;
}

html[dir="rtl"] .project-meta-icon {
  margin-right: 0;
  margin-left: 1rem;
}

.project-content {
  line-height: 1.8;
  font-size: 1.1rem;
}

/* News Article Cards */
.news-card {
  border-radius: 15px;
  overflow: hidden;
  border: none;
  background: white;
  transition: all 0.3s ease;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.news-card .card-img-top {
  height: 220px;
  object-fit: cover;
}

.news-date-badge {
  display: inline-block;
  background: rgba(232, 26, 56, 0.1);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Sidebar Widgets */
.widget {
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

.recent-post-item {
  display: flex;
  gap: 15px;
  margin-bottom: 1.25rem;
}

.recent-post-img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

.recent-post-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.recent-post-date {
  font-size: 0.75rem;
  color: #888;
}

/* News Content Typography */
.news-content {
  font-size: 1.15rem;
  line-height: 1.9;
  color: #444;
}

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

.news-detail-header {
  height: 400px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.news-detail-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-detail-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 2rem 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
}

/* Events & Calendar Sleek Redesign */
#calendar {
  background: #ffffff;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
  border: 1px solid #f0f0f0;
}

.fc {
  --fc-border-color: #f5f5f5;
  --fc-daygrid-event-dot-width: 8px;
  --fc-today-bg-color: #fff9fa;
  font-family: 'Cairo', sans-serif;
}

.fc .fc-toolbar-title {
  font-size: 1.5rem !important;
  font-weight: 800;
  color: var(--secondary-color);
}

.fc .fc-button {
  background: white !important;
  border: 1px solid #eee !important;
  color: #555 !important;
  font-weight: 700 !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

.fc .fc-button:hover {
  background: #f8f9fa !important;
  border-color: #ddd !important;
}

.fc .fc-button-active {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.fc th {
  background: #fdfdfd !important;
  padding: 12px 0 !important;
  color: #999;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid #f5f5f5 !important;
}

.fc-daygrid-day {
  background: white !important;
}

.fc .fc-daygrid-day.fc-day-today {
  background: #fff9fa !important;
}

.fc .fc-daygrid-day-number {
  padding: 12px !important;
  font-weight: 700;
  color: #333;
  font-size: 1rem;
}

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  color: var(--primary-color);
  font-weight: 800;
}

.premium-event {
  background: var(--primary-color) !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  box-shadow: 0 4px 8px rgba(232, 26, 56, 0.15) !important;
}

.fc-theme-standard td,
.fc-theme-standard th {
  border: 1px solid #f5f5f5 !important;
}

.fc .fc-daygrid-body {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}

/* Event List Enhancements */
.event-card-horizontal {
  background: white;
  border-radius: 28px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.event-date-overlay {
  position: absolute;
  top: 15px;
  left: 15px;
  background: white;
  padding: 8px 15px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  z-index: 2;
  display: flex;
  flex-direction: column;
  line-height: 1;
}

html[dir="rtl"] .event-date-overlay {
  left: auto;
  right: 15px;
}

.event-date-overlay .day {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
}

.event-date-overlay .month {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--secondary-color);
  margin-top: 2px;
}

.calendar-legend span {
  display: flex;
  align-items: center;
}

.calendar-legend i {
  font-size: 0.6rem;
}

.section-title-wrapper h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section-title-wrapper h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

html[dir="rtl"] .section-title-wrapper h2::after {
  left: auto;
  right: 0;
}