/* ═══════════════════════════════════════════════════════════
   Avionics Works — Premium Enhancement Layer
   Transitions · Animations · Effects · Polish
   ═══════════════════════════════════════════════════════════ */

/* ── Page Load Entrance ── */
.page-content {
  animation: aw-pageIn .8s var(--ease-out) both;
}
@keyframes aw-pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Enhanced Reveals (override default .reveal) ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), filter .7s var(--ease-out);
  filter: blur(4px);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Directional reveals */
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  filter: blur(4px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), filter .7s var(--ease-out);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  filter: blur(4px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), filter .7s var(--ease-out);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(.92);
  filter: blur(4px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), filter .7s var(--ease-out);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* ── Gradient Text Headings ── */
.section-title,
.cta-title {
  background: linear-gradient(135deg, #ffffff 0%, #fcd462 50%, #f5a623 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: aw-gradientShift 6s ease-in-out infinite;
}
@keyframes aw-gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Section labels shimmer */
.section-label {
  position: relative;
  overflow: hidden;
}
.section-label::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(252,212,98,.3), transparent);
  animation: aw-shimmer 3s ease-in-out infinite;
}
@keyframes aw-shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* ── Hero Enhancements ── */
.hero {
  position: relative;
  overflow: hidden;
}

/* Animated gold line under hero */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: aw-heroLine 3s ease-in-out infinite;
}
@keyframes aw-heroLine {
  0%, 100% { opacity: .3; transform: scaleX(.5); }
  50% { opacity: 1; transform: scaleX(1); }
}

.hero-title {
  animation: aw-heroTitle 1s var(--ease-out) .2s both;
}
@keyframes aw-heroTitle {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  animation: aw-heroSub 1s var(--ease-out) both;
  animation-delay: .4s;
}
@keyframes aw-heroSub {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-actions {
  animation: aw-heroActions 1s var(--ease-out) both;
  animation-delay: .6s;
}
@keyframes aw-heroActions {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  animation: aw-heroBadge 1s var(--ease-out) both;
  animation-delay: .1s;
}
@keyframes aw-heroBadge {
  from { opacity: 0; transform: translateY(-10px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Hero scroll indicator pulse */
.hero-scroll {
  animation: aw-scrollPulse 2s ease-in-out infinite;
}
@keyframes aw-scrollPulse {
  0%, 100% { opacity: .4; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(6px); }
}

/* Hero slide transitions */
.hero-slide {
  transition: opacity 1.2s ease-in-out, transform 1.2s ease-in-out;
  transform: scale(1.05);
}
.hero-slide.active {
  transform: scale(1);
}

/* ── Button Enhancements ── */
.btn {
  position: relative;
  overflow: hidden;
  transition: all .35s var(--ease-out);
}

/* Ripple effect on click */
.btn::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .5s, height .5s, opacity .5s;
  opacity: 0;
}
.btn:active::before {
  width: 300px; height: 300px;
  opacity: 0;
  transition: 0s;
}
.btn:active {
  transform: scale(.97) !important;
}

/* Primary button glow */
.btn-primary {
  box-shadow: 0 0 0 0 rgba(252,212,98,0);
  transition: all .35s var(--ease-out), box-shadow .35s;
}
.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(252,212,98,.3), 0 0 40px rgba(252,212,98,.1);
}

/* Outline button magnetic hover */
.btn-outline:hover {
  box-shadow: 0 0 20px rgba(252,212,98,.1);
  background: rgba(252,212,98,.05);
}

/* ── Card Enhancements ── */
.card,
.service-card,
.estimator-card,
.about-credential-card {
  transition: all .4s var(--ease-out);
  position: relative;
}

/* Glow border on hover */
.card::after,
.service-card::after,
.estimator-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 40%, rgba(252,212,98,.2) 50%, transparent 60%);
  background-size: 300% 300%;
  opacity: 0;
  transition: opacity .4s;
  z-index: -1;
  pointer-events: none;
}
.card:hover::after,
.service-card:hover::after,
.estimator-card:hover::after {
  opacity: 1;
  animation: aw-borderGlow 2s ease infinite;
}
@keyframes aw-borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Service card overlay animation */
.service-card {
  overflow: hidden;
}
.service-card-overlay {
  transition: all .5s var(--ease-out);
}
.service-card:hover .service-card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.95) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
}
.service-card:hover .service-card-title {
  text-shadow: 0 0 20px rgba(252,212,98,.3);
}

/* ── Trust Bar Counter Animation ── */
.trust-number {
  transition: color .3s;
}
.trust-item:hover .trust-number {
  text-shadow: 0 0 20px rgba(252,212,98,.4);
}
.trust-item {
  transition: transform .3s var(--ease-out);
}
.trust-item:hover {
  transform: translateY(-4px);
}

/* ── Testimonial Enhancements ── */
.testimonial {
  transition: all .4s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.testimonial::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: linear-gradient(to bottom, var(--gold), transparent);
  transition: height .6s var(--ease-out);
}
.testimonial:hover::after {
  height: 100%;
}
.testimonial:hover {
  border-color: var(--gold-border);
  box-shadow: 0 8px 32px rgba(0,0,0,.4), inset 0 0 30px rgba(252,212,98,.02);
}

/* ── Navigation Enhancements ── */
.header {
  transition: all .4s var(--ease-out);
}
.header.scrolled {
  border-bottom-color: rgba(252,212,98,.08);
}

.nav-link {
  position: relative;
  transition: all .25s var(--ease-out);
}
.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--gold);
  transition: left .3s var(--ease-out), right .3s var(--ease-out);
  border-radius: 2px;
}
.nav-link:hover::before {
  left: 16px;
  right: 16px;
}

/* Mobile menu enhanced entrance */
.mobile-menu {
  transition: opacity .3s, transform .3s;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}
.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-nav-link {
  opacity: 0;
  transform: translateX(-20px);
}
.mobile-menu.open .mobile-nav-link {
  animation: aw-mobileNavIn .4s var(--ease-out) both;
}
.mobile-menu.open .mobile-nav-link:nth-child(1) { animation-delay: .05s; }
.mobile-menu.open .mobile-nav-link:nth-child(2) { animation-delay: .1s; }
.mobile-menu.open .mobile-nav-link:nth-child(3) { animation-delay: .15s; }
.mobile-menu.open .mobile-nav-link:nth-child(4) { animation-delay: .2s; }
.mobile-menu.open .mobile-nav-link:nth-child(5) { animation-delay: .25s; }
.mobile-menu.open .mobile-nav-link:nth-child(6) { animation-delay: .3s; }
.mobile-menu.open .mobile-nav-link:nth-child(7) { animation-delay: .35s; }
@keyframes aw-mobileNavIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Gallery Image Enhancements ── */
.gallery-item,
.gallery-img {
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
  overflow: hidden;
}
.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 30px rgba(252,212,98,.08);
}
.gallery-item:hover .gallery-img,
.gallery-item:hover img {
  transform: scale(1.08);
}

/* ── Featured Aircraft Cards ── */
.featured-item {
  transition: all .4s var(--ease-out);
}
.featured-item:hover {
  transform: translateY(-8px);
}
.featured-item:hover .featured-img img {
  transform: scale(1.06);
  transition: transform .6s var(--ease-out);
}
.featured-img {
  overflow: hidden;
  border-radius: var(--radius-md);
}
.featured-img img {
  transition: transform .6s var(--ease-out);
}

/* ── Form Enhancements ── */
.form-input,
.form-select,
.form-textarea {
  transition: all .3s var(--ease-out);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(252,212,98,.1), 0 0 20px rgba(252,212,98,.05);
  transform: translateY(-1px);
}

/* Floating label effect for contact form */
.form-group {
  position: relative;
}
.form-label {
  transition: color .3s;
}
.form-group:focus-within .form-label {
  color: var(--gold);
}

/* ── CTA Section ── */
.cta-section {
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(252,212,98,.04) 0%, transparent 70%);
  animation: aw-ctaPulse 8s ease-in-out infinite;
}
@keyframes aw-ctaPulse {
  0%, 100% { transform: scale(1); opacity: .5; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* ── Pricing / Estimator Cards ── */
.estimator-card {
  transition: all .4s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.estimator-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-border);
  box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 0 30px rgba(252,212,98,.08);
}
.estimator-card-icon {
  transition: all .4s var(--ease-out);
}
.estimator-card:hover .estimator-card-icon {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(252,212,98,.2);
}

/* ── Brand Grid Items ── */
.brand-item {
  transition: all .3s var(--ease-out);
  position: relative;
}
.brand-item:hover {
  transform: translateY(-4px);
  filter: brightness(1.2);
}

/* ── About Page Story Section ── */
.about-story-visual {
  transition: all .5s var(--ease-out);
}
.about-story-visual:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
}

/* ── Smooth Section Dividers ── */
.section + .section,
.section-sm + .section,
.section + .section-sm {
  position: relative;
}

/* ── Footer Enhancements ── */
.footer-links a {
  position: relative;
  transition: all .25s var(--ease-out);
}
.footer-links a::before {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .3s var(--ease-out);
}
.footer-links a:hover::before {
  width: 100%;
}

.footer-social a {
  transition: all .3s var(--ease-out);
}
.footer-social a:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(252,212,98,.15);
}

/* ── Scroll Progress Bar ── */
#aw-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-hover));
  z-index: 9999;
  transition: width .1s linear;
  box-shadow: 0 0 8px rgba(252,212,98,.4);
}

/* ── Cursor Glow (desktop only) ── */
#aw-cursor-glow {
  position: fixed;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(252,212,98,.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity .3s;
  will-change: transform;
}

/* ── Smooth Image Loading ── */
img {
  transition: opacity .4s ease;
}
img[loading="lazy"] {
  opacity: 0;
}
img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
  opacity: 1;
}

/* ── Selection Enhancement ── */
::selection {
  background: var(--gold);
  color: var(--bg-primary);
  text-shadow: none;
}

/* ── Gold Accent Dividers ── */
.divider {
  position: relative;
  overflow: hidden;
}
.divider::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: aw-shimmer 2.5s ease-in-out infinite;
}

/* ── Parallax-ready Sections ── */
[data-parallax] {
  will-change: transform;
  transition: transform .1s linear;
}

/* ── Badge Pulse ── */
.hero-badge,
.badge {
  animation: aw-badgePulse 3s ease-in-out infinite;
}
@keyframes aw-badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(252,212,98,.1); }
  50% { box-shadow: 0 0 0 6px rgba(252,212,98,0); }
}

/* ── Map Container ── */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .4s var(--ease-out);
  border: 1px solid var(--border-color);
}
.map-container:hover {
  border-color: var(--gold-border);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
  .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; filter: none; }
  #aw-cursor-glow { display: none; }
}
