/* Global Section Rule */
.section {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  overflow: hidden;
  scroll-snap-align: start;
  box-sizing: border-box;
}

/* Sections Background Rules: Page Specific */
#hero .section-bg img { filter: brightness(0.7); }
#company .section-bg { width: 50%; left: 0; }
#vision .section-bg { width: 50%; left: 50%; }
#business .section-bg { width: 50%; left: 0; }

.section-bg img { filter: brightness(0.85); }

/* Vimeo Background Styling */
.vimeo-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
  overflow: hidden;
}

.vimeo-wrapper iframe {
  width: 100vw;
  height: 56.25vw; /* 16:9 ratio */
  min-height: 100vh;
  min-width: 177.77vh; /* 16:9 ratio */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: brightness(0.7); /* Match existing hero image brightness */
}

.vimeo-wrapper.loaded {
  opacity: 1;
}

.bg-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: opacity 1.5s ease;
}

.bg-placeholder.fade-out {
  opacity: 0;
}

/* Contact Section Styling */
.section#contact {
  padding-top: 100px; /* Space for Header */
}

/* Hero Text Layout */
.hero-text-container {
  width: 100%;
  max-width: 1200px;
  padding: 0 40px;
  margin-top: auto;
  margin-bottom: 100px;
}

.hero-title {
  font-size: clamp(80px, 10vw, 150px);
  font-weight: 700;
  line-height: 0.9;
  margin-bottom: 10px;
  letter-spacing: -5px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards 0.5s;
}

.sub-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards 0.8s;
  letter-spacing: 2px;
}

/* Contact Section Styling */
.section#contact .section-bg img {
  filter: brightness(0.7);
}

.bg-text-overlay {
  position: absolute;
  top: 40%; /* Above the card */
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 8%;
  pointer-events: none;
  z-index: 2; /* Between bg and content */
}

.bg-text-overlay span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -1px;
}

.section#contact .section-content {
  align-items: flex-end; /* Card at the bottom */
  padding: 0;
  z-index: 3; /* Above the overlay */
}

.contact-container {
  background: #fff;
  color: #000;
  padding: clamp(60px, 6vw, 80px) clamp(40px, 8vw, 100px);
  border-top-left-radius: clamp(60px, 10vw, 120px);
  border-top-right-radius: clamp(60px, 10vw, 120px);
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: clamp(40px, 6vw, 100px);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.1);
}

.contact-label {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  color: #000;
  margin-bottom: 20px;
}

.contact-main-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px clamp(20px, 3vw, 40px);
}

.input-group label {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 12px;
}

.input-group input {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid #cbd5e0;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  transition: var(--transition-smooth);
}

.form-footer {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.privacy-agreement {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #4a5568;
}

.privacy-agreement input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.submit-btn {
  background: #2d3748;
  color: #fff;
  padding: 14px 40px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.submit-btn:hover {
  background: #000;
}

/* modal_popup */
#modal_popup{width: auto; height: auto; position: fixed; z-index: 9999; background-color: #fff; left: 10%; top: 10%; border: 1px solid #bbb; max-width: 450px;}
#modal_popup .popup_wrap{display: flex;flex-wrap: wrap; align-content: space-between; height: 100%;}
#modal_popup .popup_wrap .pp_img{width: 100%; cursor: pointer;}
#modal_popup .popup_wrap .pp_img img{max-width: 100%; width: 100%;}
#modal_popup .popup_wrap .popup_btn_wrap { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0px 10px 5px; width: 100%;}
#modal_popup .popup_wrap .check_box{display: flex; align-items: center; cursor: pointer; }
#modal_popup .popup_wrap .check_box input{margin-right: 7px; cursor: pointer; }
#modal_popup .popup_wrap .check_box label{line-height: 1.1; cursor: pointer;color:#000 }
#modal_popup .popup_wrap .close_btn{width: 52px;height: 25px; border: 1px solid #ccc; text-align: center; border-radius: 5px; cursor: pointer;background-color: #fff;color: #000;}

/* slider popup */
#slider_popup{position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 10000; transition: .5s ease;}
#slider_popup .popup_sec{width: 520px; overflow: hidden; height: 715px; background-color: rgba(74,81,95,0.9); transition: .5s ease;}
#slider_popup .popup_sec .swiper-wrapper{}
#slider_popup .popup_sec .swiper-wrapper .swiper-slide{width: 100%;}
#slider_popup .popup_sec .swiper-wrapper .swiper-slide img{width: 100%; height: 100% ;position: absolute;}
#slider_popup .popup_sec .popup_page{bottom: 0; top: 20px;}
.popup_util{position: absolute;right: -50px; top: 50%; transform: translateY(-50%);}
.popup_util .p_util{cursor: pointer; font-weight: 500; font-size: 12px; width: 50px; padding: 7px 0 6px; color: #fff; border-radius: 0px 5px 5px 0; text-align: center;}
.popup_util .open{ background: #5c626f; display: none; }
.popup_util .close{ background: #5c626f; } /* #000; */
.popup_util .p_btn{width : 12px; display: block; margin: 0 auto -4px;}
.popup_util .p_btn img{width: 100%;}
.popup_util2{display: none;}

.slider_popup_close{left: -520px !important;}
.slider_popup_close .popup_util .close{display:none !important}
.slider_popup_close .popup_util .open{display: block !important}
.popup_black_bg{background: #00000070; width: 100%; height: 100%; position: fixed; z-index: 9999; display: none;}

@media(max-width:600px){
/* slider popup */
    #slider_popup{width: 100%; height: 140vw;}
    #slider_popup .popup_sec{width: 100%; height: 100%;}
    .popup_util{position: fixed; z-index: 10000; transform: none; left: 0; display: none; width: 50px;}
    .popup_util2{display: block;}

    .slider_popup_close{left: -100% !important;}
    /* .slider_popup_close .popup_sec{transform: translateX(-100%) !important;} */
    .popup_util.open_popup .close{display:none !important}
    .popup_util.open_popup .open{display: block !important}

    .popup_black_bg{display: block;}
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .section {
    flex-direction: column; /* Stack vertically */
  }

  #contact {
    padding-bottom: 70px;
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Index Page Split Sections: Image (Top) / Text (Bottom) */
  #company .section-bg,
  #vision .section-bg,
  #business .section-bg {
    order: 1;
    width: 100% !important;
    height: 50% !important;
    position: relative !important;
    left: 0 !important;
  }

  #company .section-content,
  #vision .section-content,
  #business .section-content {
    order: 2;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    height: 50%;
    top: 0;
    padding: 0;
  }

  /* Hero & Contact: Full Background (NOT split) */
  #hero .section-bg,
  #contact .section-bg {
    position: absolute !important;
    height: 100% !important;
    width: 100% !important;
    top: 0;
    left: 0;
    order: 0;
  }

  #hero .section-content,
  #contact .section-content {
    height: 100% !important;
    padding: 0;
    background: transparent !important;
    order: 1;
    z-index: 3;
    display: flex !important;
    flex-direction: column;
  }

  /* Hero Content Position */
  #hero .section-content {
    justify-content: flex-end;
    padding: 0 20px 60px 20px;
  }

  /* Contact Content Position */
  #contact .section-content {
    justify-content: center;
    align-items: center;
    padding: 20px;
  }

  .bg-text-overlay {
    display: none !important; /* Hide background text on mobile for clean UI */
  }

  .contact-container {
    grid-template-columns: 1fr;
    padding: 30px 24px;
    gap: 20px;
    width: 100%;
    max-height: 85vh; /* Slightly reduced to ensure it fits with header/footer */
    border-radius: 32px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  }

  .contact-label {
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 10px;
  }

  .contact-main-title {
    font-size: 26px;
    letter-spacing: -1px;
    line-height: 1.2;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .input-group label {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .input-group input {
    padding: 14px 16px;
    font-size: 14px;
    border-radius: 10px;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch; /* Button full width */
    gap: 25px;
    margin-top: 30px;
  }

  .privacy-agreement {
    font-size: 13px;
    justify-content: flex-start;
  }

  .submit-btn {
    width: 100%;
    padding: 16px;
    height: 54px;
    font-size: 15px;
    border-radius: 10px;
  }

  /* General Text & Boxes */
  .split-text-box {
    padding: 30px 20px;
    width: 100%;
    flex-grow: 1;
  }

  .section-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .section-desc {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .split-layout {
    grid-template-columns: 1fr !important;
    display: block !important; /* Block is safer for simple stacking */
  }

  /* General Text & Boxes */
  .split-text-box {
    padding: 60px 30px;
    width: 100%;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
  }

  .section-title {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .section-desc {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 30px;
  }

  .split-layout > div:not(.split-text-box) {
    display: none !important;
  }
}
