/* ============================================
   D-Smart Animation System
   Central animation stylesheet
   ============================================ */

/* --- Reduced Motion Support --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-anim] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================
   1. Scroll-Reveal Base States
   ============================================ */
[data-anim] {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

[data-anim].anim-visible {
  opacity: 1;
  transform: none !important;
}

/* --- Direction Variants --- */
[data-anim="fade-up"] {
  transform: translateY(36px);
}
[data-anim="fade-down"] {
  transform: translateY(-36px);
}
[data-anim="fade-left"] {
  transform: translateX(-40px);
}
[data-anim="fade-right"] {
  transform: translateX(40px);
}
[data-anim="zoom-in"] {
  transform: scale(0.88);
}
[data-anim="scale-up"] {
  transform: scale(0.5);
  transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Stagger Container --- */
[data-anim="stagger"] {
  opacity: 1;
  transform: none;
}
[data-anim="stagger"] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-anim="stagger"].anim-visible > * {
  opacity: 1;
  transform: none;
}

/* ============================================
   2. Keyframes
   ============================================ */

/* Subtle float for Lottie-like icons */
@keyframes dsmart-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Pulse ring for wifi / signal icons */
@keyframes dsmart-pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  70% { transform: scale(1.15); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

/* Slow rotate for globe / autorenew */
@keyframes dsmart-spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* CountUp shimmer on price */
@keyframes dsmart-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Badge slide-down bounce */
@keyframes dsmart-badge-in {
  0% { transform: translateY(-14px) scale(0.85); opacity: 0; }
  60% { transform: translateY(3px) scale(1.03); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Modal entrance */
@keyframes dsmart-modal-in {
  from { transform: scale(0.92) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes dsmart-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Slide progress bar */
@keyframes dsmart-progress {
  from { width: 0%; }
  to { width: 100%; }
}

/* ============================================
   3. Micro-Interaction Utility Classes
   ============================================ */

/* --- Buttons --- */
.anim-btn {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.22s ease;
}
.anim-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(236, 100, 0, 0.22);
}
.anim-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(236, 100, 0, 0.15);
}

/* --- Cards --- */
.anim-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease;
}
.anim-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}
.anim-card:hover .anim-card-img {
  transform: scale(1.05);
}
.anim-card-img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Badge on cards --- */
.anim-badge {
  animation: dsmart-badge-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-play-state: paused;
}
.anim-visible .anim-badge,
.anim-card:hover .anim-badge {
  animation-play-state: running;
}

/* --- FAQ Accordion --- */
.anim-faq-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.35s ease,
              padding 0.35s ease;
  padding-top: 0;
  padding-bottom: 0;
}
.anim-faq-content.anim-faq-open {
  max-height: 600px;
  opacity: 1;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.anim-faq-icon {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.anim-faq-icon.anim-faq-rotated {
  transform: rotate(180deg);
}

/* --- Modal --- */
.anim-modal-overlay {
  opacity: 0;
  backdrop-filter: blur(0px);
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
}
.anim-modal-overlay.anim-modal-active {
  opacity: 1;
  backdrop-filter: blur(4px);
}
.anim-modal-content {
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.3s ease;
}
.anim-modal-content.anim-modal-active {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* --- Form Inputs --- */
.anim-input {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.anim-input:focus {
  border-color: #EC6400 !important;
  box-shadow: 0 0 0 3px rgba(236, 100, 0, 0.12);
}

/* ═══════════════════════════════════════════════════════════ */
/* Quick Nav – Animated SVG Icons                             */
/* ═══════════════════════════════════════════════════════════ */

/* Base icon sizing */
.qnav-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

/* ── 1. Continuous spin (autorenew) ── */
.qnav-spin {
    animation: qnav-rotate 2.5s linear infinite;
}
@keyframes qnav-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── 2. Gentle pulse (computer, help) ── */
.qnav-pulse {
    animation: qnav-pulse 2s ease-in-out infinite;
}
@keyframes qnav-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}

/* ── 3. Soft bounce (calendar) ── */
.qnav-bounce {
    animation: qnav-bounce 2s ease-in-out infinite;
}
@keyframes qnav-bounce {
    0%, 100% { transform: translateY(0); }
    30%      { transform: translateY(-4px); }
    60%      { transform: translateY(1px); }
}

/* ── 4. Screen glow (TV) ── */
.qnav-glow {
    animation: qnav-glow 2.5s ease-in-out infinite;
}
@keyframes qnav-glow {
    0%, 100% { filter: drop-shadow(0 0 0px rgba(236,100,0,0)); }
    50%      { filter: drop-shadow(0 0 6px rgba(236,100,0,0.5)); }
}
.qnav-screen {
    animation: qnav-screen-flicker 3s ease-in-out infinite;
}
@keyframes qnav-screen-flicker {
    0%, 100% { opacity: 0.2; }
    50%      { opacity: 0.55; }
}

/* ── 5. Wifi wave cascade ── */
.qnav-wave2 {
    animation: qnav-wave 2s ease-in-out infinite;
}
.qnav-wave3 {
    animation: qnav-wave 2s ease-in-out infinite 0.35s;
}
@keyframes qnav-wave {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.25; }
}

/* ── 6. Slow spin (globe) ── */
.qnav-spin-slow {
    animation: qnav-rotate 6s linear infinite;
}

/* ── 7. Shake/ring (megaphone) ── */
.qnav-shake {
    animation: qnav-shake 3s ease-in-out infinite;
}
@keyframes qnav-shake {
    0%, 100%  { transform: rotate(0deg); }
    10%       { transform: rotate(-6deg); }
    20%       { transform: rotate(6deg); }
    30%       { transform: rotate(-4deg); }
    40%       { transform: rotate(4deg); }
    50%       { transform: rotate(0deg); }
}
.qnav-sound {
    animation: qnav-sound-pulse 1.5s ease-in-out infinite;
}
@keyframes qnav-sound-pulse {
    0%, 100% { opacity: 1; transform: translateX(0); }
    50%      { opacity: 0.3; transform: translateX(1px); }
}

/* ── 8. Float (receipt) ── */
.qnav-float {
    animation: qnav-float 3s ease-in-out infinite;
}
@keyframes qnav-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

/* ── 9. Blink dot (computer screen) ── */
.qnav-blink {
    animation: qnav-blink 2s ease-in-out infinite;
}
@keyframes qnav-blink {
    0%, 100% { opacity: 1; r: 2; }
    50%      { opacity: 0.3; r: 3; }
}

/* ── Hover effects for all nav items ── */
[data-icon-hover] {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                background-color 0.3s ease;
}
[data-icon-hover]:hover {
    transform: translateY(-2px);
}
[data-icon-hover]:hover .qnav-icon {
    filter: drop-shadow(0 2px 6px rgba(236, 100, 0, 0.35));
}
[data-icon-hover] span {
    transition: color 0.3s ease;
}
[data-icon-hover]:hover span {
    color: #EC6400;
}



/* --- Parallax Hint (hero) --- */
.anim-parallax {
  transition: transform 0.1s linear;
  will-change: transform;
}

/* --- CountUp Price --- */
.anim-price-shimmer {
  background: linear-gradient(90deg, #EC6400 30%, #FFB366 50%, #EC6400 70%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: dsmart-shimmer 2s ease-in-out 1;
}

/* --- Hero Slider Progress --- */
.anim-slider-progress {
  height: 3px;
  background: #EC6400;
  animation: dsmart-progress var(--slide-duration, 5s) linear;
  transform-origin: left;
}

/* Shimmer for Hemen Başvur buttons — sweep then ~1s pause */
@keyframes btn-shine {
    0%   { transform: translateX(-150%) skewX(-20deg); }
    55%  { transform: translateX(250%) skewX(-20deg); }
    100% { transform: translateX(250%) skewX(-20deg); }
}

.anim-btn-shimmer {
    position: relative;
    overflow: hidden;
}

.anim-btn-shimmer::after {
    content: "";
    position: absolute;
    top: -10%;
    left: 0;
    width: 60%;
    height: 120%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
    animation: btn-shine 2.2s ease-in-out infinite;
    pointer-events: none;
}

/* Outline Button Hover Animation */
.btn-outline-hover {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.btn-outline-hover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: currentColor;
    opacity: 0.1;
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-outline-hover:hover::before {
    width: 100%;
}


.btn-outline-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* --- Campaign Typewriter Effect --- */
.campaign-typewriter {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.05em;
    width: 0;
    animation: dsmart-typing 3.5s steps(70, end) 0.5s forwards;
    max-width: fit-content;
    vertical-align: bottom;
}

@keyframes dsmart-typing {
    from { width: 0; }
    to   { width: 100%; }
}

/* Mobile responsive - simple fade-in */
@media (max-width: 768px) {
    .campaign-typewriter {
        white-space: normal;
        width: auto;
        display: block;
        opacity: 0;
        animation: dsmart-fade-in 1s ease-out 0.3s forwards;
    }
}

@keyframes dsmart-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}


