/* Works Section CSS - Modern Portfolio Design */

/* === WORKS SECTION === */
#works.works-section {
  position: relative;
  padding: 8rem 0;
  background-color: var(--light);
  overflow: hidden;
}

/* Container */
.works-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 10;
}

/* Header */
.works-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.works-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.works-number {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(167, 22, 35, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(167, 22, 35, 0.2);
}

.works-subtitle {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.works-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
  color: var(--dark);
}

.works-title .title-word {
  display: inline-block;
  margin-right: 0.3em;
}

.works-title .accent {
  color: var(--primary);
}

.works-description {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.8rem 1.5rem;
  background: transparent;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.3s var(--easing);
  position: relative;
  overflow: hidden;
}

.filter-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transition: left 0.3s var(--easing);
  z-index: -1;
}

.filter-tab:hover,
.filter-tab.active {
  color: var(--light);
  border-color: var(--primary);
}

.filter-tab:hover::before,
.filter-tab.active::before {
  left: 0;
}

/* Works Grid */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2.5rem;
  margin-bottom: 6rem;
}

/* Work Card */
.work-card {
  position: relative;
  background: var(--light);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s var(--easing);
  border: 2px solid rgba(0, 0, 0, 0.05);
  opacity: 1;
  transform: scale(1);
}

.work-card.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.work-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

/* Card Image */
.card-image {
  position: relative;
  height: 450px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(167, 22, 35, 0.1) 0%, rgba(167, 22, 35, 0.05) 100%);
  position: relative;
}

.project-type {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.3;
  letter-spacing: 3px;
}

/* Card Overlay */
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s var(--easing);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.work-card:hover .card-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  color: var(--light);
  transform: translateY(30px);
  transition: transform 0.4s var(--easing);
}

.work-card:hover .overlay-content {
  transform: translateY(0);
}

.overlay-content .project-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--light);
}

.project-brief {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tag {
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--light);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Card Info */
.card-info {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}

.project-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
  transition: color 0.3s var(--easing);
}

.project-category {
  font-size: 0.9rem;
  color: var(--gray);
  margin: 0;
  transition: color 0.3s var(--easing);
}

/* Card Hover Effect */
.card-hover-effect {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

.work-card:hover .card-hover-effect {
  left: 100%;
}

/* Color Variations */
.work-card[data-color="#A71623"]:hover {
  border-color: #A71623;
}

.work-card[data-color="#A71623"]:hover .project-name {
  color: #A71623;
}

.work-card[data-color="#0061EF"]:hover {
  border-color: #0061EF;
}

.work-card[data-color="#0061EF"]:hover .project-name {
  color: #0061EF;
}

.work-card[data-color="#FFA1CC"]:hover {
  border-color: #FFA1CC;
}

.work-card[data-color="#FFA1CC"]:hover .project-name {
  color: #FFA1CC;
}

.work-card[data-color="#FFCE00"]:hover {
  border-color: #FFCE00;
}

.work-card[data-color="#FFCE00"]:hover .project-name {
  color: #FFCE00;
}

.work-card[data-color="#3B197F"]:hover {
  border-color: #3B197F;
}

.work-card[data-color="#3B197F"]:hover .project-name {
  color: #3B197F;
}

.work-card[data-color="#02873E"]:hover {
  border-color: #02873E;
}

.work-card[data-color="#02873E"]:hover .project-name {
  color: #02873E;
}

/* Load More Section */
.load-more-section {
  text-align: center;
  margin-bottom: 0;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: 50px;
  color: var(--primary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.4s var(--easing);
  position: relative;
  overflow: hidden;
}

.load-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transition: left 0.4s var(--easing);
  z-index: -1;
}

.load-more-btn:hover {
  color: var(--light);
}

.load-more-btn:hover::before {
  left: 0;
}

.btn-icon {
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.3s var(--easing);
}

.load-more-btn:hover .btn-icon {
  transform: rotate(90deg);
}

/* Background Decoration */
.bg-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.deco-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(167, 22, 35, 0.02);
  filter: blur(80px);
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  animation: float 20s ease-in-out infinite;
}

.shape-2 {
  width: 250px;
  height: 250px;
  bottom: 20%;
  right: 15%;
  animation: float 18s ease-in-out infinite;
  animation-delay: 2s;
}

.shape-3 {
  width: 200px;
  height: 200px;
  top: 40%;
  left: 50%;
  animation: float 15s ease-in-out infinite;
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-40px) rotate(180deg);
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .works-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
  }
  
  .works-title {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  #works.works-section {
    padding: 6rem 0;
  }
  
  .works-container {
    padding: 0 1rem;
  }
  
  .works-header {
    margin-bottom: 3rem;
  }
  
  .works-title {
    font-size: 2.5rem;
  }
  
  .works-description {
    font-size: 1.1rem;
  }
  
  .filter-tabs {
    gap: 0.5rem;
    margin-bottom: 3rem;
  }
  
  .filter-tab {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .works-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 4rem;
  }
  
  .card-image {
    height: 220px;
  }
  
  .card-info {
    padding: 1.2rem;
  }
  
  .overlay-content .project-title {
    font-size: 1.3rem;
  }
  
  .project-brief {
    font-size: 0.9rem;
  }
  
  .load-more-section {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .works-title {
    font-size: 2rem;
  }
  
  .card-image {
    height: 200px;
  }
  
  .card-info {
    padding: 1rem;
  }
  
  .project-name {
    font-size: 1.1rem;
  }
  
  .load-more-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}