/**
 * Byzantin Travel — Animation CSS Utilities
 * anime.js ile senkron çalışan yardımcı stiller
 */

/* ─── GENEL GEÇİŞ AYARLARI ─────────────────────── */
*, *::before, *::after {
    scroll-behavior: smooth;
}

/* GPU hızlandırma için will-change ipuçları */
.hero-image,
.tour-card,
.tour-card-image,
.floating-badge,
.blur-circle,
.page-transition-overlay {
    will-change: transform, opacity;
}

/* ─── SAYFA GEÇİŞ OVERLAY ──────────────────────── */
.page-transition-overlay {
    transform-origin: 50% 100%;
}

/* ─── NAV GEÇİŞLERİ ────────────────────────────── */
.main-nav {
    background: transparent;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    backdrop-filter: blur(0);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.main-nav:not(.is-scrolled) {
    background: rgba(51, 65, 85, 0.24);
    border-bottom-color: rgba(148, 163, 184, 0.28);
    backdrop-filter: blur(8px);
}

.main-nav.is-scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(226, 232, 240, 0.75);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(12px);
}

.main-nav #header-topbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.main-nav.is-scrolled #header-topbar {
    background-color: #101922;
    border-bottom-color: rgba(148, 163, 184, 0.22);
}

.main-nav:not(.is-scrolled) #header-topbar {
    background-color: rgba(15, 23, 42, 0.36);
}

.main-nav:not(.is-scrolled) #header-topbar,
.main-nav:not(.is-scrolled) #header-topbar a {
    color: #cbd5e1;
}

.main-nav:not(.is-scrolled) #header-topbar a:hover {
    color: #f8fafc;
}

.main-nav:not(.is-scrolled) .brand-title {
    color: #f8fafc;
}

.main-nav:not(.is-scrolled) .brand-subtitle {
    color: #cbd5e1;
}

.main-nav:not(.is-scrolled) .nav-link {
    color: #e2e8f0;
}

.main-nav:not(.is-scrolled) .nav-link:hover {
    color: #ffffff;
}

.main-nav:not(.is-scrolled) .nav-link.text-primary {
    color: #fcd34d;
}

.main-nav.is-scrolled #header-topbar,
.main-nav.is-scrolled #header-topbar a {
    color: #94a3b8;
}

.main-nav.is-scrolled #header-topbar a:hover {
    color: #ffffff;
}

.main-nav.is-scrolled .brand-title {
    color: #1173d4;
}

.main-nav.is-scrolled .brand-subtitle {
    color: #94a3b8;
}

.main-nav:not(.is-scrolled) #search-toggle,
.main-nav:not(.is-scrolled) .mobile-menu-btn {
    color: #f8fafc;
    border-color: rgba(248, 250, 252, 0.42);
    background-color: rgba(15, 23, 42, 0.25);
}

.main-nav:not(.is-scrolled) #search-input {
    background-color: rgba(15, 23, 42, 0.35);
    color: #f8fafc;
    border-color: rgba(248, 250, 252, 0.2);
}

.main-nav:not(.is-scrolled) #search-input::placeholder {
    color: rgba(241, 245, 249, 0.78);
}

.nav-link {
    position: relative;
}

/* ─── KART HOVERLERİ ────────────────────────────── */
.tour-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ─── AKORDEON ──────────────────────────────────── */
.accordion-content {
    overflow: hidden;
    transition: none; /* anime.js yönetiyor */
}

.accordion-item.is-open .accordion-header {
    background-color: rgba(17, 115, 212, 0.05);
}

.accordion-item.is-open .timeline-dot {
    background-color: #1173d4;
    border-color: #1173d4;
}

.accordion-item.is-open .timeline-dot > div {
    background-color: white;
}

/* ─── LINE CLAMP (Tailwind plugin yoksa) ─────── */
.img-error {
    display: none;
}

/* ─── PLACEHOLDER GÖRSEL SİSTEMİ ────────────────────── */
.img-placeholder {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 50%, #e2e8f0 100%);
    background-size: 200% 200%;
    animation: shimmer 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.img-placeholder::after {
    content: '';
    width: 48px;
    height: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2394a3b8' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.4;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── PROSE (basit içerik stili) ────────────────── */
.prose p {
    margin-bottom: 1rem;
}

.prose h2, .prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

/* ─── BUTON RIPPLE ──────────────────────────────── */
.btn-primary,
.btn-accent {
    position: relative;
    overflow: hidden;
}

/* CTA hover sweep: soldan saga arka plan dolumu */
.cta-btn-sweep {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.45s ease-out;
}

.cta-btn-sweep::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #101922;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.45s ease-out;
    border-radius: inherit;
    z-index: -1;
}

.cta-btn-sweep:hover::before,
.cta-btn-sweep:focus-visible::before {
    transform: scaleX(1);
}

.cta-btn-sweep:hover,
.cta-btn-sweep:focus-visible {
    color: #ffffff;
}

/* ─── REDUCED MOTION ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-image,
    .floating-badge,
    .blur-circle {
        will-change: auto;
    }

    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }
}

/* ─── SCROLL İNDİCATOR ──────────────────────────── */
.scroll-indicator {
    animation: none; /* anime.js yönetiyor */
}

/* ─── STICKY SIDEBAR ────────────────────────────── */
@media (min-width: 1024px) {
    .sticky {
        position: sticky;
    }
}

/* ─── SMOOTH IMG LOADING ────────────────────────── */
img {
    transition: opacity 0.4s ease;
}

img[data-src] {
    opacity: 0;
}

img.loaded,
img:not([data-src]) {
    opacity: 1;
}

/* ─── PRINT STYLES ────────────────────────────────── */
@media print {
    /* Gereksiz elemanları gizle */
    .main-nav, .mobile-menu-overlay, .scroll-to-top,
    .cta-banner, footer, .page-transition-overlay,
    .pdf-download-btn, .sidebar-cta,
    button[onclick*="print"], button[onclick*="download"] {
        display: none !important;
    }

    /* Sayfa düzeni */
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    main {
        padding: 0;
    }

    /* Akordeonları aç */
    .accordion-content {
        height: auto !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    /* Linkleri göster */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }

    a[href^="#"]::after,
    a[href^="javascript"]::after,
    a[href^="tel"]::after {
        content: "";
    }

    /* Sayfa kesmeleri */
    .accordion-item {
        page-break-inside: avoid;
    }
}
