/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection for inputs and text areas */
input,
textarea,
[contenteditable] {
  -webkit-user-select: text;
  -khtml-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Remove focus outline on mobile while keeping accessibility */
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* Add custom focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

:root {
  --primary-color: #d4a574;
  --secondary-color: #8b6914;
  --accent-color: #f4e4c1;
  --text-dark: #2c2c2c;
  --text-light: #666;
  --text-white: #ffffff;
  --bg-light: #faf9f7;
  --bg-white: #ffffff;
  --shadow-light: 0 2px 20px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 30px rgba(0, 0, 0, 0.15);
  --border-radius: 10px;
  --transition: all 0.3s ease;

  --font-primary: "Playfair Display", serif;
  --font-secondary: "Poppins", sans-serif;
}

/* Dark Mode Variables */
body.dark-mode {
  --primary-color: #e6b886;
  --secondary-color: #b8941d;
  --accent-color: #3a3a3a;
  --text-dark: #e0e0e0;
  --text-light: #b0b0b0;
  --text-white: #ffffff;
  --bg-light: #1a1a1a;
  --bg-white: #2a2a2a;
  --shadow-light: 0 2px 20px rgba(0, 0, 0, 0.4);
  --shadow-medium: 0 4px 30px rgba(0, 0, 0, 0.6);
}

/* Dark Mode Background */
body.dark-mode {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d3748 25%, #4a5568 50%, #2d3748 75%, #1a1a1a 100%);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-secondary);
  line-height: 1.6;
  color: var(--text-dark);
  background: linear-gradient(135deg, #ffffff 0%, #b0e0ff 25%, #e6ccff 50%, #c1f7fa 75%, #e0e0e0 100%);
  background-attachment: scroll;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Large Desktop Layout (1920px+) */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
    padding: 0 40px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 2rem auto 0;
  }

  .gallery-item {
    aspect-ratio: 1;
    min-height: 350px;
  }
}

/* Large Screen Typography */
@media (min-width: 1440px) {
  h1 {
    font-size: clamp(3rem, 5vw, 5rem);
  }

  .hero-title {
    font-size: clamp(3.5rem, 4vw, 4.5rem);
    margin-bottom: 2rem;
  }

  .hero-description {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 3rem;
  }

  .section-title {
    font-size: clamp(2.5rem, 3.5vw, 3.5rem);
    margin-bottom: 3rem;
  }
}

/* Extra Large Screens (1920px+) */
@media (min-width: 1920px) {
  .container {
    max-width: 1600px;
    padding: 0 60px;
  }

  .gallery-section {
    padding: 120px 0;
  }

  .gallery-grid {
    gap: 40px;
    margin-top: 5rem;
  }

  .gallery-item {
    min-height: 400px;
    border-radius: 25px;
  }

  .hero-title {
    font-size: clamp(4rem, 4.5vw, 5.5rem);
  }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 4vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-outline {
  display: inline-block;
  padding: 15px 30px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  /* Remove mobile tap highlight */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  outline: none;
}

/* Remove active/focus states on mobile */
.btn-primary:active,
.btn-secondary:active,
.btn-outline:active,
.btn-primary:focus,
.btn-secondary:focus,
.btn-outline:focus {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-white);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-dark);
  border-color: var(--text-dark);
}

.btn-outline:hover {
  background-color: var(--text-dark);
  color: var(--text-white);
}

/* Optimized Submit Button */
.submit-btn {
  width: 100%;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  /* Remove mobile tap highlight */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  outline: none;
}

/* Remove active/focus states on mobile */
.submit-btn:active,
.submit-btn:focus {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.submit-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
  transition: all 0.1s ease;
}

/* Submit Button Animation */
.contact-modal.show .submit-btn {
  animation: submitButtonSlideUp 0.5s ease-out 0.4s backwards;
}

@keyframes submitButtonSlideUp {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Submit Button Shine Effect */
.submit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.contact-modal.show .submit-btn::before {
  animation: buttonShine 2s ease-in-out 0.8s;
}

@keyframes buttonShine {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
  border-bottom: 1px solid rgba(212, 165, 116, 0.1);
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-light);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.logo-text {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
  text-transform: capitalize;
  /* Remove mobile tap highlight */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  outline: none;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

/* Remove active/focus states on mobile */
.nav-menu a:active,
.nav-menu a:focus {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.dark-mode-toggle {
  background: var(--bg-white);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--primary-color);
  font-size: 1rem;
  /* Remove mobile tap highlight */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  outline: none;
}

.dark-mode-toggle:hover {
  background: var(--primary-color);
  color: var(--bg-white);
  transform: scale(1.1);
  box-shadow: var(--shadow-light);
}

/* Remove active/focus states on mobile */
.dark-mode-toggle:active,
.dark-mode-toggle:focus {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-dark);
  /* Remove mobile tap highlight */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  outline: none;
}

/* Remove active/focus states on mobile */
.nav-toggle:active,
.nav-toggle:focus {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* Hero Section */
.hero-section {
  padding: 120px 0 80px;
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  transition: var(--transition);
}

/* Dark mode hero background */
body.dark-mode .hero-section {
  background: rgba(42, 42, 42, 0.9);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: 70vh;
}

.hero-text {
  padding-right: 2rem;
}

.brand-badge {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--secondary-color);
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.hero-title {
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.hero-image-main {
  position: relative;
  width: 100%;
  max-width: 380px; /* Tăng từ 300px lên 380px */
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.hero-image-main.image-1 {
  transform: translateY(-40px); /* Tăng từ -30px lên -40px */
  z-index: 2;
}

.hero-image-main.image-2 {
  transform: translateY(40px); /* Tăng từ 30px lên 40px */
  z-index: 1;
}

.hero-image-main img {
  width: 100%;
  height: 420px; /* Tăng từ 350px lên 420px */
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero-image-main:hover img {
  transform: scale(1.02);
}

.decorative-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.leaf-decoration {
  position: absolute;
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 50% 0;
  opacity: 0.7;
}

.leaf-1 {
  top: 20px;
  left: -20px;
  transform: rotate(-45deg);
}

.leaf-2 {
  bottom: 20px;
  right: -20px;
  transform: rotate(135deg);
}

/* Gallery Section */
.gallery-section {
  padding: 80px 0;
  background: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

/* Dark mode gallery background */
body.dark-mode .gallery-section {
  background: rgba(42, 42, 42, 0.9);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 20px;
  margin-top: 2rem;
}

/* Gallery responsive improvements */
@media (min-width: 1200px) {
  .gallery-grid {
    gap: 25px;
    margin-top: 3rem;
  }

  .gallery-item {
    min-height: 300px;
  }
}

@media (min-width: 1440px) {
  .gallery-section {
    padding: 100px 0;
  }

  .gallery-grid {
    gap: 30px;
    margin-top: 4rem;
  }

  .gallery-item {
    min-height: 350px;
    border-radius: 20px;
  }
}

.gallery-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 1;
  /* Apply slideInUp animation to all devices */
  animation: slideInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Staggered animation delays and floating effects for all devices */
.gallery-item:nth-child(1) {
  animation: slideInUp 0.6s ease-out 0.1s, gentleFloat 4s ease-in-out infinite 1s;
  animation-fill-mode: both;
}
.gallery-item:nth-child(2) {
  animation: slideInUp 0.6s ease-out 0.2s, gentleFloat 5s ease-in-out infinite 1.5s;
  animation-fill-mode: both;
}
.gallery-item:nth-child(3) {
  animation: slideInUp 0.6s ease-out 0.3s, gentleFloat 4s ease-in-out infinite 2s;
  animation-fill-mode: both;
}
.gallery-item:nth-child(4) {
  animation: slideInUp 0.6s ease-out 0.4s, gentleFloat 5s ease-in-out infinite 2.5s;
  animation-fill-mode: both;
}
.gallery-item:nth-child(5) {
  animation: slideInUp 0.6s ease-out 0.5s, gentleFloat 4s ease-in-out infinite 3s;
  animation-fill-mode: both;
}
.gallery-item:nth-child(6) {
  animation: slideInUp 0.6s ease-out 0.6s, gentleFloat 5s ease-in-out infinite 3.5s;
  animation-fill-mode: both;
}

/* Gallery Load More Button */
.gallery-load-more {
  text-align: center;
  margin-top: 2rem;
  display: none; /* Hidden by default, shown only on mobile */
}

/* Gallery Hidden Items - Base styles */
.gallery-item-hidden {
  display: none;
}

.gallery-item-hidden.show {
  display: block;
  animation: fadeInScale 0.5s ease-out;
}

/* Show all gallery items on tablet and desktop */
@media (min-width: 769px) {
  .gallery-item-hidden {
    display: block !important;
  }

  .gallery-load-more {
    display: none !important;
  }
}

/* Animation for gallery items */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.btn-load-more {
  background-color: var(--accent-color);
  color: var(--secondary-color);
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 15px rgba(139, 105, 20, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-load-more:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(139, 105, 20, 0.4);
  background-color: #f0e1b8;
  color: #6d5010;
}

.btn-load-more:active {
  transform: translateY(0) scale(1.02);
}

.load-more-icon {
  transition: transform 0.3s ease;
}

.btn-load-more.expanded .load-more-text {
  position: relative;
}

.btn-load-more.expanded .load-more-text::after {
  content: "Ẩn bớt";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  color: white;
}

.btn-load-more.expanded .load-more-text::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  color: transparent;
}

.btn-load-more.expanded .load-more-icon {
  transform: rotate(180deg);
}

/* Services Section */
.services-section {
  padding: 80px 0;
  background: rgba(255, 255, 255, 0.9);
}

.service-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 6rem;
  padding: 2rem 0;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.service-card:nth-child(1) {
  transition-delay: 0.1s;
}

.service-card:nth-child(2) {
  transition-delay: 0.2s;
}

.service-card:nth-child(3) {
  transition-delay: 0.3s;
}

.service-card:nth-child(4) {
  transition-delay: 0.4s;
}

.service-card.reverse {
  direction: rtl;
}

.service-card.reverse > * {
  direction: ltr;
}

.service-content {
  padding: 2rem;
}

.service-badge {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--secondary-color);
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.service-title {
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.service-description {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.service-image {
  position: relative;
}

.image-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.image-container img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.image-container:hover img {
  transform: scale(1.02);
}

.flower-decoration,
.leaf-decoration {
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.8;
}

.flower-decoration {
  top: 20px;
  right: 20px;
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-white);
}

.cta-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.cta-title {
  color: var(--text-white);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-buttons .btn-primary {
  background-color: var(--text-white);
  color: var(--primary-color);
  border-color: var(--text-white);
}

.cta-buttons .btn-primary:hover {
  background-color: transparent;
  color: var(--text-white);
  border-color: var(--text-white);
}

.cta-buttons .btn-secondary {
  background-color: transparent;
  color: var(--text-white);
  border-color: var(--text-white);
}

.cta-buttons .btn-secondary:hover {
  background-color: var(--text-white);
  color: var(--primary-color);
}

.cta-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.cta-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* Experience Section */
.experience-section {
  padding: 80px 0;
  background: rgba(250, 249, 247, 0.9);
}

.experience-header {
  text-align: center;
  margin-bottom: 4rem;
}

.experience-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--accent-color);
  color: var(--secondary-color);
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.experience-badge i {
  font-size: 1rem;
  color: var(--primary-color);
}

.experience-title {
  color: var(--text-dark);
  margin-bottom: 0;
}

.experience-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* Tăng tỷ lệ hình ảnh từ 1fr lên 1.2fr */
  gap: 5rem; /* Tăng gap từ 4rem lên 5rem */
  align-items: center;
}

.experience-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.experience-image img {
  width: 100%;
  height: 580px; /* Tăng từ 500px lên 580px */
  object-fit: cover;
}

.experience-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem; /* Tăng gap từ 2rem lên 2.5rem */
}

.stat-card {
  background-color: var(--bg-white);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: var(--shadow-light);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* Add slide-up animation for all devices */
  animation: slideInUp 0.6s ease-out;
  animation-fill-mode: both;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Tạo stat cards hình vuông cho 2 card đầu tiên */
.stat-card:nth-child(1),
.stat-card:nth-child(2) {
  aspect-ratio: 1; /* Tạo hình vuông hoàn hảo */
  min-height: 280px; /* Chiều cao tối thiểu */
  max-height: 320px; /* Chiều cao tối đa */
  padding: 1.8rem; /* Giảm padding cho phù hợp với hình vuông */
}

/* Staggered animation delays for stat cards */
.stat-card:nth-child(1) {
  animation-delay: 0.2s;
}
.stat-card:nth-child(2) {
  animation-delay: 0.4s;
}
.stat-card:nth-child(3) {
  animation-delay: 0.6s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.stat-card-wide {
  grid-column: span 2;
}

.stat-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.stat-icon i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 1px;
}

.stat-number {
  font-family: var(--font-primary);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.stat-unit {
  font-size: 2rem;
  color: var(--primary-color);
}

.stat-description {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.5;
  margin: 0;
}

/* Điều chỉnh text cho stat cards hình vuông */
.stat-card:nth-child(1) .stat-description,
.stat-card:nth-child(2) .stat-description {
  font-size: 0.85rem; /* Giảm kích thước font cho phù hợp với hình vuông */
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* Giới hạn 4 dòng text */
  -webkit-box-orient: vertical;
}

/* Điều chỉnh số cho stat cards hình vuông */
.stat-card:nth-child(1) .stat-number,
.stat-card:nth-child(2) .stat-number {
  font-size: 2.5rem; /* Giảm kích thước số cho cân đối */
  margin-bottom: 0.8rem;
}

/* Điều chỉnh icon cho stat cards hình vuông */
.stat-card:nth-child(1) .stat-icon,
.stat-card:nth-child(2) .stat-icon {
  margin-bottom: 0.8rem;
}

/* Testimonials Section */
.testimonials-section {
  padding: 80px 0;
  background: rgba(255, 255, 255, 0.8);
}

.section-title {
  text-align: center;
  color: var(--text-dark);
  margin-bottom: 3rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  /* Add slide-up animation for all devices */
  animation: slideInUp 0.6s ease-out;
  animation-fill-mode: both;
}

/* Staggered animation delays for testimonial cards */
.testimonial-card:nth-child(1) {
  animation-delay: 0.1s;
}
.testimonial-card:nth-child(2) {
  animation-delay: 0.2s;
}
.testimonial-card:nth-child(3) {
  animation-delay: 0.3s;
}
.testimonial-card:nth-child(4) {
  animation-delay: 0.4s;
}
.testimonial-card:nth-child(5) {
  animation-delay: 0.5s;
}
.testimonial-card:nth-child(6) {
  animation-delay: 0.6s;
}

.testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.stars {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.testimonial-card p {
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.author {
  font-weight: 600;
  color: var(--text-dark);
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: var(--text-white);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.footer-logo img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.footer-logo span {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.footer-info p {
  color: #ccc;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: var(--text-white);
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.footer-links h4,
.footer-contact h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  color: #ccc;
}

.contact-item i {
  color: var(--primary-color);
  width: 20px;
}

/* Contact Phone Links in Footer */
.contact-phone-link {
  color: #ccc;
  text-decoration: none;
  transition: all 0.2s ease;
  /* Remove mobile tap highlight */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  outline: none;
}

.contact-phone-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Remove active/focus states on mobile */
.contact-phone-link:active,
.contact-phone-link:focus {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* Phone Numbers Container */
.phone-numbers {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 2rem;
  text-align: center;
  color: #ccc;
}

/* Scroll to Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--text-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.scroll-to-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top-btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Tablet Design (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }

  /* Hero Section */
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
  }

  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .hero-image-main {
    max-width: 200px;
  }

  .hero-image-main img {
    height: 250px;
  }

  /* Gallery Section - Keep animation from base styles */
  .gallery-grid {
    gap: 15px;
  }

  /* Services Section */
  .service-card {
    gap: 3rem;
    margin-bottom: 5rem;
  }

  .service-content {
    padding: 1.5rem;
  }

  .service-title {
    font-size: 1.8rem;
  }

  /* Experience Section */
  .experience-content {
    grid-template-columns: 1.1fr 1fr; /* Giữ tỷ lệ phù hợp cho tablet */
    gap: 3.5rem; /* Tăng gap cho tablet */
    align-items: center;
  }

  .experience-stats {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  /* Điều chỉnh stat cards hình vuông cho tablet */
  .stat-card:nth-child(1),
  .stat-card:nth-child(2) {
    min-height: 250px;
    max-height: 280px;
    padding: 1.5rem;
  }

  .stat-card:nth-child(1) .stat-number,
  .stat-card:nth-child(2) .stat-number {
    font-size: 2.2rem;
  }

  .stat-card:nth-child(1) .stat-description,
  .stat-card:nth-child(2) .stat-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 3;
  }

  .stat-card-wide {
    grid-column: span 2;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* CTA Section */
  .cta-section .container {
    gap: 3rem;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }
}

/* Tablet Design (769px to 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  /* Điều chỉnh stat cards hình vuông cho tablet */
  .stat-card:nth-child(1),
  .stat-card:nth-child(2) {
    aspect-ratio: 1; /* Giữ hình vuông trên tablet */
    min-height: 250px;
    max-height: 280px;
    padding: 1.5rem;
  }

  .stat-card:nth-child(1) .stat-number,
  .stat-card:nth-child(2) .stat-number {
    font-size: 2.2rem;
  }

  .stat-card:nth-child(1) .stat-description,
  .stat-card:nth-child(2) .stat-description {
    font-size: 0.82rem;
    -webkit-line-clamp: 3;
  }
}

/* Mobile Design (768px and below) */
@media (max-width: 768px) {
  .container {
    padding: 0 20px; /* Tăng từ 15px lên 20px cho mobile */
  }

  /* Navigation */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--bg-white);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 1rem 0;
  }

  .nav-toggle {
    display: flex;
  }

  .dark-mode-toggle {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  /* Hero Section */
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-text {
    padding-right: 0;
    order: 2;
  }

  .hero-image {
    order: 1;
    flex-direction: column;
    gap: 1rem;
  }

  .hero-image-main {
    max-width: 340px; /* Tăng từ 280px lên 340px cho tablet */
  }

  .hero-image-main.image-1 {
    transform: translateY(-15px);
  }

  .hero-image-main.image-2 {
    transform: translateY(15px);
  }

  .hero-image-main img {
    height: 380px; /* Tăng từ 320px lên 380px cho tablet */
  }

  .hero-buttons {
    justify-content: center;
  }

  /* Services */
  .service-card,
  .service-card.reverse {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    direction: ltr;
    margin-bottom: 4rem;
  }

  .service-card .service-image {
    order: 1;
    width: 100%;
  }

  .service-card .service-content {
    order: 2;
    padding: 1rem;
  }

  /* Ensure all service cards on mobile show image first */
  .service-card.reverse .service-image {
    order: 1;
  }

  .service-card.reverse .service-content {
    order: 2;
  }

  /* CTA Section */
  .cta-section .container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .cta-buttons {
    justify-content: center;
  }

  /* Experience Section */
  .experience-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .experience-image {
    order: 1;
  }

  .experience-stats {
    order: 2;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Điều chỉnh stat cards hình vuông cho mobile */
  .stat-card:nth-child(1),
  .stat-card:nth-child(2) {
    aspect-ratio: auto; /* Tắt hình vuông trên mobile cho layout tự nhiên */
    min-height: 220px;
    max-height: 250px;
    padding: 1.3rem;
  }

  .stat-card:nth-child(1) .stat-number,
  .stat-card:nth-child(2) .stat-number {
    font-size: 1.8rem; /* Giảm size cho mobile */
    margin-bottom: 0.5rem;
  }

  .stat-card:nth-child(1) .stat-description,
  .stat-card:nth-child(2) .stat-description {
    font-size: 0.75rem; /* Giảm size text cho mobile */
    line-height: 1.3;
    -webkit-line-clamp: 4; /* Cho phép 4 dòng trên mobile */
  }

  .stat-card-wide {
    grid-column: span 1;
  }

  .experience-image img {
    height: 400px; /* Tăng từ 350px lên 400px cho mobile */
  }

  /* Gallery - Beautiful Mobile Layout */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  /* Mobile specific styling - animations handled in base styles */
  .gallery-item {
    border-radius: 10px;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px; /* Padding nhỏ hơn cho điện thoại nhỏ */
  }

  .hero-section {
    padding: 100px 0 60px;
  }

  .hero-image-main {
    max-width: 300px; /* Tăng từ 250px lên 300px cho mobile */
  }

  .hero-image-main.image-1 {
    transform: translateY(-10px);
  }

  .hero-image-main.image-2 {
    transform: translateY(10px);
  }

  .hero-image-main img {
    height: 350px; /* Tăng từ 290px lên 350px cho mobile */
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .service-card {
    margin-bottom: 4rem;
  }

  /* Stat cards đặc biệt cho điện thoại nhỏ */
  .stat-card:nth-child(1),
  .stat-card:nth-child(2) {
    aspect-ratio: auto;
    min-height: 200px;
    max-height: 220px;
    padding: 1rem;
  }

  .stat-card:nth-child(1) .stat-number,
  .stat-card:nth-child(2) .stat-number {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
  }

  .stat-card:nth-child(1) .stat-description,
  .stat-card:nth-child(2) .stat-description {
    font-size: 0.7rem;
    line-height: 1.2;
    -webkit-line-clamp: 3;
  }

  .stat-card:nth-child(1) .stat-label,
  .stat-card:nth-child(2) .stat-label {
    font-size: 0.7rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

/* Simplified animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scroll animations - simplified */
.hero-content,
.testimonial-card,
.gallery-item {
  animation: fadeIn 0.6s ease-out;
}

/* Performance optimizations */
.hero-image-main img,
.image-container img,
.gallery-item img,
.cta-image img {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Smooth scrolling optimization */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .navbar,
  .scroll-to-top-btn {
    display: none;
  }

  .hero-section,
  .services-section,
  .cta-section,
  .testimonials-section {
    padding: 2rem 0;
  }

  .hero-content,
  .service-card,
  .cta-section .container {
    grid-template-columns: 1fr;
  }
}

/* Mobile Gallery Interactive Effects */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gentleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Enhanced Mobile Gallery Styles */
@media (max-width: 768px) {
  .gallery-item {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
  }

  .gallery-item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  /* Smooth entrance animation */
  .gallery-section {
    overflow: hidden;
  }

  /* Add subtle floating animation */
  .gallery-item:nth-child(odd) {
    animation: slideInUp 0.6s ease-out, gentleFloat 4s ease-in-out infinite 2s;
  }

  .gallery-item:nth-child(even) {
    animation: slideInUp 0.6s ease-out, gentleFloat 5s ease-in-out infinite 3s;
  }
}

/* Gallery Items Hidden State */
@media (max-width: 768px) {
  .gallery-load-more {
    display: block;
  }
}

/* ===== DARK MODE COMPREHENSIVE STYLES ===== */

/* Buttons in Dark Mode */
body.dark-mode .btn-primary {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: var(--text-dark);
  border: 2px solid var(--primary-color);
}

body.dark-mode .btn-primary:hover {
  background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

body.dark-mode .btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

body.dark-mode .btn-outline:hover {
  background: var(--primary-color);
  color: var(--bg-dark);
}

body.dark-mode .btn-load-more {
  background: var(--primary-color);
  color: var(--text-dark);
  border: 2px solid var(--primary-color);
}

/* Service Cards in Dark Mode */
body.dark-mode .service-card {
  background: var(--bg-white);
  border: 1px solid rgba(228, 184, 134, 0.2);
}

body.dark-mode .service-badge {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: var(--text-dark);
}

/* Gallery Items in Dark Mode */
body.dark-mode .gallery-item {
  border: 1px solid rgba(228, 184, 134, 0.3);
  box-shadow: var(--shadow-light);
}

body.dark-mode .gallery-item:hover {
  box-shadow: var(--shadow-medium);
  border-color: var(--primary-color);
}

/* Experience Section in Dark Mode */
body.dark-mode .experience-section {
  background: var(--bg-light);
}

body.dark-mode .experience-badge {
  background: var(--primary-color);
  color: var(--text-dark);
}

/* Testimonials in Dark Mode */
body.dark-mode .testimonials-section {
  background: var(--bg-light);
}

body.dark-mode .testimonial-card {
  background: var(--bg-white);
  border: 1px solid rgba(228, 184, 134, 0.2);
}

body.dark-mode .stars {
  color: var(--primary-color);
}

/* CTA Section in Dark Mode */
body.dark-mode .cta-section {
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--accent-color) 100%);
}

/* Footer in Dark Mode */
body.dark-mode .footer {
  background: #1a1a1a;
  border-top: 1px solid rgba(228, 184, 134, 0.3);
}

body.dark-mode .footer h4 {
  color: var(--primary-color);
}

body.dark-mode .footer a {
  color: var(--text-light);
}

body.dark-mode .footer a:hover {
  color: var(--primary-color);
}

body.dark-mode .social-links a {
  background: var(--bg-white);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

body.dark-mode .social-links a:hover {
  background: var(--primary-color);
  color: var(--bg-white);
}

/* Scroll to Top Button in Dark Mode */
body.dark-mode .scroll-to-top-btn {
  background: var(--primary-color);
  color: var(--text-dark);
  border: 2px solid var(--primary-color);
}

body.dark-mode .scroll-to-top-btn:hover {
  background: transparent;
  color: var(--primary-color);
}

/* Input and Form Elements in Dark Mode */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
  background: var(--bg-white);
  color: var(--text-dark);
  border: 1px solid rgba(228, 184, 134, 0.3);
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(228, 184, 134, 0.2);
}

/* Navbar Dark Mode Enhancement */
body.dark-mode .navbar {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(228, 184, 134, 0.2);
}

body.dark-mode .navbar.scrolled {
  background: rgba(26, 26, 26, 0.98);
  box-shadow: var(--shadow-medium);
}

/* Brand Badge in Dark Mode */
body.dark-mode .brand-badge {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: var(--text-dark);
}

/* Hero Title in Dark Mode */
body.dark-mode .hero-title {
  color: var(--text-dark);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Section Titles in Dark Mode */
body.dark-mode .section-title::after {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

/* Smooth transition for all elements */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Dark Mode Animation Enhancement */
body.dark-mode .gallery-item img {
  filter: brightness(0.9) contrast(1.1);
}

body.dark-mode .gallery-item:hover img {
  filter: brightness(1) contrast(1.2);
}

body.dark-mode .service-card img {
  filter: brightness(0.9) contrast(1.1);
}

body.dark-mode .service-card:hover img {
  filter: brightness(1) contrast(1.2);
}

/* Contact Modal Styles */
.contact-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  background: rgba(0, 0, 0, 0);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.contact-modal.show {
  display: flex;
  background: rgba(0, 0, 0, 0.75);
  animation: modalBackdropFadeIn 0.3s ease-out;
}

.modal-content {
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  transform: scale(0.7) translateY(30px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.contact-modal.show .modal-content {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: modalContentSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Modal Animation Keyframes */
@keyframes modalBackdropFadeIn {
  0% {
    background: rgba(0, 0, 0, 0);
  }
  100% {
    background: rgba(0, 0, 0, 0.75);
  }
}

@keyframes modalContentSlideIn {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(30px);
  }
  60% {
    opacity: 0.8;
    transform: scale(1.02) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Form Elements Animation */
.contact-modal.show .form-group {
  animation: formElementSlideUp 0.5s ease-out backwards;
}

.contact-modal.show .form-group:nth-child(1) {
  animation-delay: 0.1s;
}
.contact-modal.show .form-group:nth-child(2) {
  animation-delay: 0.15s;
}
.contact-modal.show .form-group:nth-child(3) {
  animation-delay: 0.2s;
}
.contact-modal.show .contact-info {
  animation-delay: 0.25s;
}
.contact-modal.show .form-group:nth-child(5) {
  animation-delay: 0.3s;
}
.contact-modal.show .privacy-notice {
  animation-delay: 0.35s;
}
.contact-modal.show .submit-btn {
  animation-delay: 0.4s;
}

@keyframes formElementSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 30px 20px;
  border-bottom: 1px solid rgba(233, 236, 239, 0.5);
  background: linear-gradient(135deg, var(--accent-color) 0%, rgba(255, 255, 255, 0.95) 100%);
  border-radius: 20px 20px 0 0;
}

/* Modal Header Animation */
.contact-modal.show .modal-header {
  animation: headerSlideDown 0.4s ease-out 0.05s backwards;
}

.contact-modal.show .modal-header h2 {
  animation: titleFadeIn 0.5s ease-out 0.15s backwards;
}

.contact-modal.show .modal-close {
  animation: closeButtonScale 0.3s ease-out 0.2s backwards;
}

@keyframes headerSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes closeButtonScale {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
  }
  70% {
    transform: scale(1.1) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.modal-header h2 {
  color: var(--primary-color);
  font-family: var(--font-primary);
  font-size: 1.8rem;
  margin: 0;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modal-close {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 1.3rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  /* Remove mobile tap highlight */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  outline: none;
}

.modal-close:hover {
  background: var(--primary-color);
  color: white;
}

/* Remove active/focus states on mobile */
.modal-close:active,
.modal-close:focus {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.contact-form {
  padding: 30px;
  padding-top: 20px;
  flex: 1;
  overflow-y: auto;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
  font-family: var(--font-secondary);
}

.required {
  color: #e74c3c;
  font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: var(--font-secondary);
  transition: all 0.2s ease;
  background: var(--bg-white);
  color: var(--text-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.15);
  background: rgba(255, 255, 255, 0.98);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* Error message for form fields */
.form-group {
  position: relative;
}

.form-group .error-message {
  position: absolute;
  bottom: -18px;
  left: 0;
  color: #e74c3c;
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(-3px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.form-group input.error + .error-message,
.form-group select.error + .error-message,
.form-group textarea.error + .error-message {
  opacity: 1;
  transform: translateY(0);
}

/* Select field specific error styling */
.form-group select.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23e74c3c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
}

/* Form Validation Styles */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* Loading state for submit button */
.submit-btn.loading {
  background: #ccc;
  cursor: not-allowed;
  position: relative;
}

.submit-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced submit button with loading state */
.submit-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
}

.btn-loading {
  display: none;
  align-items: center;
  gap: 8px;
}

.btn-loading i {
  animation: spin 1s linear infinite;
}

/* ===== ENHANCED CONTACT INFO SECTION ===== */

.contact-info {
  background: var(--bg-white);
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  text-align: center;
  box-shadow: 0 4px 16px rgba(212, 165, 116, 0.1);
}

.contact-info h4 {
  color: var(--primary-color);
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 600;
}

.contact-phones {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.phone-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 160px;
  justify-content: center;
}

.phone-link:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.phone-link i {
  font-size: 14px;
}

.response-time {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .contact-info {
    padding: 16px;
    margin: 20px 0;
  }
  
  .contact-phones {
    flex-direction: column;
    gap: 8px;
  }
  
  .phone-link {
    min-width: auto;
  }
}
  
  .contact-info-header {
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  
  .contact-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  
  .contact-text h4 {
    font-size: 1rem;
  }
  
  .contact-text p {
    font-size: 0.85rem;
  }
  
  .contact-phones {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }
  
  .phone-link {
    min-width: auto;
    padding: 14px;
    border-radius: 12px;
  }
  
  .phone-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

/* Dark mode support */
body.dark-mode .contact-info {
  background: var(--bg-white);
  border-color: var(--primary-color);
}

body.dark-mode .phone-link {
  background: var(--bg-secondary);
  color: var(--text-light);
}

/* Success Modal Styles */
.success-modal {
  display: none !important; /* Force hide by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10001;
  background: rgba(0, 0, 0, 0);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.success-modal.show {
  display: flex !important; /* Force show when has .show class */
  background: rgba(0, 0, 0, 0.8);
  animation: modalBackdropFadeIn 0.3s ease-out;
}

.success-content {
  background: var(--bg-white);
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  padding: 40px 30px;
  text-align: center;
  max-width: 450px;
  width: 100%;
  opacity: 0;
  transform: scale(0.7) translateY(30px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-modal.show .success-content {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: successModalSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
  font-size: 40px;
  animation: successIconPulse 0.6s ease-out 0.3s backwards;
}

.success-content h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.8rem;
  font-weight: 600;
  animation: successTextSlideUp 0.5s ease-out 0.4s backwards;
}

.success-content p {
  color: var(--text-light);
  margin-bottom: 25px;
  line-height: 1.6;
  font-size: 1rem;
  animation: successTextSlideUp 0.5s ease-out 0.5s backwards;
}

.countdown-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.9rem;
  padding: 12px 20px;
  background: var(--accent-color);
  border-radius: 25px;
  margin-top: 10px;
  animation: successTextSlideUp 0.5s ease-out 0.6s backwards;
}

.countdown-timer i {
  font-size: 14px;
  animation: tickAnimation 1s ease-in-out infinite;
}

@keyframes successModalSlideIn {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(30px);
  }
  60% {
    opacity: 0.9;
    transform: scale(1.05) translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes successIconPulse {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes successTextSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tickAnimation {
  0%, 100% { 
    transform: rotate(0deg); 
  }
  25% { 
    transform: rotate(-10deg); 
  }
  75% { 
    transform: rotate(10deg); 
  }
}

/* Mobile Success Modal */
@media (max-width: 768px) {
  .success-content {
    padding: 30px 20px;
    margin: 20px;
    border-radius: 16px;
  }

  .success-icon {
    width: 70px;
    height: 70px;
    font-size: 35px;
  }

  .success-content h3 {
    font-size: 1.5rem;
  }

  .success-content p {
    font-size: 0.95rem;
  }
}

/* Dark mode support */
body.dark-mode .success-content {
  background: var(--bg-white);
  color: var(--text-dark);
}

body.dark-mode .countdown-timer {
  background: var(--accent-color);
}
