/* 
=================================
XUÂN PHẠM MAKEUP - ENHANCED HERO SECTION
=================================
File: hero-section-enhanced.css
Mục đích: UI Enhancement cho HERO SECTION chuyên nghiệp
🚀 Version 2.0 - Modern & Professional với Performance Optimization
*/

/* ===================================== */
/* CSS CUSTOM PROPERTIES                 */
/* ===================================== */
:root {
  /* Enhanced Color Palette */
  --primary-gradient: linear-gradient(135deg, #e91e63 0%, #c2185b 50%, #ad1457 100%);
  --secondary-gradient: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 50%, #f48fb1 100%);
  --accent-gradient: linear-gradient(135deg, #ff6b9d 0%, #e91e63 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  
  /* Typography */
  --font-primary: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --font-secondary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  
  /* Spacing & Layout */
  --section-padding: clamp(80px, 12vh, 120px);
  --content-gap: clamp(2rem, 6vw, 4rem);
  --element-gap: clamp(1rem, 3vw, 2rem);
  
  /* Effects */
  --blur-amount: 10px;
  --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 15px 35px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 25px 50px rgba(0, 0, 0, 0.2);
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===================================== */
/* PERFORMANCE OPTIMIZATION              */
/* ===================================== */
/* GPU Acceleration for smooth animations */
.hero-content,
.hero-image {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Will-change for optimized animations */
.hero-title-accent {
  will-change: transform, opacity;
}

.hero-picture {
  will-change: transform, box-shadow;
}

.btn {
  will-change: transform, box-shadow;
}

.floating-element {
  will-change: transform;
}

/* ===================================== */
/* ENHANCED HERO SECTION                 */
/* ===================================== */
.hero-section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  padding: var(--section-padding) 0;
  overflow: hidden;
  
  /* Advanced Background */
  background: 
    linear-gradient(135deg, rgba(252, 228, 236, 0.95) 0%, rgba(248, 187, 208, 0.9) 100%),
    radial-gradient(circle at 30% 20%, rgba(233, 30, 99, 0.08) 0%, transparent 70%),
    radial-gradient(circle at 70% 80%, rgba(194, 24, 91, 0.08) 0%, transparent 70%),
    conic-gradient(from 0deg at 50% 50%, #fce4ec 0deg, #f8bbd0 120deg, #f48fb1 240deg, #fce4ec 360deg);
  background-size: 100% 100%, 800px 800px, 600px 600px, 400px 400px;
  background-attachment: fixed, scroll, scroll, scroll;
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--content-gap);
  align-items: center;
  position: relative;
  z-index: 2;
}

/* ===================================== */
/* ENHANCED HERO CONTENT                 */
/* ===================================== */
.hero-content {
  animation: slideInLeft 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.hero-content::before {
  content: '';
  position: absolute;
  top: -2rem;
  left: -2rem;
  right: -2rem;
  bottom: -2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  z-index: -1;
  opacity: 0.7;
}

.hero-text {
  position: relative;
  z-index: 1;
  padding: 2rem;
}

/* Enhanced Typography */
.hero-title {
  font-family: var(--font-primary);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-title-main {
  background: linear-gradient(135deg, #1a1a1a 0%, #333 50%, #1a1a1a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: var(--text-shadow);
  animation: titleReveal 1.5s ease-out 0.3s both;
  transform: translateY(30px);
}

.hero-title-accent {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  animation: titleReveal 1.5s ease-out 0.6s both;
  transform: translateY(30px);
}

.hero-title-accent::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transform: scaleX(0);
  animation: underlineGrow 1s ease-out 1.2s both;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: #444;
  margin-bottom: 1rem;
  font-weight: 600;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.9s both;
}

.hero-description {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  color: #666;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 90%;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1.2s both;
}

/* ===================================== */
/* ENHANCED CTA BUTTONS                  */
/* ===================================== */
.hero-cta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1.5s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 16px 32px;
  border: none;
  border-radius: 15px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  transition: var(--transition-smooth);
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-medium);
  border: 2px solid transparent;
}

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

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

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(233, 30, 99, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: #e91e63;
  border: 2px solid #e91e63;
  box-shadow: var(--shadow-light);
  backdrop-filter: blur(var(--blur-amount));
}

.btn-secondary:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-medium);
  border-color: transparent;
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.25rem;
  font-weight: 700;
  min-width: 220px;
  justify-content: center;
}

/* ===================================== */
/* ENHANCED STATS SECTION                */
/* ===================================== */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1.8s both;
}

.stat-item {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.stat-item:hover::before {
  transform: scaleX(1);
}

.stat-item:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-medium);
  border-color: rgba(233, 30, 99, 0.3);
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: #555;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

/* ===================================== */
/* ENHANCED HERO IMAGE                   */
/* ===================================== */
.hero-image {
  position: relative;
  animation: slideInRight 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-image-container {
  position: relative;
  max-width: 550px;
  margin: 0 auto;
  transform-style: preserve-3d;
}

.hero-picture {
  position: relative;
  display: block;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: var(--shadow-heavy);
  transition: var(--transition-smooth);
}

.hero-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: brightness(1.1) contrast(1.1) saturate(1.2);
  transition: var(--transition-smooth);
}

.hero-picture:hover {
  transform: scale(1.02) rotateY(3deg) rotateX(2deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.hero-picture:hover .hero-img {
  filter: brightness(1.2) contrast(1.2) saturate(1.3);
}

/* Enhanced Decorative Elements */
.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.floating-element {
  position: absolute;
  width: 80px;
  height: 80px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e91e63;
  font-size: 1.5rem;
  animation: floatModern 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
  top: 10%;
  right: -10%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  bottom: 20%;
  left: -15%;
  animation-delay: 2s;
  width: 60px;
  height: 60px;
  font-size: 1.25rem;
}

.floating-element:nth-child(3) {
  top: 60%;
  right: -5%;
  animation-delay: 4s;
  width: 70px;
  height: 70px;
  font-size: 1.35rem;
}

/* Enhanced Badge */
.hero-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary-gradient);
  color: white;
  padding: 15px 25px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: var(--shadow-medium);
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: pulse 3s infinite;
  backdrop-filter: blur(var(--blur-amount));
}

.hero-badge i {
  margin-right: 8px;
  color: #ffd700;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ===================================== */
/* ENHANCED SPECIAL OFFER               */
/* ===================================== */
.hero-special-offer {
  margin-top: 2rem;
  opacity: 0;
  animation: slideInUp 1s ease-out 2s both;
}

.special-offer-link {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 20px 25px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-light);
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.special-offer-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(233, 30, 99, 0.1), transparent);
  transition: left 0.8s ease;
}

.special-offer-link:hover::before {
  left: 100%;
}

.special-offer-link:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-heavy);
  border-color: rgba(233, 30, 99, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

.offer-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: var(--shadow-light);
  position: relative;
}

.offer-icon::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  padding: 3px;
  background: var(--accent-gradient);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.special-offer-link:hover .offer-icon::after {
  opacity: 1;
}

.offer-text {
  flex: 1;
}

.offer-title {
  display: block;
  font-weight: 800;
  color: #333;
  font-size: 1.25rem;
  margin-bottom: 4px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.offer-subtitle {
  display: block;
  color: #666;
  font-size: 0.95rem;
  font-weight: 500;
}

.offer-arrow {
  color: #e91e63;
  font-size: 1.5rem;
  transition: var(--transition-smooth);
}

.special-offer-link:hover .offer-arrow {
  transform: translateX(8px) scale(1.1);
  color: #c2185b;
}

/* ===================================== */
/* ENHANCED ANIMATIONS                   */
/* ===================================== */
@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes underlineGrow {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatModern {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  33% {
    transform: translateY(-20px) rotate(120deg) scale(1.05);
  }
  66% {
    transform: translateY(-10px) rotate(240deg) scale(0.95);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: var(--shadow-medium);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(233, 30, 99, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-medium);
  }
}

/* ===================================== */
/* ENHANCED RESPONSIVE DESIGN           */
/* ===================================== */

/* Tablet */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: left; /* Thay đổi từ center thành left */
  }
  
  .hero-content {
    order: 2;
  }
  
  .hero-image {
    order: 1;
    max-width: 450px;
    margin: 0 auto;
  }
  
  .hero-description {
    max-width: 100%;
  }
  
  .hero-stats {
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    text-align: center; /* Giữ hero-stats căn giữa */
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hero-section {
    padding: 100px 0 60px;
    min-height: auto;
  }
  
  .hero-container {
    gap: 2rem;
    text-align: left; /* Đảm bảo hero-title căn trái trên mobile */
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 300px;
    text-align: center; /* Giữ hero-stats căn giữa trên mobile */
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 1rem;
  }
  
  .btn-large {
    min-width: 100%;
    padding: 16px 24px;
    font-size: 1.125rem;
  }
  
  .hero-image-container {
    max-width: 350px;
  }
  
  .hero-badge {
    top: 15px;
    right: 15px;
    padding: 12px 20px;
    font-size: 0.85rem;
  }
  
  .special-offer-link {
    padding: 16px 20px;
    gap: 1rem;
  }
  
  .offer-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .offer-title {
    font-size: 1.125rem;
  }
  
  .floating-element {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-section {
    padding: 80px 0 40px;
  }
  
  .hero-container {
    padding: 0 1rem;
  }
  
  .hero-text {
    padding: 1.5rem;
  }
  
  .hero-image-container {
    max-width: 280px;
  }
  
  .floating-element {
    display: none; /* Hide on very small screens */
  }
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
  .hero-title-main,
  .hero-title-accent {
    -webkit-text-fill-color: currentColor;
    color: #000;
  }
  
  .btn-primary {
    border: 2px solid #000;
  }
  
  .stat-item {
    border: 2px solid #000;
  }
}

/* ===================================== */
/* PERFORMANCE OPTIMIZATIONS            */
/* ===================================== */
/* Lazy loading for background patterns */
.bg-pattern {
  background-image: none;
  will-change: background-image;
}

.bg-pattern.loaded {
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(233, 30, 99, 0.05) 2px, transparent 2px),
    radial-gradient(circle at 80% 80%, rgba(233, 30, 99, 0.05) 1px, transparent 1px);
}

/* Font optimization */
@font-face {
  font-family: 'Playfair Display';
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  font-display: swap;
}

/* Container queries for better responsive design */
@container (max-width: 768px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
}
