/* أنماط التبويبات */
.room-tabs {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

/* Modern browsers */
.room-tabs {
    scrollbar-width: thin;
}

/* Webkit browsers (Chrome, Safari, etc) */
.room-tabs::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.room-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.room-tabs::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}
.room-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: #f5f5f5;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.room-tab.active {
    background: var(--secondary-color);
    color: white;
}

/* أنماط الشبكة */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

/* أنماط البحث */
.search-container {
    position: relative;
    max-width: 300px;
    margin: 15px auto 0;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* أنماط المشاريع */
.project-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: zoom-in;
    text-decoration: none;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.project-image:hover .project-overlay {
    opacity: 1;
}

.project-image:hover img {
    transform: scale(1.1);
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 768px) {
    .modal-content {
        padding: 15px;
        width: 100%;
        max-width: none;
        margin: 0;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .style-modal {
        padding: 0;
    }

    .modal-header {
        padding: 20px;
    }

    .style-title {
        font-size: 22px;
    }

    .style-description {
        font-size: 14px;
    }

    .room-tabs {
        padding: 15px;
    }

    .room-tab {
        padding: 10px 15px;
        font-size: 14px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 15px;
        max-height: calc(100vh - 180px);
    }

    .search-container {
        max-width: 100%;
        padding: 0 15px;
    }

    .welcome-section {
        min-height: 100vh;
        padding: 15px;
    }

    .welcome-content {
        padding: 0 15px;
    }
}

/* Add specific styles for very small devices */
@media (max-width: 480px) {
    .style-title {
        font-size: 20px;
    }

    .room-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* تحسينات إضافية للمشاريع */
.project-title {
    color: white;
    font-size: 18px;
    margin-bottom: 5px;
}

.project-category {
    color: var(--secondary-color);
    font-size: 14px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    backface-visibility: hidden;
}

.zoom-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.project-image:hover .zoom-btn {
    transform: translateY(0);
    opacity: 1;
}

/* تحسينات للتمرير */
.projects-grid::-webkit-scrollbar {
    width: 8px;
}

.projects-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.projects-grid::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

.projects-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* تحسينات للبحث */
.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.1);
}

.search-input:focus + .search-icon {
    color: var(--secondary-color);
}
  /* تحسينات للمودال */
  .modal-close {
      position: absolute;
      top: 15px;
      right: 15px;
      width: 40px;
      height: 40px;
      background: var(--secondary-color);
      border: none;
      border-radius: 50%;
      color: white;
      font-size: 18px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease;
      z-index: 10;
  }

  .modal-close:hover {
      transform: rotate(90deg);
      background: var(--primary-color);
  }

  /* تحسين عرض المصغرات في Fancybox */
  .fancybox__thumbs {
      padding: 10px 0;
  }

  .fancybox__thumb {
      width: 100px;
      height: 75px;
      opacity: 0.7;
      transition: opacity 0.3s ease;
  }

  .fancybox__thumb:hover,
  .fancybox__thumb.is-selected {
      opacity: 1;
  }

  /* تحسينات لعرض الصور */
  .fancybox__backdrop {
      background-color: rgba(0, 0, 0, 0.9);
  }

  .fancybox__content {
      padding: 0;
      border-radius: 8px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }

  .fancybox__image {
      max-height: 90vh;
      object-fit: contain;
  }

  .fancybox__caption {
      text-align: center;
      font-family: 'Tajawal', sans-serif;
  }

  /* تحسين عرض الأزرار */
  .fancybox__toolbar {
      background: transparent;
      padding: 16px;
  }

  .fancybox__toolbar button {
      color: white;
      background: rgba(0, 0, 0, 0.5);
  }

  .fancybox__button {
      color: #fff;
      background: rgba(0,0,0,0.5);
      border-radius: 50%;
  }

  /* تحسين زر الإغلاق في Fancybox */
  .fancybox__button--close {
      background-color: var(--secondary-color) !important;
      color: white !important;
      width: 40px !important;
      height: 40px !important;
      border-radius: 50% !important;
      position: absolute !important;
      top: 10px !important;
      right: 10px !important;
      z-index: 99999 !important;
      opacity: 1 !important;
      visibility: visible !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
  }
  
  .fancybox__button--close:hover {
      background-color: var(--primary-color) !important;
      transform: rotate(90deg) !important;
      transition: all 0.3s ease !important;
  }
  
  /* تأكد من أن الزر مرئي دائمًا */
  .fancybox__toolbar {
      opacity: 1 !important;
      visibility: visible !important;
  }

  .fancybox__toolbar button:hover {
      color: var(--secondary-color);
      background: rgba(0, 0, 0, 0.7);
  }

  /* إزالة الخلفية البيضاء */
  .fancybox__toolbar .carousel__button {
      background: transparent;
  }

  .fancybox__toolbar .carousel__button:hover {
      background: rgba(0, 0, 0, 0.7);
  }

  /* تحسين مظهر الأزرار */
  .carousel__button {
      background: transparent !important;
  }

  .carousel__button svg {
      filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5));
  }

  /* تحسين مظهر المصغرات */
  .fancybox__thumbs {
      background: rgba(0, 0, 0, 0.3);
      padding: 5px 0;
  }

  .fancybox__thumb {
      width: 100px;
      height: 75px;
      opacity: 0.7;
      transition: opacity 0.3s ease;
      border-radius: 4px;
  }

  .fancybox__thumb:hover,
  .fancybox__thumb.is-selected {
      opacity: 1;
  }

  /* تحسين مظهر العنوان */
  .fancybox__caption {
      text-align: center;
      font-family: 'Tajawal', sans-serif;
      background: rgba(0, 0, 0, 0.7);
      padding: 10px;
      border-radius: 4px;
  }

  .customFadeIn {
      animation: customFadeIn 0.3s ease-out;
  }

  .customFadeOut {
      animation: customFadeOut 0.3s ease-out;
  }

  @keyframes customFadeIn {
      from { opacity: 0; transform: scale(0.95); }
      to { opacity: 1; transform: scale(1); }
  }

  @keyframes customFadeOut {
      from { opacity: 1; transform: scale(1); }
      to { opacity: 0; transform: scale(0.95); }
  }

  .fancybox__toolbar {
      --f-button-width: 46px;
      --f-button-height: 46px;
      --f-button-border-radius: 23px;
      --f-button-color: #fff;
      --f-button-bg: rgba(24, 24, 27, 0.65);
  }

  .fancybox__content {
      --f-content-bg: transparent;
      border-radius: 8px;
      padding: 0;
  }

  .fancybox__container {
      --f-bg: rgba(0, 0, 0, 0.85);
  }
/* إضافة أنماط للعناصر غير التفاعلية */
[inert] {
    pointer-events: none;
    cursor: default;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.style-modal.active ~ *:not(.style-modal) {
    filter: blur(3px);
}

/* أنماط قسم الترحيب */
.welcome-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

.welcome-content {
    text-align: center;
    max-width: 100%;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
