/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.toast.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.toast-message {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.toast-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Language Switcher */
.language-switcher {
    position: relative;
    display: inline-block;
}

.language-switcher button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.language-switcher button:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.language-switcher button:active {
    transform: translateY(0);
}

.flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 140px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.language-option:hover {
    background-color: #f3f4f6;
    transform: translateX(2px);
}

.language-option.active {
    background-color: #dbb155;
    color: white;
}

.language-option.active:hover {
    background-color: #c49d4a;
}

.language-option .flag-icon {
    width: 18px;
    height: 13px;
}

/* Mobile language switcher */
.mobile-language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    margin-top: 16px;
}

.mobile-language-switcher .flag-icon {
    width: 24px;
    height: 18px;
}

.mobile-language-switcher select {
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    outline: none;
}

.mobile-language-switcher select:focus {
    outline: none;
}

.shadow-inset {
    box-shadow: inset -2px -2px 4px rgba(255, 255, 255, 0.8), inset 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.shadow-inset-lg {
    box-shadow: inset -4px -4px 8px rgba(255, 255, 255, 0.8), inset 4px 4px 8px rgba(0, 0, 0, 0.1);
}

.shadow-inset-xl {
    box-shadow: inset -8px -8px 16px rgba(255, 255, 255, 0.8), inset 8px 8px 16px rgba(0, 0, 0, 0.1);
}

.shadow-outset {
    box-shadow: -3px -3px 6px rgba(255, 255, 255, 0.8), 3px 3px 6px rgba(0, 0, 0, 0.1);
}

.shadow-outset-lg {
    box-shadow: -4px -4px 8px rgba(255, 255, 255, 0.8), 4px 4px 8px rgba(0, 0, 0, 0.1);
}

.shadow-outset-xl {
    box-shadow: -8px -8px 16px rgba(255, 255, 255, 0.8), 8px 8px 16px rgba(0, 0, 0, 0.1);
}

.animate-in {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-in-from-top {
    animation: slideInFromTop 0.2s ease-in-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduce motion for users who prefer less animation */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Hint the browser to skip rendering offscreen sections until needed */
.cv-auto {
    content-visibility: auto;
    contain-intrinsic-size: 1px 1000px; /* reserve space to avoid jumps */
}

/* Carousel drag styles */
#carouselContainer,
#testimonialsContainer {
    cursor: grab;
    user-select: none;
}

#carouselContainer.dragging,
#testimonialsContainer.dragging {
    cursor: grabbing;
    transition: none !important;
}

#carouselContainer.dragging *,
#testimonialsContainer.dragging * {
    pointer-events: none;
}

/* Enhanced Button Hover Animations */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: -6px -6px 12px rgba(255, 255, 255, 0.9), 6px 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.3));
    transition: width 0.3s ease;
}

.btn-secondary:hover::before {
    width: 100%;
}

.btn-secondary:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: -4px -4px 8px rgba(255, 255, 255, 0.9), 4px 4px 8px rgba(0, 0, 0, 0.12);
}

.btn-icon {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover {
    box-shadow: -4px -4px 8px rgba(255, 255, 255, 0.9), 4px 4px 8px rgba(0, 0, 0, 0.12);
}

.btn-icon:active {
    transform: translateY(0) rotate(0deg) scale(0.98);
}

.btn-pulse {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pulse:hover {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.btn-bounce {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-bounce:hover {
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
}

.btn-glow {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glow:hover {
    box-shadow: 
        -4px -4px 8px rgba(255, 255, 255, 0.9), 
        4px 4px 8px rgba(0, 0, 0, 0.12),
        0 0 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.btn-slide {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-slide::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.btn-slide:hover::after {
    width: 300px;
    height: 300px;
}

.btn-slide:hover {
    transform: translateY(-2px) scale(1.02);
}

/* Icon animations */
.btn-icon i {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover i {
    transform: scale(1.1);
}

/* Text animations */
.btn-text {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-text:hover {
    transform: translateY(-1px);
}

/* Focus states for accessibility */
.btn-primary:focus,
.btn-secondary:focus,
.btn-icon:focus,
.btn-pulse:focus,
.btn-bounce:focus,
.btn-glow:focus,
.btn-slide:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Disabled states */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-icon:disabled,
.btn-pulse:disabled,
.btn-bounce:disabled,
.btn-glow:disabled,
.btn-slide:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    animation: none !important;
}

.btn-primary:disabled:hover,
.btn-secondary:disabled:hover,
.btn-icon:disabled:hover,
.btn-pulse:disabled:hover,
.btn-bounce:disabled:hover,
.btn-glow:disabled:hover,
.btn-slide:disabled:hover {
    transform: none;
    box-shadow: inherit;
}

/* Carousel Scroll Animation */
@keyframes scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.animate-scroll {
    animation: scroll 24s linear infinite;
    will-change: transform;
    display: inline-flex;
}

@media (max-width: 640px) {
    .animate-scroll {
        animation-duration: 36s;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .animate-scroll {
        animation-duration: 30s;
    }
}

.intro-text p {
  text-align: center;       /* căn giữa */
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  max-width: 600px;
  margin: 0 auto;
}

.intro-text p span {
  font-weight: bold;
}
.space-y-3 p {
  position: relative;
  padding-left: 28px; /* chừa chỗ cho icon */
  margin: 0;
}

.space-y-3 p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='lucide lucide-check-circle' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/><polyline points='22 4 12 14.01 9 11.01'/></svg>") no-repeat center/contain;
}
/*  */
  .error-message {
    color: red;
    font-size: 0.85rem;
    margin-top: 4px;
    display: none;
  }
  .error {
    border: 1px solid red !important;
  }
  .prose iframe {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

