/* Layout Fixes for React Version */

/* Ensure proper section spacing */
.tj-about-section {
  margin-bottom: 0;
}

.tj-service-section {
  margin-top: 0;
  margin-bottom: 0;
}

.tj-testimonial-section-2 {
  margin-top: 0;
  margin-bottom: 0;
}

/* Fix section-gap spacing to match original */
.section-gap {
  padding-top: 120px;
  padding-bottom: 120px;
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
  .section-gap {
    padding-top: 100px;
    padding-bottom: 100px;
  }
}

@media only screen and (min-width: 768px) and (max-width: 991px),
       only screen and (min-width: 576px) and (max-width: 767px),
       (max-width: 575px) {
  .section-gap {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

/* Marquee section spacing */
.top-marquee {
  margin-top: 0;
  margin-bottom: 0;
  padding: 30px 0;
  overflow: hidden;
}

/* Service section background shapes positioning */
.tj-service-section {
  position: relative;
  overflow: hidden;
}

/* Fix sticky sidebar jumping on pin */
.slidebar-stickiy {
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  position: relative;
  z-index: 1;
}

/* Ensure column doesn't collapse when pin activates */
.tj-service-section .col-lg-4 {
  position: relative;
}

/* Ensure pin-spacer doesn't cause layout shift */
.pin-spacer {
  will-change: auto !important;
}

.tj-service-section .bg-shape-1,
.tj-service-section .bg-shape-2,
.tj-service-section .bg-shape-3 {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.tj-service-section .top-space {
  height: 0;
  width: 100%;
}

/* About section grid spacing */
.tj-about-section .row {
  row-gap: 30px;
}

.tj-about-section .row.row-gap-4 {
  row-gap: 1.5rem;
}

/* Ensure countup items don't have extra margins */
.countup-item.style-2 {
  height: 100%;
  margin-bottom: 0;
}

/* Corporate culture section */
.tj-testimonial-section-2 .row.row-gap-3 {
  row-gap: 1rem;
}

/* Team section proper spacing */
.h6-project {
  margin-bottom: 0;
}

.h6-project .bg-shape-1,
.h6-project .bg-shape-2 {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

/* Blog section spacing */
.tj-blog-section {
  margin-top: 0;
  margin-bottom: 0;
}

/* Fix any container overflow issues */
.container-fluid {
  padding-left: 15px;
  padding-right: 15px;
  max-width: 100%;
}

/* Ensure smooth-content wrapper doesn't add extra spacing */
#smooth-content {
  width: 100%;
}

/* Remove any unwanted margins from main sections */
.site-main > section {
  position: relative;
}

/* Fix video popup button */
.video-btn.video-popup {
  cursor: pointer;
}

/* Ensure service items are properly contained */
.service-wrapper-2 {
  width: 100%;
}

/* Fix testimonial slider pagination */
.swiper-pagination-area {
  margin-top: 30px;
  text-align: center;
  position: relative;
  width: 100%;
}

/* Team swiper navigation */
.team-swiper .swiper-button-next,
.team-swiper .swiper-button-prev {
  color: var(--tj-color-theme-primary, #e1002e);
}

/* Blog slider proper spacing */
.blog-slider {
  width: 100%;
  padding-bottom: 50px;
}

.blog-slider .swiper-pagination-area {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 991px) {
  .section-gap-x {
    padding-left: 15px;
    padding-right: 15px;
  }

  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 767px) {
  .tj-about-section .row {
    row-gap: 20px;
  }

  .countup-item.style-2 {
    margin-bottom: 20px;
  }

  .customers-box.style-2 {
    margin-top: 20px;
  }
}

/* Fix z-index layering */
.tj-slider-section {
  position: relative;
  z-index: 1;
}

.top-marquee {
  position: relative;
  z-index: 2;
}

.tj-about-section {
  position: relative;
  z-index: 3;
}

.tj-service-section {
  position: relative;
  z-index: 4;
}

/* Ensure no negative margins causing overlap */
section {
  margin-top: 0 !important;
}

/* Fix for section backgrounds not covering full area */
.tj-service-section,
.tj-about-section-2,
.h6-project {
  box-sizing: border-box;
}

/* Ensure proper clearfix */
.container::after,
.row::after {
  content: "";
  display: table;
  clear: both;
}

/* Fix footer positioning for ScrollSmoother */
#smooth-wrapper {
  overflow: hidden;
}

#smooth-content {
  overflow: visible;
}

/* Footer should not float - ensure it's at bottom */
.tj-footer-section {
  position: relative;
  width: 100%;
  margin-top: 0;
}

/* Ensure footer stays in document flow */
footer {
  display: block;
  clear: both;
}

/* Fix footer marquee slider - ensure items display inline */
.marquee-slider .swiper-slide {
  display: flex;
  align-items: center;
}

/* Ensure team items have proper dimensions and border radius */
.h6-project-item-inner {
  border-radius: 10px;
  overflow: hidden;
}

/* Ensure team section is visible */
.h6-project {
  min-height: 800px;
  padding-top: 80px;
  padding-bottom: 80px;
}

.team-swiper {
  min-height: 600px;
  margin-top: 50px;
}

.h6-project-item-inner {
  min-height: 580px;
}

/* Fix hamburger close button */
.hamburger_close_btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hamburger_close_btn:focus {
  outline: none;
}

/* Fix hamburger search button */
.hamburger_search button {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger_search button:focus {
  outline: none;
}

.hamburger_search button i {
  pointer-events: none;
}

/* Fix team card hover delay - prevent "jumping" when cursor passes edge */
.h6-project-item {
  transition: all 0.5s ease-in-out;
  transition-delay: 0s;
}

.h6-project-item:hover {
  transition-delay: 0.2s; /* 200ms задержка перед раскрытием */
}

.team-swiper .swiper-slide.h6-project-item {
  transition: all 0.5s ease-in-out;
  transition-delay: 0s;
}

.team-swiper .swiper-slide.h6-project-item:hover {
  transition-delay: 0.2s; /* 200ms задержка перед раскрытием */
}

.h6-project-item .project-content {
  transition: transform 0.5s ease-in-out;
  transition-delay: 0s;
}

.h6-project-item:hover .project-content {
  transition-delay: 0.2s; /* 200ms задержка перед появлением контента */
}

.team-swiper .h6-project-item:hover .project-content {
  transition-delay: 0.2s; /* 200ms задержка перед появлением контента */
}

/* Fix search popup close button and size */
.header-search .search_close_btn {
  cursor: pointer;
  border: none;
  background-color: var(--tj-color-grey-1);
  transition: all 0.3s ease;
}

.header-search .search_close_btn:hover {
  background-color: var(--tj-color-theme-primary);
  transform: rotate(90deg);
}

.header-search .search_close_btn:hover svg path {
  stroke: var(--tj-color-common-white);
}

/* Make search popup smaller - slightly less than header height */
.search_popup {
  padding: 50px 0 !important;
}

.tj_search_wrapper {
  min-height: 70px !important;
}

@media only screen and (min-width: 768px) and (max-width: 991px) {
  .search_popup {
    padding: 40px 0 !important;
  }
}

@media only screen and (min-width: 576px) and (max-width: 767px),
       (max-width: 575px) {
  .search_popup {
    padding: 30px 0 !important;
  }
}

/* Fix hero navigation arrows - full width with proper side padding */
.hero-navigation {
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  padding: 0 80px !important;
  justify-content: space-between !important;
}

@media only screen and (min-width: 1200px) and (max-width: 1399px),
       only screen and (min-width: 992px) and (max-width: 1199px) {
  .hero-navigation {
    padding: 0 60px !important;
  }
}

@media only screen and (min-width: 768px) and (max-width: 991px) {
  .hero-navigation {
    padding: 0 40px !important;
  }
}

@media only screen and (min-width: 576px) and (max-width: 767px) {
  .hero-navigation {
    padding: 0 30px !important;
  }
}

@media (max-width: 575px) {
  .hero-navigation {
    padding: 0 15px !important;
  }
}

/* Fix contact form labels - hide when input has value */
.contact-form .form-input input.active ~ .cf-label,
.contact-form .form-input textarea.active ~ .cf-label {
  visibility: hidden !important;
  opacity: 0 !important;
}

/* ESG Page - Lucide Icons Hover Effects */
.swiper-slide .service-icon i[data-lucide] {
  transition: color 0.3s ease, stroke 0.3s ease;
  color: #1E8A8A;
  stroke: #1E8A8A;
}

.swiper-slide:hover .service-icon i[data-lucide] {
  color: #ffffff;
  stroke: #ffffff;
}

.swiper-slide .service-icon svg {
  transition: color 0.3s ease, stroke 0.3s ease;
}

.swiper-slide:hover .service-icon svg {
  color: #ffffff;
  stroke: #ffffff;
}

/* ESG Animated Text Styles */
.esg-animated-text {
  text-align: center;
  margin-top: 20px;
}

.rotating-phrases {
  position: relative;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rotating-phrases .phrase {
  position: absolute;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-in-out;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--tj-color-heading);
  background: linear-gradient(135deg, #1e8a8a, #9c27b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  text-align: center;
  letter-spacing: 0.5px;
}

.rotating-phrases .phrase.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .rotating-phrases .phrase {
    font-size: 1.1rem;
  }

  .rotating-phrases {
    height: 50px;
  }

  .heading-wrap-content {
    flex-direction: column !important;
    align-items: center !important;
  }

  .esg-animated-text {
    margin-top: 30px !important;
  }
}

/* Circle text layering and rotation fix for ESG page */


.circle-text {
  animation: rotateOnly 10s linear infinite !important;
  transform-origin: center center !important;
  position: absolute !important;
  top: 15px !important;
  left: 15px !important;
  z-index: 3 !important;
  background-color: transparent !important;
}



.circle-icon svg {
  color: white !important;
  z-index: 2 !important;
}

@keyframes rotateOnly {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
