/* ============================================
   DDXPost - Main CSS
   Standalone HTML/CSS/JS Version
   ============================================ */

/* Custom Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ============================================
   ANIMATIONS
   ============================================ */
/* ============================================
   HEADER FULL STYLES
   Bổ sung cho main.css
   ============================================ */

/* Mega Menu Styles */
.mega-menu {
  pointer-events: none;
}

.group:hover .mega-menu {
  pointer-events: auto;
}

/* Language Dropdown Animation */
.lang-dropdown {
  transform-origin: top right;
}

.lang-dropdown.lang-open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

/* Mobile Menu Animation */
.mobile-menu {
  transition: max-height 0.3s ease-in-out;
}

.mobile-menu.menu-open {
  max-height: 1000px !important;
}

/* Mobile Accordion */
.mobile-accordion-content {
  transition: max-height 0.3s ease-in-out;
}

/* Nav Link Underline Animation */
.nav-link {
  position: relative;
  display: inline-block;
}

.nav-link span {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  transform-origin: left;
}

/* Header Sticky State */
.header-scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px);
}

/* Gradient Purple (matching design) */
.gradient-purple {
  background: linear-gradient(135deg, #4D148C 0%, #7c3aed 100%);
}

/* Hover Scale Effect */
.hover-scale-105:hover {
  transform: scale(1.05);
}

/* Language Check Animation */
.lang-check {
  transition: opacity 0.2s ease-in-out;
}

/* Mobile Menu Icon Transition */
#menuIcon,
#closeIcon {
  transition: all 0.3s ease;
}

/* Mega Menu Column Hover */
.mega-menu a:hover {
  transform: translateX(4px);
  transition: transform 0.2s ease;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .mega-menu {
    display: none;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Accessibility - Focus States */
.nav-link:focus,
.lang-option:focus,
button:focus {
  outline: 2px solid #4D148C;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth Transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo Pulse Animation (Optional) */
@keyframes logo-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.logo-pulse {
  animation: logo-pulse 2s ease-in-out infinite;
}

/* Dropdown Arrow Rotation */
#langChevron {
  transition: transform 0.3s ease;
}

/* Mega Menu Slide In Animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.group:hover .mega-menu {
  animation: slideDown 0.3s ease forwards;
}

/* Mobile Menu Slide Animation */
@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.mobile-menu.menu-open nav {
  animation: slideIn 0.3s ease forwards;
}

/* Hotline Button Pulse Effect */
@keyframes phone-ring {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(12deg);
  }
  75% {
    transform: rotate(-12deg);
  }
}

a[href^="tel"]:hover svg {
  animation: phone-ring 0.5s ease;
}

/* Badge Pulse Animation */
@keyframes badge-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.animate-pulse-slow {
  animation: badge-pulse 2s ease-in-out infinite;
}

/* Glass Morphism Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #4D148C 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Active State for Current Page */
.nav-link[aria-current="page"] {
  color: #4D148C;
  font-weight: 600;
}

.nav-link[aria-current="page"] span {
  transform: scaleX(1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes particleMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(var(--tx), var(--ty));
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* ============================================
   SCROLL REVEAL CLASSES
   ============================================ */

.scroll-reveal {
  opacity: 0;
}

.scroll-reveal.revealed {
  animation: fadeInUp 0.8s ease-out forwards;
}

.scroll-reveal-left {
  opacity: 0;
}

.scroll-reveal-left.revealed {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.scroll-reveal-right {
  opacity: 0;
}

.scroll-reveal-right.revealed {
  animation: fadeInRight 0.8s ease-out forwards;
}

.scroll-reveal-scale {
  opacity: 0;
}

.scroll-reveal-scale.revealed {
  animation: fadeInScale 0.8s ease-out forwards;
}

.fade-in-down {
  animation: slideInDown 0.6s ease-out;
}

/* ============================================
   PARTICLES
   ============================================ */

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  opacity: 0.6;
  animation: particleMove 15s infinite alternate;
}

/* ============================================
   LANGUAGE DROPDOWN
   ============================================ */

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  min-width: 200px;
  z-index: 50;
}

.lang-dropdown.active {
  display: block;
  animation: slideInDown 0.3s ease-out;
}

/* ============================================
   3D TILT EFFECT
   ============================================ */

.tilt-element {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

/* ============================================
   SMOOTH SCROLL
   ============================================ */

html {
  scroll-behavior: smooth;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #4D148C;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3d1070;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.gradient-text {
  background: linear-gradient(to right, #4D148C, #9333ea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-morphism {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* ============================================
   LOADING SKELETON
   ============================================ */

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ============================================
   MOBILE MENU
   ============================================ */

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.mobile-menu.active {
  max-height: 500px;
}

/* ============================================
   CUSTOM SHAPES
   ============================================ */

.diagonal-bg {
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 35% 100%);
}

.curved-top {
  clip-path: ellipse(100% 100% at 50% 0%);
}

.wave-bottom {
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
}

/* ============================================
   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:focus {
  outline: 2px solid #4D148C;
  outline-offset: 2px;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 640px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 641px) {
  .show-mobile {
    display: none !important;
  }
}

/* ============================================
   OVERLAY & MODAL
   ============================================ */

.overlay {
  position: fixed;
  inset: 0;
  background: 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;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 50;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   BADGES & TAGS
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary {
  background: #4D148C;
  color: white;
}

.badge-success {
  background: #10b981;
  color: white;
}

.badge-warning {
  background: #f59e0b;
  color: white;
}

.badge-danger {
  background: #ef4444;
  color: white;
}

/* ============================================
   TOOLTIPS
   ============================================ */

[data-tooltip] {
  position: relative;
  cursor: pointer;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background: #1f2937;
  color: white;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
  margin-bottom: 0.5rem;
  z-index: 100;
  animation: fadeInUp 0.2s ease;
}

/* ============================================
   CUSTOM BORDERS
   ============================================ */

.border-gradient {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(to right, #4D148C, #9333ea) border-box;
}

/* ============================================
   IMAGE EFFECTS
   ============================================ */

.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.5s ease;
}

.img-zoom:hover img {
  transform: scale(1.1);
}

.img-grayscale {
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.img-grayscale:hover {
  filter: grayscale(0%);
}

/* ============================================
   CUSTOM BUTTONS
   ============================================ */

.btn-primary {
  background: linear-gradient(to right, #4D148C, #9333ea);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  box-shadow: 0 10px 30px rgba(77, 20, 140, 0.3);
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid #4D148C;
  color: #4D148C;
  background: transparent;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: #4D148C;
  color: white;
}

/* ============================================
   TIMELINE
   ============================================ */

.timeline-item {
  position: relative;
  padding-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #4D148C, #9333ea);
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4D148C;
  border: 3px solid white;
  box-shadow: 0 0 0 2px #4D148C;
}

/* ============================================
   STATS COUNTER
   ============================================ */

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(to right, #4D148C, #9333ea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   CARD EFFECTS
   ============================================ */

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ============================================
   GRADIENT BACKGROUNDS
   ============================================ */

.bg-gradient-purple {
  background: linear-gradient(135deg, #4D148C 0%, #9333ea 100%);
}

.bg-gradient-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

.bg-gradient-green {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

/* ============================================
   LOADER SPINNER
   ============================================ */

.spinner {
  border: 3px solid rgba(77, 20, 140, 0.1);
  border-top-color: #4D148C;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, #4D148C, #9333ea);
  transition: width 0.5s ease;
}

/* ============================================
   DARK MODE (Future Enhancement)
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
}
