/* ===== Animation Keyframes ===== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

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

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

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

/* ===== AOS-style Scroll Animations ===== */
[data-aos] {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

[data-aos="fade-up"] { transform: translateY(50px); }
[data-aos="fade-down"] { transform: translateY(-50px); }
[data-aos="fade-left"] { transform: translateX(50px); }
[data-aos="fade-right"] { transform: translateX(-50px); }
[data-aos="zoom-in"] { transform: scale(0.85); }
[data-aos="zoom-out"] { transform: scale(1.15); }
[data-aos="flip-up"] { transform: perspective(1000px) rotateX(90deg); transform-origin: bottom; }

[data-aos].aos-animate {
  opacity: 1;
  transform: translate(0) scale(1) rotate(0);
}

/* ===== Hero Floating Particles ===== */
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) translateX(50px); opacity: 0; }
}

/* ===== Card Flip Effect ===== */
.flip-card {
  perspective: 1200px;
  height: 380px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.flip-card-front {
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
  padding: 1.5rem;
}

.flip-card-front::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.85));
  z-index: 1;
}

.flip-card-front > * { position: relative; z-index: 2; }

.flip-card-front h3 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.flip-card-front .meta {
  font-size: 0.85rem;
  opacity: 0.85;
}

.flip-card-back {
  background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
  color: white;
  transform: rotateY(180deg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.flip-card-back h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.flip-card-back p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.95;
  margin-bottom: 1rem;
}

.flip-card-back .stars {
  color: var(--color-gold-light);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* ===== Counter Animation ===== */
.counter {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--color-red), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Image Hover Reveal ===== */
.reveal-img {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  cursor: pointer;
  isolation: isolate;
}

.reveal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-img:hover img {
  transform: scale(1.06);
}

.reveal-img .reveal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(26, 26, 46, 0.92) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.6rem 1.6rem 1.5rem;
  color: white;
  transition: background 0.5s ease;
}

.reveal-img:hover .reveal-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(139, 26, 45, 0.92) 100%);
}

.reveal-img .reveal-overlay > div {
  width: 100%;
  position: relative;
  padding-left: 0.8rem;
}

.reveal-img .reveal-overlay > div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 3px;
  background: linear-gradient(180deg, var(--color-gold), var(--color-gold-light));
  border-radius: 2px;
  transform-origin: top;
  transform: scaleY(0.4);
  transition: transform 0.4s ease;
}

.reveal-img:hover .reveal-overlay > div::before {
  transform: scaleY(1);
}

.reveal-img .reveal-overlay h3 {
  margin-bottom: 0.35rem;
  font-size: 1.25rem;
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.reveal-img .reveal-overlay p {
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0.86;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.4s ease, margin 0.4s ease;
  margin-top: 0;
}

.reveal-img:hover .reveal-overlay p {
  max-height: 60px;
  opacity: 1;
  margin-top: 0.2rem;
}

.reveal-img::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border: 1px solid rgba(212, 168, 83, 0);
  border-radius: calc(var(--radius-lg) - 4px);
  pointer-events: none;
  z-index: 2;
  transition: border-color 0.4s ease;
}

.reveal-img:hover::after {
  border-color: rgba(240, 214, 138, 0.55);
}

/* ===== Underline draw on hover ===== */
.link-draw {
  position: relative;
  display: inline-block;
}

.link-draw::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.link-draw:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ===== Pulse Dot ===== */
.pulse-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-red);
  position: relative;
}

.pulse-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-red);
  animation: pulseDot 1.6s ease-out infinite;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ===== Float effect on hover ===== */
.hover-float {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-float:hover {
  transform: translateY(-5px);
}

/* ===== Marquee ===== */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  max-width: 100%;
}

.marquee-track {
  display: inline-flex;
  gap: 3rem;
  animation: marquee 30s linear infinite;
  width: max-content;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Loading Skeleton ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f5 25%, #e0e0e8 50%, #f0f0f5 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
}

/* ===== Cloud paper-cut Decoration ===== */
.deco-clouds {
  position: absolute;
  width: 100%;
  height: 80px;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'><path fill='%23ffffff' d='M0,80 L0,40 Q120,0 240,30 T480,30 T720,30 T960,30 T1200,30 T1440,30 L1440,80 Z'/></svg>") no-repeat center bottom;
  background-size: 100% 100%;
  z-index: 1;
}
