/* Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Swiper Customization */
.hero-swiper .swiper-pagination {
    bottom: 15px !important; /* Position from bottom */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    text-align: center;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    opacity: 1;
    transition: all 0.3s ease;
    margin: 0 6px !important;
}

.swiper-pagination-bullet-active {
    background: #fff;
    border-color: #fff;
    transform: scale(1.2);
}

.testimonial-swiper .swiper-pagination-bullet {
    background: #8A9A5B; /* Sage 500 */
    opacity: 0.4;
}

.testimonial-swiper .swiper-pagination-bullet-active {
    background: #8A9A5B;
    opacity: 1;
}

/* Testimonial Pagination Centering */
.testimonial-swiper .swiper-pagination {
    position: relative !important;
    bottom: auto !important;
    text-align: center;
    width: 100% !important;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FAF9F6; 
}

::-webkit-scrollbar-thumb {
    background: #D3DDD3; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8A9A5B; 
}

/* Parallax Effect Helper */
.parallax-bg {
    will-change: transform;
    transform: scale(1.1); /* Start slightly zoomed in for parallax room */
}

/* Text Selection */
::selection {
    background: #D3DDD3; /* Sage 200 */
    color: #2F3824; /* Sage 900 */
}

/* Mobile Menu Transition */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for menu items */
#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

/* Image Hover Zoom Effect Container */
.img-zoom-container {
    overflow: hidden;
}

.img-zoom-container img {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.img-zoom-container:hover img {
    transform: scale(1.05);
}

/* Animations */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.8s ease-out forwards;
}

.animate-fade-up.delay-100 { animation-delay: 100ms; }
.animate-fade-up.delay-300 { animation-delay: 300ms; }
.animate-fade-up.delay-500 { animation-delay: 500ms; }
.animate-fade-up.delay-700 { animation-delay: 700ms; }

/* Custom Button from Uiverse */
.type--nest {
  --line_color: #2F3824; /* Sage 900 */
  --back_color: #8A9A5B; /* Sage 500 */
}

.type--nest-white {
  --line_color: #FFFFFF; /* White */
  --back_color: #8A9A5B; /* Sage 500 */
}

.button {
  position: relative;
  z-index: 0;
  width: 240px;
  height: 56px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  color: var(--line_color);
  letter-spacing: 2px;
  transition: all 0.3s ease;
  display: inline-block;
}

.button__text {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.button::before,
.button::after,
.button__text::before,
.button__text::after {
  content: "";
  position: absolute;
  height: 3px;
  border-radius: 2px;
  background: var(--line_color);
  transition: all 0.5s ease;
}

.button::before {
  top: 0;
  left: 54px;
  width: calc(100% - 56px * 2 - 16px);
}

.button::after {
  top: 0;
  right: 54px;
  width: 8px;
}

.button__text::before {
  bottom: 0;
  right: 54px;
  width: calc(100% - 56px * 2 - 16px);
}

.button__text::after {
  bottom: 0;
  left: 54px;
  width: 8px;
}

.button__line {
  position: absolute;
  top: 0;
  width: 56px;
  height: 100%;
  overflow: hidden;
}

.button__line::before {
  content: "";
  position: absolute;
  top: 0;
  width: 150%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 300px;
  border: solid 3px var(--line_color);
}

.button__line:nth-child(1),
.button__line:nth-child(1)::before {
  left: 0;
}

.button__line:nth-child(2),
.button__line:nth-child(2)::before {
  right: 0;
}

.button:hover {
  letter-spacing: 6px;
}

.button:hover::before,
.button:hover .button__text::before {
  width: 8px;
}

.button:hover::after,
.button:hover .button__text::after {
  width: calc(100% - 56px * 2 - 16px);
}

.button__drow1,
.button__drow2 {
  position: absolute;
  z-index: -1;
  border-radius: 16px;
  transform-origin: 16px 16px;
}

.button__drow1 {
  top: -16px;
  left: 40px;
  width: 32px;
  height: 0;
  transform: rotate(30deg);
}

.button__drow2 {
  top: 44px;
  left: 77px;
  width: 32px;
  height: 0;
  transform: rotate(-127deg);
}

.button__drow1::before,
.button__drow1::after,
.button__drow2::before,
.button__drow2::after {
  content: "";
  position: absolute;
}

.button__drow1::before {
  bottom: 0;
  left: 0;
  width: 0;
  height: 32px;
  border-radius: 16px;
  transform-origin: 16px 16px;
  transform: rotate(-60deg);
}

.button__drow1::after {
  top: -10px;
  left: 45px;
  width: 0;
  height: 32px;
  border-radius: 16px;
  transform-origin: 16px 16px;
  transform: rotate(69deg);
}

.button__drow2::before {
  bottom: 0;
  left: 0;
  width: 0;
  height: 32px;
  border-radius: 16px;
  transform-origin: 16px 16px;
  transform: rotate(-146deg);
}

.button__drow2::after {
  bottom: 26px;
  left: -40px;
  width: 0;
  height: 32px;
  border-radius: 16px;
  transform-origin: 16px 16px;
  transform: rotate(-262deg);
}

.button__drow1,
.button__drow1::before,
.button__drow1::after,
.button__drow2,
.button__drow2::before,
.button__drow2::after {
  background: var(--back_color);
}

.button:hover .button__drow1 {
  animation: drow1 ease-in 0.06s;
  animation-fill-mode: forwards;
}

.button:hover .button__drow1::before {
  animation: drow2 linear 0.08s 0.06s;
  animation-fill-mode: forwards;
}

.button:hover .button__drow1::after {
  animation: drow3 linear 0.03s 0.14s;
  animation-fill-mode: forwards;
}

.button:hover .button__drow2 {
  animation: drow4 linear 0.06s 0.2s;
  animation-fill-mode: forwards;
}

.button:hover .button__drow2::before {
  animation: drow3 linear 0.03s 0.26s;
  animation-fill-mode: forwards;
}

.button:hover .button__drow2::after {
  animation: drow5 linear 0.06s 0.32s;
  animation-fill-mode: forwards;
}

@keyframes drow1 {
  0% {
    height: 0;
  }
  100% {
    height: 100px;
  }
}

@keyframes drow2 {
  0% {
    width: 0;
    opacity: 0;
  }
  10% {
    opacity: 0;
  }
  11% {
    opacity: 1;
  }
  100% {
    width: 120px;
  }
}

@keyframes drow3 {
  0% {
    width: 0;
  }
  100% {
    width: 80px;
  }
}

@keyframes drow4 {
  0% {
    height: 0;
  }
  100% {
    height: 120px;
  }
}

@keyframes drow5 {
  0% {
    width: 0;
  }
  100% {
    width: 124px;
  }
}

/* CTA Button from Uiverse */
.cta {
  position: relative;
  margin: 0;
  padding: 12px 18px;
  transition: all 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.cta:before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  display: block;
  border-radius: 50px;
  background: #D3DDD3; /* Sage 200 */
  width: 45px;
  height: 45px;
  transition: all 0.3s ease;
}

.cta span {
  position: relative;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2F3824; /* Sage 900 */
  line-height: 1;
}

.cta svg {
  position: relative;
  top: 0;
  margin-left: 10px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: #2F3824; /* Sage 900 */
  stroke-width: 2;
  transform: translateX(-5px);
  transition: all 0.3s ease;
}

.cta:hover:before {
  width: 100%;
  background: #D3DDD3; /* Sage 200 */
}

.cta:hover svg {
  transform: translateX(0);
}

.cta:active {
  transform: scale(0.95);
}

/* Flip Card Animation */
.flip-container {
  perspective: 900px;
}

.flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 1500ms;
  transform-style: preserve-3d;
  border-radius: 2rem;
}

.flip-container:hover .flip-card {
  transform: rotateY(180deg) rotateZ(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 2rem;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden; /* Safari */
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.flip-front {
  background-color: #fff;
}

.flip-back {
  background-color: #fff; /* White background for text */
  transform: rotateY(180deg) rotateZ(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
