/* ============================================
   GALLERY PAGE SPECIFIC STYLES
   ============================================ */

/* ============================================
   GALLERY BANNER
   ============================================ */
.gallery-banner {
  position: relative;
  background: linear-gradient(
    135deg,
    var(--secondary-color) 0%,
    var(--primary-color) 100%
  );
  overflow: hidden;
}

.banner-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float-random 20s ease-in-out infinite;
}

.floating-shape.shape-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  left: 10%;
  animation-delay: 0s;
}

.floating-shape.shape-2 {
  width: 200px;
  height: 200px;
  bottom: -50px;
  right: 15%;
  animation-delay: 7s;
}

.floating-shape.shape-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 50%;
  animation-delay: 14s;
}

@keyframes float-random {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(50px, -30px) rotate(90deg);
  }
  50% {
    transform: translate(-30px, 50px) rotate(180deg);
  }
  75% {
    transform: translate(30px, 30px) rotate(270deg);
  }
}

/* ============================================
   GALLERY STATS
   ============================================ */
.gallery-stats {
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.stats-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.stat-card {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.stat-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.1) 0%,
    rgba(29, 53, 87, 0.1) 100%
  );
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon i {
  font-size: var(--fs-2xl);
  color: var(--primary-color);
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-family: var(--font-primary);
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--secondary-color);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-top: var(--spacing-xs);
  display: block;
}

/* ============================================
   GALLERY FILTER SECTION
   ============================================ */
.gallery-filter-section {
  background: var(--white);
  padding: var(--spacing-xl) 0;
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-xl);
  flex-wrap: wrap;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  flex: 1;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-normal);
  white-space: nowrap;
}

.filter-btn i {
  font-size: var(--fs-base);
  color: var(--primary-color);
}

.filter-btn .count {
  background: var(--gray-200);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-left: var(--spacing-xs);
}

.filter-btn:hover {
  background: var(--gray-100);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
}

.filter-btn.active i {
  color: var(--white);
}

.filter-btn.active .count {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

/* View Toggle */
.view-toggle {
  display: flex;
  gap: var(--spacing-xs);
}

.view-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-normal);
}

.view-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.view-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
}

/* ============================================
   GALLERY GRID
   ============================================ */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-xl);
}

@media (min-width: 992px) {
  .gallery-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .gallery-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Featured items span 2 columns */
.gallery-item.featured {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 991px) {
  .gallery-item.featured {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* Gallery Item */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.gallery-image {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.gallery-item.featured .gallery-image {
  height: 100%;
  min-height: 620px;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.gallery-item:hover .gallery-image img {
  transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(29, 53, 87, 0.95) 0%,
    rgba(29, 53, 87, 0.3) 60%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--spacing-xl);
  opacity: 0;
  transition: var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Overlay Content */
.overlay-content {
  margin-top: auto;
  transform: translateY(20px);
  transition: var(--transition-normal);
}

.gallery-item:hover .overlay-content {
  transform: translateY(0);
}

.project-category {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-color);
  margin-bottom: var(--spacing-sm);
}

.project-title {
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--spacing-sm);
}

.gallery-item.featured .project-title {
  font-size: var(--fs-2xl);
}

.project-location {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.project-location i {
  color: var(--accent-color);
}

.project-details {
  display: flex;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-md);
}

.project-details span {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.project-details i {
  color: var(--accent-color);
}

/* Overlay Actions */
.overlay-actions {
  display: flex;
  gap: var(--spacing-md);
  opacity: 0;
  transform: translateY(-20px);
  transition: var(--transition-normal);
}

.gallery-item:hover .overlay-actions {
  opacity: 1;
  transform: translateY(0);
}

.gallery-zoom,
.gallery-link {
  width: 50px;
  height: 50px;
  background: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: var(--fs-lg);
  transition: var(--transition-normal);
}

.gallery-zoom:hover,
.gallery-link:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: scale(1.1);
}

/* Project Badge */
.project-badge {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--primary-color);
  color: var(--white);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
  z-index: 2;
}

.featured-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ============================================
   LIST VIEW
   ============================================ */
.gallery-container.list-view {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.gallery-container.list-view .gallery-item {
  display: grid;
  grid-template-columns: 400px 1fr;
  height: auto;
}

.gallery-container.list-view .gallery-image {
  height: 100%;
  min-height: 250px;
}

.gallery-container.list-view .gallery-overlay {
  position: static;
  opacity: 1;
  background: var(--white);
  color: var(--text-primary);
  justify-content: center;
}

.gallery-container.list-view .overlay-content {
  transform: none;
}

.gallery-container.list-view .project-category {
  color: var(--primary-color);
}

.gallery-container.list-view .project-title {
  color: var(--secondary-color);
}

.gallery-container.list-view .project-location {
  color: var(--text-secondary);
}

.gallery-container.list-view .overlay-actions {
  opacity: 1;
  transform: none;
  margin-top: var(--spacing-lg);
}

.gallery-container.list-view .gallery-zoom,
.gallery-container.list-view .gallery-link {
  background: var(--gray-100);
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .gallery-container.list-view .gallery-item {
    grid-template-columns: 1fr;
  }

  .gallery-container.list-view .gallery-image {
    height: 250px;
  }
}

/* ============================================
   LOAD MORE
   ============================================ */
.load-more-wrapper {
  text-align: center;
  margin-top: var(--spacing-3xl);
}

.projects-info {
  margin-top: var(--spacing-md);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.projects-info span {
  font-weight: 600;
  color: var(--primary-color);
}

/* ============================================
   SHOWCASE SECTION
   ============================================ */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-xl);
}

.showcase-card {
  background: var(--white);
  padding: var(--spacing-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition-normal);
}

.showcase-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.showcase-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.1) 0%,
    rgba(29, 53, 87, 0.1) 100%
  );
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-lg);
  transition: var(--transition-normal);
}

.showcase-card:hover .showcase-icon {
  background: var(--bg-gradient);
}

.showcase-icon i {
  font-size: var(--fs-3xl);
  color: var(--primary-color);
  transition: var(--transition-normal);
}

.showcase-card:hover .showcase-icon i {
  color: var(--white);
}

.showcase-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--spacing-sm);
}

.showcase-card p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

.showcase-list {
  list-style: none;
  text-align: left;
  margin-bottom: var(--spacing-lg);
}

.showcase-list li {
  padding: var(--spacing-xs) 0;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  position: relative;
  padding-left: var(--spacing-lg);
}

.showcase-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.showcase-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary-color);
  transition: var(--transition-fast);
}

.showcase-link:hover {
  gap: var(--spacing-md);
}

/* ============================================
   VIDEO GALLERY
   ============================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-xl);
}

.video-item {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

.video-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  cursor: pointer;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

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

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: rgba(230, 57, 70, 0.9);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: var(--fs-xl);
  cursor: pointer;
  transition: var(--transition-normal);
}

.play-button:hover {
  background: var(--primary-color);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
  position: absolute;
  bottom: var(--spacing-md);
  right: var(--spacing-md);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: rgba(0, 0, 0, 0.8);
  color: var(--white);
  font-size: var(--fs-xs);
  border-radius: var(--radius-sm);
}

.video-item h4 {
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-sm);
  font-size: var(--fs-base);
  color: var(--secondary-color);
}

.video-item p {
  padding: 0 var(--spacing-lg) var(--spacing-lg);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

/* ============================================
   VIDEO MODAL
   ============================================ */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  padding: var(--spacing-xl);
}

.video-modal.active {
  opacity: 1;
  visibility: visible;
}

.video-modal-content {
  position: relative;
  width: 100%;
  max-width: 1200px;
}

.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: var(--fs-3xl);
  cursor: pointer;
  transition: var(--transition-normal);
}

.video-modal-close:hover {
  color: var(--primary-color);
  transform: rotate(90deg);
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
}

/* ============================================
   TESTIMONIAL SECTION (GALLERY PAGE)
   ============================================ */
.testimonial-section .testimonial-card.large {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--spacing-3xl);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  position: relative;
}

.testimonial-card .quote-icon {
  position: absolute;
  top: var(--spacing-xl);
  left: var(--spacing-xl);
  font-size: var(--fs-4xl);
  color: var(--primary-color);
  opacity: 0.15;
}

.testimonial-card .testimonial-text {
  font-size: var(--fs-lg);
  font-style: italic;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  position: relative;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.testimonial-author img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid var(--primary-color);
}
.testimonial-rating i {
  color: var(--accent-light);
}

.author-info h5 {
  font-size: var(--fs-base);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.author-info span {
  font-size: var(--fs-sm);
  color: var(--primary-color);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.rating {
  color: var(--accent-color);
  font-size: var(--fs-sm);
}

/* ============================================
   FILTER ANIMATIONS
   ============================================ */
.gallery-item {
  animation: fadeInUp 0.5s ease;
}

.gallery-item.filtered-out {
  display: none;
  animation: fadeOutDown 0.3s ease;
}

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

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

/* ============================================
   LIGHTBOX CUSTOMIZATION
   ============================================ */
.lb-nav a.lb-prev,
.lb-nav a.lb-next {
  opacity: 0.8;
}

.lb-data .lb-details {
  width: 100%;
  text-align: center;
}

.lb-data .lb-caption {
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  line-height: 1.6;
}

.lb-data .lb-number {
  font-family: var(--font-secondary);
  color: var(--primary-color);
}

/* ============================================
   RESPONSIVE STYLES (Update this section)
   ============================================ */
@media (max-width: 768px) {
  .gallery-stats {
    margin-top: -40px;
  }

  .stats-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .stat-card {
    padding: var(--spacing-lg);
    flex-direction: column;
    text-align: center;
  }

  .filter-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  /* --- START: SCROLLABLE FILTER BUTTONS FIX --- */
  .filter-buttons {
    display: flex;
    flex-wrap: nowrap; /* Forces buttons onto one line */
    overflow-x: auto; /* Enables horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
    padding-bottom: 10px; /* Space for the scrollbar */
    gap: 10px;
    width: 100%;

    /* Scrollbar Styling for Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
  }

  /* Scrollbar Styling for Chrome, Safari, Edge */
  .filter-buttons::-webkit-scrollbar {
    height: 6px; /* Visible height of the scrollbar */
  }

  .filter-buttons::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }

  .filter-buttons::-webkit-scrollbar-thumb {
    background: var(--primary-color); /* Matches your theme color */
    border-radius: 10px;
  }

  .filter-btn {
    flex-shrink: 0; /* Prevents buttons from being squished */
    white-space: nowrap; /* Keeps text on one line */
  }
  /* --- END: SCROLLABLE FILTER BUTTONS FIX --- */

  .view-toggle {
    justify-content: center;
    margin-top: 10px;
  }

  .gallery-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }
}
/* ============================================
   LOADING & SKELETON STYLES
   ============================================ */
.gallery-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-xl);
}

.skeleton-item {
  height: 300px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-xl);
}

.gallery-loading {
  text-align: center;
  padding: var(--spacing-3xl);
}

.gallery-loading .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--gray-300);
  border-top-color: var(--primary-color);
  border-radius: var(--radius-full);
  margin: 0 auto var(--spacing-lg);
  animation: spin 1s linear infinite;
}
