*{
  box-sizing: border-box;
}
a{
  text-decoration: none;
  color: inherit;
}

#main{
  background-image: linear-gradient(to top, rgb(0, 204, 153) 8%, rgb(255, 255, 255) 28%);
}

#main > div{
  width: 100%;
  height: 100vh;
  position: relative;
  top: -10%;
}
#main > div img {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -53%);
  mix-blend-mode: multiply;
  width: clamp(1500px, 82%, 85%);
}


.header-holder{
  position: fixed;
  width: 100%;
  bottom: 0px;
  z-index: 100; 
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px; 
  height: 120px;
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  font-style: italic;
  font-size: 1.2rem;
  text-decoration: underline;

}


.header-holder .header-logo{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: auto;
  display: block;
  flex-shrink: 0; 
}

.header-holder .header-logo img{
  min-width: 80px; 
  max-width: 80px; 
  width: 100%;
  height: auto;
  display: block;
}

.header-holder .header-logo:hover img{
  content: url("./img/header/header-2.svg");
}

/* =========================================
   Portfolio Page Layout
========================================= */
.portfolio-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  font-family: "Work Sans", sans-serif;
  background-color: #fff;
  container-type: inline-size; 
}

.portfolio-header {
  padding: 40px 40px 40px 40px; 
}

.portfolio-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.portfolio-content {
  position: relative; 
  z-index: 20; 
  display: flex; 
  justify-content: center; 
  gap: 40px; 
  padding: 0 40px; 
  flex: 1;
  overflow: hidden; 
}

.scroll-area {
  overflow-y: auto;
  -ms-overflow-style: none; 
  scrollbar-width: none; 
}
.scroll-area::-webkit-scrollbar {
  display: none;
}

.left-col {
  flex: 0 0 350px;
  padding-bottom: 20px;
}

.category-group {
  margin-bottom: 3vh; 
}

.category-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.work-list {
  max-height: 33vh; 
  overflow-y: auto;
}

.work-list::-webkit-scrollbar {
  display: none;
}
.work-list {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.work-list li {
  border-bottom: 1px solid #111;
}

.work-list a {
  display: block;
  padding: 12px 0 10px;
  font-size: 1.1rem;
  color: #000;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.work-list a:hover {
  font-weight: 700;
  color: rgb(0, 204, 153); 
  /* border: 3px solid rgb(0, 204, 153);  */
}


.center-col {
  flex: 1 0 580px;
  display: flex;
  flex-direction: column;
  gap: 80px; 
  overflow: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none; 
  padding-bottom: 20px; 
}

.center-col::-webkit-scrollbar {
  display: none; 
}
.work-item {
  display: flex;
  flex-direction: column;
  gap: 25px; 
  height: 100%; 
  overflow: hidden;
}

.work-item {
  display: none !important;
}
.work-item.active {
  display: flex !important;
}

.video-container {
  width: 100%; 
  aspect-ratio: 16 / 9;
  background-color: #000;
  position: relative; 
  flex-shrink: 0;
}

.main-video-img,
.main-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-container {
  display: flex;
  gap: 60px; 
  width: 100%; 
  align-items: stretch; 
  flex: 1; 
  overflow: hidden;
}

.info-title-area {
  flex: 1;
}

.work-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 20px;
}

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

.tag {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.tag.digital { background-color: #cb89fd; } 
.tag.tvc { background-color: #8bc3ff; }
.tag.kv { background-color: #ffb3e6; }
.tag.ttl { background-color: #66e0a3; }
.tag.ooh { background-color: #ffd666; }
.tag.print { background-color: #aeff57; }
.tag.promo { background-color: #66ffe3; }
.tag.ev { background-color: #ff9e66; }

.info-desc-area {
  flex: 2;
  font-size: 1.07rem;
  line-height: 1.5;
  color: #000;
  padding-top: 5px; 
  height: 100%; 
  overflow-y: auto;  
  -ms-overflow-style: none; 
  scrollbar-width: none; 
  word-break: break-all; text-align: justify;
}

.info-desc-area::-webkit-scrollbar {
  display: none;
}

.right-col {
  flex: 0 1 300px; 
  display: flex;
  flex-direction: column;
  gap: 25px; 
  padding-bottom: 20px; 
}

.right-content {
  display: none !important;
  flex-direction: column;
  gap: 25px;
  height: 100%;
}
.right-content.active {
  display: flex !important;
}

.stills-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: calc(max(580px, 100cqi - 810px) * 9 / 16); 
  overflow-y: auto; 
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex-shrink: 0;
}

.stills-container::-webkit-scrollbar {
  display: none;
}

.stills-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.credits-container {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #000;
  border-left: 3px solid #000; 
  padding-left: 15px; 
}

.credits-container h3 {
  font-weight: 800;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.portfolio-wrapper + header .header-holder::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 130px; 
  background: linear-gradient(to top, #3399FF 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none; 
  z-index: -1; 
}

.portfolio-wrapper + header .header-holder > * {
  pointer-events: auto; 
}

/* =========================================
   Responsive Design (반응형)
========================================= */

@media screen and (max-width: 1500px) { 
  .portfolio-content {
    display: grid; 
    grid-template-columns: 350px 1fr; 
    overflow-y: auto; 
    align-items: start;
  }

  .left-col {
    grid-column: 1 / 2;
    grid-row: 1 / 2; 
    position: sticky;
    top: 0;
    height: calc(100vh - 150px); 
  }

  .center-col {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    overflow-y: visible; 
    padding-bottom: 40px;
  }

  .right-col {
    display: none; 
  }

  .info-container {
    flex-direction: column;
    gap: 20px;
  }
}

@media screen and (max-width: 768px) {

  #main > div img {
    width: 100%; 
  }
  
  .portfolio-header {
    padding: 20px 20px 10px;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
  }

  .work-item {
    display: flex;
  }

  .portfolio-content {
    display: block; 
    padding: 0 20px;
    overflow-y: auto; 
  }

  .left-col {
    display: none; 
  }

  .right-col {
    display: none; 
  }

  .center-col {
    display: flex;
    max-width: 100%;
    overflow-y: visible; 
    padding-bottom: 120px;
    gap: 60px; 
  }

  .center-col .video-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }

  .info-desc-area,
  .description,
  .mobile-work-item p,
  .info-container p,
  .work-item p {
    display: none !important;
  }
  
  .work-title {
    font-size: 1.5rem;
  }
  
  .header-holder {
    padding: 0 20px; 
  }
}

/* =========================================
   iMac / 대형 모니터 (1920px 이상)
========================================= */
@media screen and (min-width: 1920px) {
  .portfolio-header {
    padding: 60px 40px 40px;
  }

  .portfolio-content {
    gap: 40px; 
    padding: 0 40px;
  }

  .left-col {
    flex: 0 0 390px; 
  }

  .work-list {
    max-height: 347px;
  }

  .center-col {
    flex: 1 1 auto;
    min-width: 0;
  }

  .right-col {
    flex: 0 0 390px; 
  }

  .video-container {
    aspect-ratio: unset;
    height: calc((100vw - 940px) * 9 / 16);
  }

  .stills-container {
    height: calc((100vw - 940px) * 9 / 16);
    flex-shrink: 0;
  }
}

.mobile-only {
  display: none;
}

#mobile-filter-wrapper {
  display: none !important;
}

@media screen and (max-width: 768px) {
  .left-col,
  .center-col,
  .right-col {
    display: none !important;
  }

  .mobile-only {
    display: flex;
    flex-direction: column;
    padding: 20px 0 100px; 
    width: 100%;
  }

  #mobile-filter-wrapper {
    display: flex !important;
    gap: 15px;
    align-items: center;
    flex-direction: row !important;
  }

  .mobile-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 120px; 
  }

  .mobile-work-item {
    display: flex;
    flex-direction: column;
    gap: 15px; 
  }
  
  .mobile-work-item .video-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }
  
  .description,
  .info-desc-area,
  .mobile-work-item p {
    display: none !important;
  }
  
  .mobile-work-item .stills-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0;
  }
}
/* =========================================
   Contact Popup
========================================= */
.contact-popup-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.contact-popup-overlay.show { 
  visibility: visible; 
  opacity: 1; 
}

.contact-popup {
  position: fixed;
  bottom: 100px;
  right: 40px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  padding: 40px 50px; 
  border-radius: 24px 24px 0 24px; 
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;  align-items: flex-start; 
  text-align: left; 
  z-index: 1000;
  font-family: 'Work Sans', sans-serif;
  color: #000;
  min-width: 380px; 
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); 
}

.contact-popup.show { 
  visibility: visible; 
  opacity: 1; 
  pointer-events: auto;
  transform: translateY(0); 
}

.contact-popup h2 {
  font-size: 2.4rem; 
  font-weight: 800;
  margin: 0 0 20px 0;
  letter-spacing: -0.5px;
}
.contact-popup .contact-item {
  display: flex;
  align-items: center;
  gap: 15px; 
  font-size: 1.25rem; 
  font-weight: 600;
  margin-bottom: 12px;
}
.contact-popup .contact-item:last-child {
  margin-bottom: 0;
}
.contact-popup .contact-item a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.contact-popup .contact-item span {
  font-size: 1.4rem;
  font-weight: 400;
}

@media screen and (max-width: 768px) {
  .contact-popup {
    right: 20px;
    bottom: 90px;
    padding: 30px 36px;
    min-width: 320px;
  }  .contact-popup h2 { font-size: 2rem; }
}  .contact-popup .contact-item { font-size: 1.15rem; }




