/* Tailwind CSS imports */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Import Montserrat font */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");

/* Custom CSS for Chôm Chôm Travel */

/* Base styles */
* {
  box-sizing: border-box;
}

/* Reset margin and padding */
body,
html {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  color: #1a4952;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .dropdown-group:hover .dropdown-bridge,
  .dropdown-group:focus-within .dropdown-bridge {
    display: block;
  }

  .dropdown-bridge {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 18px;
    z-index: 40;
  }
}

/* Fix header scroll issue on mobile */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari */
  .mobile-header-fixed {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
  }
}

/* Ensure header stays on top */
.mobile-header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Ensure sideMenu is always on top */
#sideMenu {
  z-index: 999999 !important;
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100vh !important;
}

/* Ensure menu overlay is also on top */
#menuOverlay {
  z-index: 999998 !important;
}

/* Custom Swiper Pagination */
.custom-swiper-pagination {
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  z-index: 20;
  margin-top: 25px;
}

.custom-swiper-pagination .swiper-pagination-bullet {
  width: 18px;
  height: 18px;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 6px;
  opacity: 1;
}

.custom-swiper-pagination .swiper-pagination-bullet img {
  width: 18px;
  height: 18px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.custom-swiper-pagination .swiper-pagination-bullet-active img {
  opacity: 1;
}

/* Typography */
.font-heading {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
}

.font-body {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
}

/* Custom container */
.container {
  max-width: 1248px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Custom button styles */
.btn-primary {
  background-color: #f9b233;
  color: #1a4952;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #f36f21;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: #1a4952;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border: 2px solid #1a4952;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #1a4952;
  color: white;
}

/* Custom card styles */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 24px 0 rgba(26, 73, 82, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px 0 rgba(26, 73, 82, 0.12);
}

/* Custom section styles */
.section-padding {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 6rem 0;
  }
}

/* Hero section enhancements */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 73, 82, 0.3) 0%, rgba(26, 73, 82, 0.1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Custom form styles */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #eaf6f3;
  border-radius: 0.5rem;
  font-family: "Noto Sans", sans-serif;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #f9b233;
  box-shadow: 0 0 0 3px rgba(249, 178, 51, 0.1);
}

/* Custom testimonial styles */
.testimonial-slide {
  transition: opacity 0.3s ease;
}

.testimonial-slide.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Custom navigation styles */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #f9b233;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Custom footer styles */
.footer-link {
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #f9b233;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  .hero-section h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
}

/* Custom loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Custom error states */
.error {
  border-color: #dc2626;
  color: #dc2626;
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Success states */
.success {
  border-color: #059669;
  color: #059669;
}

.success-message {
  color: #059669;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.swiper-button-prev::after,
.swiper-rtl .swiper-button-next::after,
.swiper-button-next::after,
.swiper-rtl .swiper-button-prev::after {
  content: none !important;
  display: none !important;
}

/* Hiệu ứng đóng/mở cho box content trong card */
.card-toggle .box-content {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(-7deg);
  pointer-events: auto;
}

.card-toggle.card-closed .box-content {
  opacity: 0;
  transform: translateY(40px) scale(0.95) rotate(-12deg);
  pointer-events: none;
}

/* Ẩn vùng trắng bottom khi card mở, hiện khi card đóng */
.card-toggle .box-content-bottom {
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.5s;
}

.card-toggle.card-closed .box-content-bottom {
  opacity: 1;
  pointer-events: auto;
  /* z-index sẽ được JS điều khiển */
}

/* Khi card đóng, đưa phần text nền lên trên box content nghiêng */
.card-toggle.card-closed .card-bottom-text {
  z-index: 50;
}

.card-toggle.card-closed .box-content {
  z-index: 40;
}

/* A-Team Slider Section */
#a-team-slider-section {
  position: relative;
}

.a-team-avatar {
  display: block;
  margin: auto;
}

.a-team-avatar img {
  aspect-ratio: 310 / 310;
  width: 180px;
  height: 180px;
  object-fit: cover;
  margin-top: 15px;
}

.a-team-avatar.swiper-slide-active img {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

#a-team-slider {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2rem;
  min-height: 220px;
  cursor: pointer;
}

#a-team-dots {
  display: flex;
  gap: 0.5rem;
}

.a-team-dot {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: #41b4b4;
  transition: background 0.2s;
}

.a-team-dot.active {
  background: #104751;
}

#a-team-content {
  min-height: 180px;
  transition: opacity 0.3s;
  max-width: 900px;
}

#a-team-content h3 {
  font-weight: 400;
  font-size: 32px;
  line-height: 125%;
  letter-spacing: 0%;
  text-align: center;
  margin-bottom: 16px;
}

#experience_content p:not(:last-child) {
  margin-bottom: 16px;
}

#experience_content p a {
  text-decoration: underline;
}

@media (min-width: 1280px) {
  .xl\:text-\[28px\] {
    font-size: 28px !important;
  }
}

@media (max-width: 900px) {
  #a-team-slider {
    gap: 0.5rem;
  }

  .a-team-avatar-main {
    width: 220px;
    height: 220px;
  }

  .a-team-avatar.a-team-avatar-main img {
    width: 220px;
    height: 220px;
  }

  .a-team-avatar-side {
    width: 80px;
    height: 80px;
  }
}
