/* =========================================
   1. VARIABLES & BASE SETUP
   ========================================= */
   :root {
    --color-burgundy: #000000;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

html, body {
    overflow-x: hidden;
}

/* =========================================
   2. SCROLL PROGRESS BAR
   ========================================= */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background-color: var(--color-burgundy);
    z-index: 99999; 
    width: 0%;
    transition: width 0.1s ease-out; 
}

/* =========================================
   3. PRELOADER
   ========================================= */
#preloader {
    position: fixed;
    inset: 0;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.pre-logo {
    height: 80px;
    width: auto;
    max-width: 80vw; 
    object-fit: contain;
    animation: elegantPulse 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .pre-logo { height: 70px; }
}

.loading-line {
    width: 0px;
    height: 2px;
    background-color: var(--color-burgundy);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.loading-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--color-burgundy);
    animation: lineFlow 1.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes elegantPulse {
    0%, 100% { transform: scale(0.96); opacity: 0.85; }
    50% { transform: scale(1.02); opacity: 1; }
}

@keyframes lineFlow {
    0% { transform: translateX(-100%); width: 100%; }
    50% { transform: translateX(0); width: 100%; }
    100% { transform: translateX(100%); width: 100%; }
}

/* =========================================
   4. HEADER & STICKY SCROLL ANIMATION
   ========================================= */
.header-wrapper {
    width: 100%;
    height: 12vh;
    background-color: #ffffff;
    position: relative;
    z-index: 100;
}

.main-header {
    width: 100%;
    height: 100%; 
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative; 
    z-index: 100;
}

.main-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    height: 12vh; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    animation: slideDownSmooth 1.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownSmooth {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(0); }
}

/* =========================================
   5. BACK TO TOP BUTTON
   ========================================= */
#back-to-top {
    transition: all 0.4s ease-in-out !important;
}
#back-to-top.visible {
    display: flex !important; /* Gizliyken flex'e zorla */
}

/* =========================================
   6. BORDER ANİMASYONLARI (KARTLAR, LİNKLER)
   ========================================= */

/* Dropdown İç Linkleri */
.animated-dropdown-link {
    position: relative;
    display: block;
    padding: 16px 24px; 
    font-size: 14px;
    color: #4b5563; 
    font-weight: 600;
    background-color: transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.animated-dropdown-link:hover {
    color: #000000;
    padding-left: 32px; 
    background-color: #f9fafb; 
}

.animated-dropdown-link::before {
    content: '';
    position: absolute;
    inset: 0; 
    pointer-events: none; 
    opacity: 0;
    z-index: 10;
    background-image: 
        linear-gradient(90deg, #1b1b1b 50%, transparent 50%),
        linear-gradient(90deg, #1b1b1b 50%, transparent 50%),
        linear-gradient(0deg, #1b1b1b 50%, transparent 50%),
        linear-gradient(0deg, #1b1b1b 50%, transparent 50%);
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    background-size: 20px 1.5px, 20px 1.5px, 1.5px 20px, 1.5px 20px;
    /* DİKKAT: 0 değerleri Chrome için px ile belirtildi */
    background-position: 0px 0px, 0px 100%, 0px 0px, 100% 0px;
    transition: opacity 0.3s ease;
}

.animated-dropdown-link:hover::before {
    opacity: 1;
    animation: borderLoop 0.8s linear infinite;
}

/* Hero Butonları */
.hero-btn-animated {
    position: relative;
    z-index: 1;
}

.hero-btn-animated span {
    position: relative;
    z-index: 20;
}

.hero-btn-animated::after {
    content: '';
    position: absolute;
    inset: 3px; 
    pointer-events: none;
    opacity: 0;
    z-index: 10;
    background-image: 
        linear-gradient(90deg, currentColor 50%, transparent 50%),
        linear-gradient(90deg, currentColor 50%, transparent 50%),
        linear-gradient(0deg, currentColor 50%, transparent 50%),
        linear-gradient(0deg, currentColor 50%, transparent 50%);
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    background-size: 15px 2px, 15px 2px, 2px 15px, 2px 15px;
    /* DİKKAT: 0 değerleri Chrome için px ile belirtildi */
    background-position: 0px 0px, 0px 100%, 0px 0px, 100% 0px;
    transition: opacity 0.3s ease;
}

.hero-btn-animated:hover::after {
    opacity: 1;
    animation: heroBtnLoop 0.6s linear infinite; 
}

/* Haber ve Koleksiyon Kartları */
.news-card-animated {
    position: relative;
}

.news-card-animated::after {
    content: '';
    position: absolute;
    inset: -2px; 
    z-index: 30;
    pointer-events: none;
    opacity: 0;
    background-image: 
        linear-gradient(90deg, #000000 50%, transparent 50%),
        linear-gradient(90deg, #000000 50%, transparent 50%),
        linear-gradient(0deg, #000000 50%, transparent 50%),
        linear-gradient(0deg, #000000 50%, transparent 50%);
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    background-size: 20px 2px, 20px 2px, 2px 20px, 2px 20px;
    /* DİKKAT: 0 değerleri Chrome için px ile belirtildi */
    background-position: 0px 0px, 0px 100%, 0px 0px, 100% 0px;
    transition: opacity 0.3s ease;
}

.news-card-animated:hover::after {
    opacity: 1;
    animation: borderLoop 0.8s linear infinite;
}

/* Ortak Animasyon Keyframeleri */
@keyframes borderLoop {
    100% {
        background-position: 20px 0px, -20px 100%, 0px -20px, 100% 20px;    
    }
}

@keyframes heroBtnLoop {
    100% { 
        background-position: 15px 0px, -15px 100%, 0px -15px, 100% 15px; 
    }
}

/* =========================================
   7. MARQUEE (KAYAN YAZI/LOGO) ANIMATIONS
   ========================================= */
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.animate-scroll-left { animation: scroll-left 25s linear infinite; }
.animate-scroll-right { animation: scroll-right 25s linear infinite; }

.marquee-group:hover .animate-scroll-left,
.marquee-group:hover .animate-scroll-right {
    animation-play-state: paused;
}