/* utilities.css — Glass nav, animasyonlar, line-clamp, scrollbar, focus, print */

/* ============================================
   GLASS NAV (sticky + scroll effect)
   ============================================ */
.glass-nav {
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    background: rgba(255,255,255,0.85) !important;
    border-bottom-color: rgba(255,255,255,0.3) !important;
}

/* ============================================
   FADE-IN-UP ANİMASYONU (IntersectionObserver ile)
   ============================================ */
.fade-in-up {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.animated {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in-up.animated.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up:nth-child(1) { transition-delay: 0s; }
.fade-in-up:nth-child(2) { transition-delay: 0.1s; }
.fade-in-up:nth-child(3) { transition-delay: 0.2s; }
.fade-in-up:nth-child(4) { transition-delay: 0.3s; }
.fade-in-up:nth-child(5) { transition-delay: 0.4s; }
.fade-in-up:nth-child(6) { transition-delay: 0.5s; }

/* Fade-in (yatay hareket yok) */
.fade-in {
    opacity: 0;
    transition: opacity 0.6s ease;
}
.fade-in.visible { opacity: 1; }

/* Slide-in-left */
.slide-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.slide-in-left.visible { opacity: 1; transform: translateX(0); }

/* Slide-in-right */
.slide-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.slide-in-right.visible { opacity: 1; transform: translateX(0); }

/* Scale-in */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.scale-in.visible { opacity: 1; transform: scale(1); }

/* ============================================
   PROGRESS BAR (okuma ilerlemesi)
   ============================================ */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--color-accent);
    z-index: calc(var(--z-sticky) + 1);
    width: 0%;
    transition: width 0.1s linear;
}

/* ============================================
   SCROLL TO TOP BUTONU
   ============================================ */
#scroll-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 46px;
    height: 46px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity var(--transition), transform var(--transition), background var(--transition);
    z-index: var(--z-dropdown);
}

#scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#scroll-top:hover {
    background: var(--color-accent);
}

/* ============================================
   LINE CLAMP
   ============================================ */
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.line-clamp-3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* ============================================
   ÖZEL SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-secondary); }
::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--color-primary) 40%, white);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ============================================
   FOCUS STATES (erişilebilirlik)
   ============================================ */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   SVG BOYUT YARDIMCILARI
   ============================================ */
svg { display: inline-block !important; vertical-align: middle; flex-shrink: 0; max-width: none !important; }

.w-3  { width: 0.75rem;  height: 0.75rem; }
.w-4  { width: 1rem;     height: 1rem; }
.w-5  { width: 1.25rem;  height: 1.25rem; }
.w-6  { width: 1.5rem;   height: 1.5rem; }
.w-7  { width: 1.75rem;  height: 1.75rem; }
.h-3  { height: 0.75rem; }
.h-4  { height: 1rem; }
.h-5  { height: 1.25rem; }
.h-6  { height: 1.5rem; }
.h-7  { height: 1.75rem; }

/* ============================================
   YARDIMCI SINIFLARI
   ============================================ */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-left    { text-align: left; }

.text-accent  { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }
.text-muted   { color: var(--color-text); opacity: 0.6; }
.text-white   { color: #fff; }

.bg-primary   { background: var(--color-primary); color: #fff; }
.bg-secondary { background: var(--color-secondary); }
.bg-accent    { background: var(--color-accent); color: #fff; }

.font-bold    { font-weight: 700; }
.font-medium  { font-weight: 500; }

.mt-auto  { margin-top: auto; }
.mx-auto  { margin-inline: auto; }

.d-flex   { display: flex; }
.d-grid   { display: grid; }
.d-block  { display: block; }
.d-none   { display: none; }

.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.gap-sm       { gap: var(--space-sm); }
.gap-md       { gap: var(--space-md); }
.gap-lg       { gap: var(--space-lg); }
.gap-xl       { gap: var(--space-xl); }

.w-full  { width: 100%; }
.h-full  { height: 100%; }

.rounded    { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.object-cover { object-fit: cover; }
.aspect-video { aspect-ratio: 16/9; }
.aspect-square { aspect-ratio: 1/1; }

.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0  { inset: 0; }

/* ============================================
   PRINT
   ============================================ */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    #scroll-top,
    .whatsapp-widget,
    .cookie-banner,
    .popup-overlay {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    .page-with-sidebar {
        grid-template-columns: 1fr;
    }
}
