/* ====================================================================
   videos.css - تصميم قسم الفيديوهات
   ==================================================================== */

/* ===== Hero Section ===== */
.videos-page {
  min-height: 100vh;
  background: var(--cream-mid, #fdf6e3);
}

.videos-hero {
  position: relative;
  background: linear-gradient(135deg, #1a3d2b 0%, #2d6a4f 50%, #1a3d2b 100%);
  padding: 60px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.videos-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(232, 201, 106, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(149, 213, 178, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.videos-hero-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.videos-badge {
  display: inline-block;
  background: rgba(232, 201, 106, 0.15);
  color: #e8c96a;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(232, 201, 106, 0.3);
  margin-bottom: 16px;
}

.videos-hero h1 {
  color: white;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
}

.videos-hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(15px, 2vw, 18px);
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.videos-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.videos-stat {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(232, 201, 106, 0.25);
  border-radius: 12px;
  padding: 14px 24px;
  min-width: 130px;
}

.videos-stat-num {
  color: #e8c96a;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.videos-stat-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  margin-top: 4px;
}

/* ===== Main Content ===== */
.videos-main {
  max-width: 1200px;
  margin: -40px auto 0;
  padding: 0 24px 80px;
  position: relative;
  z-index: 2;
}

/* ===== Filters ===== */
.videos-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 16px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(26, 61, 43, 0.08);
}

.videos-filter-btn {
  background: #faf8f2;
  color: #1a3d2b;
  border: 1.5px solid rgba(201, 168, 76, 0.2);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.videos-filter-btn:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.5);
}

.videos-filter-btn.active {
  background: linear-gradient(135deg, #1a3d2b, #2d6a4f);
  color: #e8c96a;
  border-color: #c9a84c;
}

/* ===== Search ===== */
.videos-search {
  margin-bottom: 24px;
}

.videos-search input {
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid rgba(201, 168, 76, 0.2);
  border-radius: 12px;
  font-size: 15px;
  background: white;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.videos-search input:focus {
  outline: none;
  border-color: #c9a84c;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

/* ===== Featured Section ===== */
.videos-featured-section {
  margin-bottom: 40px;
}

.videos-featured-section h2,
.videos-all-section h2 {
  color: #1a3d2b;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(201, 168, 76, 0.2);
}

.videos-featured-section .video-card-large {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(26, 61, 43, 0.1);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0;
  border: 1px solid rgba(201, 168, 76, 0.15);
}

@media (max-width: 768px) {
  .videos-featured-section .video-card-large {
    grid-template-columns: 1fr;
  }
}

.video-card-large .thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  background: #1a3d2b;
  cursor: pointer;
  overflow: hidden;
}

.video-card-large .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card-large:hover .thumbnail img {
  transform: scale(1.05);
}

.video-card-large .info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.video-card-large h3 {
  color: #1a3d2b;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.4;
}

.video-card-large .description {
  color: #555;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ===== Videos Grid ===== */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.video-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(26, 61, 43, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(201, 168, 76, 0.1);
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26, 61, 43, 0.15);
}

.video-card .thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a3d2b 0%, #2d6a4f 100%);
  cursor: pointer;
  overflow: hidden;
}

.video-card .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.video-card .thumbnail::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.video-card .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.2s ease, background 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.video-card:hover .play-button {
  background: #e8c96a;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-card .play-button::before {
  content: '';
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #1a3d2b;
  margin-right: -3px;
}

.video-card .duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  z-index: 2;
}

.video-card .featured-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #e8c96a, #c9a84c);
  color: #1a3d2b;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.video-card .orientation-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.video-card .info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-card h3 {
  color: #1a3d2b;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card .tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.video-card .tag {
  background: rgba(149, 213, 178, 0.2);
  color: #1a3d2b;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 500;
}

.video-card .description {
  color: #666;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.video-card .footer {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  margin-top: auto;
}

.video-card .footer button {
  flex: 1;
  background: linear-gradient(135deg, #1a3d2b, #2d6a4f);
  color: #e8c96a;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s ease;
}

.video-card .footer button:hover {
  opacity: 0.9;
}

.video-card .footer .secondary {
  background: transparent;
  color: #1a3d2b;
  border: 1.5px solid rgba(201, 168, 76, 0.3);
  flex: 0 0 auto;
  padding: 8px 14px;
}

.video-card .footer .secondary:hover {
  background: rgba(201, 168, 76, 0.1);
}

/* ===== Empty State ===== */
.videos-empty {
  text-align: center;
  padding: 80px 24px;
  background: white;
  border-radius: 16px;
  border: 2px dashed rgba(201, 168, 76, 0.3);
}

.videos-empty .icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.videos-empty h2 {
  color: #1a3d2b;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
}

.videos-empty p {
  color: #777;
  font-size: 15px;
  margin: 0;
}

/* ===== Disclaimer ===== */
.videos-disclaimer {
  margin-top: 40px;
  padding: 16px 20px;
  background: rgba(232, 201, 106, 0.08);
  border-right: 4px solid #c9a84c;
  border-radius: 8px;
}

.videos-disclaimer p {
  color: #555;
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

/* ===== Modal ===== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

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

.video-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.video-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
  animation: modalSlideUp 0.3s ease;
}

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

.video-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.video-modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

.video-modal-iframe-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  transition: aspect-ratio 0.3s ease;
}

/* فيديوهات عمودية (Shorts/Reels) */
.video-modal-iframe-wrap.vertical {
  aspect-ratio: 9/16;
  max-width: 400px;
  margin: 0 auto;
}

/* فيديوهات مربعة */
.video-modal-iframe-wrap.square {
  aspect-ratio: 1/1;
  max-width: 600px;
  margin: 0 auto;
}

.video-modal-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-modal-info {
  padding: 24px;
}

.video-modal-info h3 {
  color: #1a3d2b;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.4;
}

.video-modal-info p {
  color: #555;
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 20px;
}

.video-modal-related {
  margin-bottom: 20px;
}

.video-modal-related h4 {
  color: #1a3d2b;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
}

.video-modal-related .related-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.video-modal-related .related-tags a {
  background: rgba(149, 213, 178, 0.2);
  color: #1a3d2b;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease;
}

.video-modal-related .related-tags a:hover {
  background: rgba(149, 213, 178, 0.4);
}

.video-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.video-modal-actions .btn {
  flex: 1;
  min-width: 160px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.video-modal-actions .btn:hover {
  opacity: 0.9;
}

.video-modal-actions .btn:active {
  transform: scale(0.98);
}

.video-modal-actions .btn-gold {
  background: linear-gradient(135deg, #e8c96a, #c9a84c);
  color: #1a3d2b;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 640px) {
  .videos-hero {
    padding: 40px 16px 60px;
  }
  
  .videos-main {
    padding: 0 16px 60px;
  }
  
  .videos-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .videos-stats {
    gap: 16px;
  }
  
  .videos-stat {
    min-width: 110px;
    padding: 12px 18px;
  }
  
  .videos-stat-num {
    font-size: 24px;
  }
  
  .video-modal {
    padding: 0;
  }
  
  .video-modal-content {
    border-radius: 0;
    max-height: 100vh;
    height: 100vh;
  }
  
  .video-modal-iframe-wrap {
    border-radius: 0;
  }
}

/* ===== Awadi Theme ===== */
[data-theme="awadi"] .videos-page {
  background: #0d2818;
}

[data-theme="awadi"] .videos-filters,
[data-theme="awadi"] .videos-search input,
[data-theme="awadi"] .video-card,
[data-theme="awadi"] .video-card-large,
[data-theme="awadi"] .videos-empty,
[data-theme="awadi"] .video-modal-content {
  background: #1a3d2b;
  border-color: rgba(232, 201, 106, 0.2);
}

[data-theme="awadi"] .videos-search input,
[data-theme="awadi"] .videos-filter-btn {
  color: #faf8f2;
}

[data-theme="awadi"] .videos-filter-btn {
  background: #2d4a39;
}

[data-theme="awadi"] .video-card h3,
[data-theme="awadi"] .video-card-large h3,
[data-theme="awadi"] .video-modal-info h3,
[data-theme="awadi"] .videos-featured-section h2,
[data-theme="awadi"] .videos-all-section h2,
[data-theme="awadi"] .videos-empty h2 {
  color: #e8c96a;
}

[data-theme="awadi"] .video-card .description,
[data-theme="awadi"] .video-card-large .description,
[data-theme="awadi"] .video-modal-info p {
  color: #c9c0a8;
}
