/* Structure Detail - Moukhayami Reference Style */

/* Page Header Specifics */
.structure-detail-header {
  background-color: var(--color-secondary-dark);
  position: relative;
  margin-bottom: 0px;
}

/* Ensure header content is always visible */
.structure-detail-header .header-content {
  position: relative;
  z-index: 10;
  padding-top: 80px;
}

/* Layout & Containers */
.structure-page-wrapper {
  background-color: var(--color-white);
  padding: 60px 0 80px;
}

.breadcrumb-bar {
  background-color: var(--color-primary);
  padding: 15px 0;
  margin-bottom: 40px;
  color: white;
  font-weight: 600;
}

.breadcrumb-content a {
  color: rgba(255, 255, 255, 0.9);
}
.breadcrumb-content a:hover {
  color: white;
  text-decoration: underline;
}

.main-layout-container {
  display: flex;
  gap: var(--gap-lg); /* 40px -> 2rem/3rem/4rem responsive */
  align-items: flex-start;
  position: relative;
  padding-bottom: 60px;
}

.sidebar-column {
  flex: 0 0 320px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-md); /* 30px -> responsive */
  position: sticky;
  top: 20px;
}

/* Main Content Column */
.main-content-column {
  flex: 1;
  min-width: 0;
}

/* Sidebar Widgets */
.sidebar-widget {
  margin-bottom: 20px;
}

.widget-title {
  color: var(--color-secondary-dark);
  font-size: 1.2rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
}

/* Capacity Grid */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-sm); /* 15px -> responsive */
}

.spec-card {
  background: var(--color-bg-alt);
  padding: 20px 10px;
  text-align: center;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.spec-card:hover {
  transform: translateY(-3px);
  background: #f0fff4;
}

.spec-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: 5px;
}

.spec-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* 2. Opening Hours */
.hours-content {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  font-size: 1.1rem;
  color: var(--color-text);
}

.hours-content i {
  color: var(--color-primary);
}

/* 2. Contact Info */
.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  margin-bottom: 15px;
  color: var(--color-text);
  font-size: 0.95rem;
}
.contact-list li i {
  color: var(--color-primary);
  width: 20px;
  text-align: center;
}

/* 3. Map */
.mini-map-container {
  height: 200px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.mini-map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Main Content --- */

/* 1. Top Gallery Row */
.top-gallery-row {
  display: flex;
  gap: var(--gap-sm);
  margin-bottom: 30px;
  height: 250px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
  padding-bottom: 10px;
}

/* Custom Scrollbar for Webkit */
.top-gallery-row::-webkit-scrollbar {
  height: 8px;
}
.top-gallery-row::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
  border-radius: 4px;
}
.top-gallery-row::-webkit-scrollbar-thumb {
  background-color: var(--color-border);
  border-radius: 4px;
}
.top-gallery-row::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-text-muted);
}

.gallery-strip-img {
  flex: 0 0 auto;
  width: 350px;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.gallery-strip-img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

/* 2. Info Box (Gray Box) */
.info-box-container {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 30px;
  display: flex;
  gap: var(--gap-lg);
  margin-bottom: 40px;
}

.info-box-header {
  flex: 1;
  border-right: 1px solid var(--color-border);
  padding-right: 30px;
}

[dir="rtl"] .info-box-header {
  border-right: none;
  border-left: 1px solid var(--color-border);
  padding-right: 0;
  padding-left: 30px;
}

.info-box-header h1 {
  font-size: 1.5rem;
  color: var(--color-secondary-dark);
  margin-bottom: 10px;
}
.location-subtitle {
  color: var(--color-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  margin: 0;
  font-size: 1rem;
}

.location-subtitle i {
  color: var(--color-primary);
}

.mini-stat {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  font-size: 1.1rem;
  color: var(--color-text);
  font-weight: 600;
}

.mini-stat i {
  color: var(--color-primary);
  font-size: 1.2rem;
}

.info-box-features {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-md);
  align-items: center;
}
.info-box-features h4 {
  color: var(--color-secondary);
  font-size: 1.1rem;
  margin-bottom: 15px;
}
.check-list {
  list-style: none;
  padding: 0;
}
.check-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 8px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.check-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 800;
}
[dir="rtl"] .check-list li {
  padding-left: 0;
  padding-right: 25px;
}
[dir="rtl"] .check-list li::before {
  left: auto;
  right: 0;
}

/* 3. Navigation Tabs */
.content-tabs {
  display: flex;
  background: var(--color-primary);
  padding: 0 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 30px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: white;
  padding: 15px 25px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  opacity: 0.8;
}
.tab-btn:hover {
  opacity: 1;
}
.tab-btn.active {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}
.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-accent);
}

/* 4. Activities & Description */
.panel-title {
  color: var(--color-primary);
  font-size: 1.4rem;
  margin-bottom: 20px;
}

/* Tab Panels */
.tab-panel {
  display: none;
  padding: 30px 0;
}

.tab-panel.active {
  display: block;
}

/* Featured Image Container */
.featured-image-container {
  width: 100%;
  margin-bottom: 30px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 9;
  background-color: var(--color-bg-alt);
}

.featured-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-image-container:hover .featured-img {
  transform: scale(1.03);
}

.activities-grid {
  display: flex;
  gap: var(--gap-md);
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  background: white;
  padding: 15px 25px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-weight: 700;
  color: var(--color-secondary-dark);
}
.activity-item i {
  font-size: 1.5rem;
  color: var(--color-primary);
}

.text-content {
  line-height: 1.8;
  color: var(--color-text);
}

/* Responsive */
@media (max-width: 900px) {
  .main-layout-container {
    flex-direction: column-reverse;
    flex-direction: column;
  }

  .sidebar-column {
    flex: auto;
    width: 100%;
    order: 2;
  }
  .main-content-column {
    width: 100%;
    order: 1;
  }

  .info-box-container {
    flex-direction: column;
    gap: var(--gap-md);
  }

  [dir="rtl"] .info-box-header,
  .info-box-header {
    border: none;
    padding: 0;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
  }

  .top-gallery-row {
    height: 200px;
    overflow-x: auto;
  }
  .gallery-strip-img {
    min-width: 80%;
  }
}

/* Lightbox Styles */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  direction: ltr;
}

.lightbox-content {
  position: relative;
  max-width: 85%;
  max-height: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  pointer-events: none;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  transition: opacity 0.2s ease;
}

/* Close Button */
.close-lightbox {
  position: fixed;
  top: 30px;
  right: 30px;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10002;
}

.close-lightbox:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Navigation Buttons */
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2.5rem;
  padding: 20px;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.2s ease;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

[dir="rtl"] .close-lightbox {
  right: auto;
  left: 30px;
}

[dir="rtl"] .lightbox-prev {
  left: 30px;
  right: auto;
  transform: translateY(-50%);
}

[dir="rtl"] .lightbox-next {
  right: 30px;
  left: auto;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .lightbox-content {
    max-width: 95%;
  }

  .close-lightbox {
    top: 20px;
    right: 20px;
    font-size: 2rem;
    width: 40px;
    height: 40px;
  }

  [dir="rtl"] .close-lightbox {
    right: auto;
    left: 20px;
  }

  .lightbox-nav {
    padding: 10px;
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
  }

  .lightbox-prev {
    left: 10px;
  }
  .lightbox-next {
    right: 10px;
  }

  [dir="rtl"] .lightbox-prev {
    left: 10px;
    right: auto;
  }
  [dir="rtl"] .lightbox-next {
    right: 10px;
    left: auto;
  }
}
