/* ========================================
   صفحة الأنشطة - activities.html
   ======================================== */

:root {
  --gov-primary: #0D2D4A;
  --gov-secondary: #1A4971;
  --text-dark: #1A202C;
  --text-medium: #4A5568;
  --text-light: #FFFFFF;
  --bg-white: #FFFFFF;
  --bg-light: #F7FAFC;
  --border-light: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #1e3a5f;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gov-primary), var(--gov-secondary));
  border-radius: 10px;
  border: 2px solid #0a1929;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--gov-secondary), var(--gov-primary));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Tajawal', sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  color: var(--gov-primary);
  font-weight: 700;
}

p {
  color: var(--text-medium);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* شريط التنقل */
.navbar {
  background: linear-gradient(135deg, var(--gov-primary) 0%, var(--gov-secondary) 100%);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand h2 {
  color: var(--text-light);
  margin: 0;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-light);
  margin: 3px 0;
}

/* Activities Header */
.activities-header {
  background: linear-gradient(135deg, var(--gov-primary) 0%, var(--gov-secondary) 100%);
  color: var(--text-light);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.activities-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".1" fill="%23fff"/></svg>');
  background-size: cover;
  opacity: 0.1;
}

.activities-header-content {
  position: relative;
  z-index: 1;
}

.activities-header-icon {
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  border: 4px solid rgba(255,255,255,0.3);
}

.activities-header-icon svg {
  stroke: var(--text-light);
}

.activities-header-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.activities-header-description {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* قسم الأنشطة */
.activities-section {
  padding: 3rem 0;
}

/* Activities Controls */
.activities-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 300px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-white);
  border: 2px solid var(--border-light);
  border-radius: 2rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s;
}

.search-box:focus-within {
  border-color: var(--gov-primary);
  box-shadow: 0 0 0 4px rgba(13, 45, 74, 0.1);
}

.search-box svg {
  stroke: var(--gov-secondary);
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: 'Tajawal', sans-serif;
  background: transparent;
}

.search-box input::placeholder {
  color: var(--text-medium);
}

.activities-filters {
  display: flex;
  gap: 0.75rem;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-white);
  border: 2px solid var(--border-light);
  border-radius: 2rem;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn svg {
  stroke: var(--gov-secondary);
  transition: transform 0.3s;
}

.filter-btn:hover {
  border-color: var(--gov-primary);
  background: rgba(13, 45, 74, 0.05);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--gov-primary), var(--gov-secondary));
  border-color: var(--gov-primary);
  color: var(--text-light);
}

.filter-btn.active svg {
  stroke: var(--text-light);
}

/* شبكة الأنشطة */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 991px) {
  .activities-grid {
    grid-template-columns: 1fr;
  }
}

/* بطاقة النشاط */
.activity-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.activity-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--gov-primary), var(--gov-secondary));
  transition: width 0.3s;
}

.activity-card:hover {
  box-shadow: 0 12px 32px rgba(13, 45, 74, 0.15);
  transform: translateY(-8px);
}

.activity-card:hover::before {
  width: 8px;
}

.activity-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.activity-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--gov-primary) 0%, var(--gov-secondary) 100%);
  color: var(--text-light);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(13, 45, 74, 0.2);
}

.activity-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.activity-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gov-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  transition: color 0.3s;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  word-break: break-word;
}

.activity-card:hover .activity-title {
  color: var(--gov-secondary);
}

.activity-date {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(13,45,74,0.1), rgba(26,73,113,0.1));
  color: var(--gov-primary);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.activity-date svg {
  width: 14px;
  height: 14px;
  stroke: var(--gov-secondary);
}

.activity-description {
  color: var(--text-medium);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.activity-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border-light);
  margin-top: auto;
}

.activity-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.activity-status.completed {
  background: rgba(72,187,120,0.1);
  color: #48BB78;
}

.activity-status.ongoing {
  background: rgba(66,153,225,0.1);
  color: #4299E1;
}

.activity-status.planned {
  background: rgba(237,137,54,0.1);
  color: #ED8936;
}

.activity-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gov-primary);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s;
}

.activity-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s;
}

.activity-link:hover {
  background: rgba(13, 45, 74, 0.05);
  color: var(--gov-secondary);
}

.activity-link:hover svg {
  transform: translateX(-3px);
}

/* No Activities Placeholder */
.no-activities-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(247,250,252,0.95));
  border-radius: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  word-break: break-word;
}

.no-activities-placeholder::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(13, 45, 74, 0.03) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.placeholder-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  background: linear-gradient(135deg, rgba(13, 45, 74, 0.05), rgba(26, 73, 113, 0.05));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.placeholder-icon svg {
  stroke: var(--gov-secondary);
  opacity: 0.6;
}

.no-activities-placeholder h3 {
  font-size: 1.75rem;
  color: var(--gov-primary);
  margin-bottom: 1rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.no-activities-placeholder p {
  font-size: 1.125rem;
  color: var(--text-medium);
  line-height: 1.8;
  margin: 0 0 1.5rem 0;
  z-index: 1;
  max-width: 100%;
  word-wrap: break-word;
  word-break: break-word;
  padding: 0 1rem;
}

.no-activities-placeholder p strong {
  color: var(--gov-primary);
  font-weight: 600;
}

.placeholder-decoration {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--gov-primary), var(--gov-secondary));
  margin: 2rem auto 0;
  border-radius: 2px;
  position: relative;
  z-index: 1;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination button {
  padding: 0.75rem 1.25rem;
  background: var(--bg-white);
  border: 2px solid var(--border-light);
  border-radius: 0.5rem;
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s;
}

.pagination button:hover {
  border-color: var(--gov-primary);
  background: rgba(13, 45, 74, 0.05);
}

.pagination button.active {
  background: linear-gradient(135deg, var(--gov-primary), var(--gov-secondary));
  border-color: var(--gov-primary);
  color: var(--text-light);
}

/* التذييل */
.footer {
  background: linear-gradient(135deg, var(--gov-primary) 0%, #0a1f33 100%);
  color: var(--text-light);
  padding: 3rem 0 1rem;
  margin-top: auto;
}

.footer h1, .footer h2, .footer h3, .footer h4 {
  color: var(--text-light);
}

.footer p, .footer a {
  color: rgba(255,255,255,0.9);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

/* استجابة الموبايل */
@media (max-width: 991px) {
  .activities-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    min-width: 100%;
  }
  
  .activities-filters {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .activities-header {
    padding: 3rem 0;
  }
  
  .activities-header-icon {
    width: 80px;
    height: 80px;
  }
  
  .activities-header-icon svg {
    width: 50px;
    height: 50px;
  }
  
  .activities-header-title {
    font-size: 2rem;
  }
  
  .activities-header-description {
    font-size: 1rem;
  }
  
  .no-activities-placeholder {
    padding: 2rem 1rem;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .placeholder-icon {
    width: 100px;
    height: 100px;
  }
  
  .placeholder-icon svg {
    width: 60px;
    height: 60px;
  }
  
  .no-activities-placeholder h3 {
    font-size: 1.5rem;
  }
  
  .no-activities-placeholder p {
    font-size: 0.95rem;
    padding: 0 0.5rem;
    max-width: 100%;
  }
  .nav-menu {
    position: fixed;
    right: -100%;
    top: 60px;
    flex-direction: column;
    background: var(--gov-primary);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    padding: 2rem 0;
    z-index: 999;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .activities-grid {
    grid-template-columns: 1fr;
  }
  
  .activity-card {
    padding: 1.25rem;
  }
  
  .activity-footer {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
