/* Custom Styles for Dạy Lái Xe Hải Vân */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Roboto", sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

/* Smooth Scrolling - Disabled */
html {
  scroll-behavior: auto;
}

/* Selection Color */
::selection {
  background: #2563eb;
  color: white;
}

::-moz-selection {
  background: #2563eb;
  color: white;
}

/* Custom Gradients */
.gradient-bg-1 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-2 {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-3 {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animated Gradient Background */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animated-gradient {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

/* Shimmer Animation for Top Bar */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.animate-shimmer {
  animation: shimmer 3s infinite;
}

/* Custom Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slideInLeft {
  animation: slideInLeft 1s ease-out;
}

.animate-slideInRight {
  animation: slideInRight 1s ease-out;
}

/* Banner Slider Styles */
.banner-slider {
  position: relative;
  overflow: hidden;
  background-color: #1a1a1a;
  min-height: 600px;
}

.banner-slide {
  transition: opacity 1.2s ease-in-out;
  pointer-events: none;
  visibility: hidden;
}

.banner-slide.active {
  opacity: 1 !important;
  z-index: 2;
  pointer-events: auto;
  visibility: visible !important;
}

.banner-slide:not(.active) {
  opacity: 0 !important;
  z-index: 1;
  visibility: hidden;
}

.banner-slide img {
  display: block !important;
  width: 100%;
  height: 100%;
  min-height: 600px;
  object-fit: cover;
  opacity: 1 !important;
  visibility: visible !important;
}

.banner-prev,
.banner-next {
  transition: all 0.3s ease;
}

.banner-prev:hover,
.banner-next:hover {
  transform: scale(1.1) translateY(-50%);
}

.banner-dot {
  transition: all 0.3s ease;
  cursor: pointer;
}

.banner-dot.active {
  background: white;
  width: 2rem;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.8);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fadeIn {
  animation: fadeIn 0.8s ease-out;
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease-out;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-rotate {
  animation: rotate 20s linear infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-fadeInScale {
  animation: fadeInScale 0.5s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Animate on scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Scroll animations with delays */
.animate-delay-100 {
  animation-delay: 0.1s;
}

.animate-delay-200 {
  animation-delay: 0.2s;
}

.animate-delay-300 {
  animation-delay: 0.3s;
}

.animate-delay-400 {
  animation-delay: 0.4s;
}

/* Parallax effect */
.parallax {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Glow effect */
@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.8);
  }
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

/* Remove float and glow on mobile for performance */
@media (max-width: 768px) {
  .animate-float {
    animation: none !important;
  }

  .animate-glow {
    animation: none !important;
  }
}

/* Header Styles */
header {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.98);
}

header nav a {
  position: relative;
}

header nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  transition: width 0.3s ease;
}

header nav a:hover::after {
  width: 100%;
}

/* Mobile Menu */
#mobile-menu {
  transition: all 0.3s ease;
}

#mobile-menu.active {
  display: block;
}

/* Hero Section */
#home {
  display: flex;
  align-items: center;
}

/* Hover Effects */
.hover-lift {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Button Styles */
button,
a.button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

button:hover,
a.button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

button:active,
a.button:active {
  transform: translateY(0) scale(0.98);
}

/* Card Styles */
.card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.card:hover {
  transform: translateY(-10px) rotateX(2deg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* Course Cards */
.course-card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #3b82f6, #60a5fa);
  transform: scaleX(0);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover::before {
  transform: scaleX(1);
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(37, 99, 235, 0.2);
}

/* Advantages Grid */
.advantage-item {
  transition: all 0.3s ease;
}

.advantage-item:hover {
  transform: translateY(-5px);
}

.advantage-item:hover .advantage-icon {
  animation: bounce 0.6s ease;
}

/* Process Steps */
.process-step {
  position: relative;
  padding-left: 80px;
}

.process-step::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 64px;
  width: 2px;
  height: calc(100% + 32px);
  background: #e5e7eb;
}

.process-step:last-child::before {
  display: none;
}

/* Review Cards */
.review-card {
  transition: all 0.3s ease;
}

.review-card:hover {
  transform: scale(1.05);
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

/* Scroll to Top Button */
#scrollToTop {
  transition: all 0.3s ease;
}

#scrollToTop.show {
  opacity: 1;
  pointer-events: auto;
}

#scrollToTop:hover {
  transform: translateY(-3px);
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success/Error Messages */
.message {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  animation: fadeIn 0.3s ease;
}

.message-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.message-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Stats Counter Animation */
.stat-number {
  display: inline-block;
  transition: all 0.3s ease;
}

/* Image Styles */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Hero Image Container */
.hero-image-container {
  position: relative;
  animation: fadeIn 1s ease-out;
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.25rem;
  }
}

/* Material Icons Alignment */
.material-icons {
  vertical-align: middle;
}

/* Selection Color */
::selection {
  background-color: #2563eb;
  color: white;
}

::-moz-selection {
  background-color: #2563eb;
  color: white;
}

/* Custom Scrollbar - Disabled */

/* Print Styles */
@media print {
  header,
  footer,
  #scrollToTop {
    display: none;
  }

  body {
    font-size: 12pt;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  body {
    color: #000;
    background-color: #fff;
  }

  a {
    text-decoration: underline;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles if needed */
}

/* Utility Classes */
.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.box-shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.box-shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.box-shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.box-shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Spacing Utilities */
.section-spacing {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* Container Max Width */
.container {
  max-width: 1280px;
}

/* Aspect Ratio */
.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

/* Glass Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* Gradient Borders */
.gradient-border {
  position: relative;
  background: white;
  border-radius: 1rem;
}

.gradient-border::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: -1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #2563eb;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1d4ed8;
}

/* Loading Animation */
.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: "";
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: "";
  }
  40% {
    content: ".";
  }
  60% {
    content: "..";
  }
  80%,
  100% {
    content: "...";
  }
}

/* Background Patterns */
.bg-pattern-dots {
  background-image: radial-gradient(circle, #e5e7eb 1px, transparent 1px);
  background-size: 20px 20px;
}

.bg-pattern-grid {
  background-image: linear-gradient(#e5e7eb 1px, transparent 1px),
    linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Card Hover Effects */
.card-interactive {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-interactive:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Ribbon Effect */
.ribbon {
  position: absolute;
  top: 10px;
  right: -5px;
  background: #ef4444;
  color: white;
  padding: 5px 15px;
  font-weight: bold;
  font-size: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ribbon::before {
  content: "";
  position: absolute;
  bottom: -5px;
  right: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid #b91c1c;
  border-bottom: 5px solid transparent;
}

/* Floating Animation */
.float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Shine Effect */
.shine {
  position: relative;
  overflow: hidden;
}

.shine::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.shine:hover::before {
  left: 100%;
}

/* Neon Glow Effect */
.neon-glow {
  text-shadow: 0 0 5px rgba(37, 99, 235, 0.5), 0 0 10px rgba(37, 99, 235, 0.5),
    0 0 20px rgba(37, 99, 235, 0.5), 0 0 40px rgba(37, 99, 235, 0.3);
}

/* 3D Card Effect */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card-3d:hover {
  transform: rotateY(5deg) rotateX(5deg) scale(1.05);
}

/* Parallax Effect */
.parallax {
  transition: transform 0.3s ease-out;
}

/* Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Skew on Hover */
.skew-hover {
  transition: transform 0.3s ease;
}

.skew-hover:hover {
  transform: skewX(-5deg);
}

/* Gradient Border Animation */
@keyframes gradient-border {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animated-gradient-border {
  position: relative;
  background: white;
  border-radius: 1rem;
}

.animated-gradient-border::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
  background-size: 200% 200%;
  animation: gradient-border 3s ease infinite;
  z-index: -1;
}

/* Smooth Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s, transform 0.6s;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Bounce on Scroll */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

.bounce-in {
  animation: bounceIn 0.8s;
}

/* Backdrop Blur */
.backdrop-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Responsive Images */
.img-responsive {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Card Hover Effects */
.card-interactive {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-interactive:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.1);
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

/* Pulse Animation for Important Elements */
.pulse-important {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive Utilities */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 768px) {
  .section-spacing {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Banner slider mobile optimization */
  .banner-slider {
    height: 500px !important;
  }

  .banner-slide h2 {
    font-size: 2.5rem !important;
    line-height: 1.2;
  }

  .banner-slide p {
    font-size: 1rem !important;
  }

  .banner-prev,
  .banner-next {
    padding: 0.75rem;
  }

  .banner-prev .material-icons,
  .banner-next .material-icons {
    font-size: 1.5rem;
  }

  /* Disable heavy animations on mobile */
  .animate-float,
  .animate-glow {
    animation: none !important;
  }
}

/* Tablet Optimization */
@media (min-width: 768px) and (max-width: 1024px) {
  .banner-slider {
    height: 550px !important;
  }
}

/* Desktop Enhancements */
@media (min-width: 1024px) {
  .hover-3d {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .hover-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) scale(1.02);
  }
}

/* Ultra-wide screen optimization */
@media (min-width: 1920px) {
  .container {
    max-width: 1600px;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}
