/* ============================================
   GoldTakas - Light Page Transition
   ============================================ */

.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.85);
    opacity: 0;
    transition: opacity 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-transition-overlay .ol-gold {
    font-family: 'Titillium Web', sans-serif;
    font-size: 42px;
    font-weight: 700;
    font-style: italic;
    color: rgba(38, 77, 160, 0.25);
}

.page-transition-overlay .ol-takas {
    font-family: 'Titillium Web', sans-serif;
    font-size: 42px;
    font-weight: 700;
    font-style: italic;
    color: rgba(218, 170, 0, 0.3);
}

.page-transition-overlay .ol-center { text-align: center; }

.page-transition-overlay .ol-wait {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 1.5px;
    margin-top: 8px;
    color: rgba(100, 100, 100, 0.4);
}

body.dark-mode .page-transition-overlay .ol-wait {
    color: rgba(255, 255, 255, 0.25);
}

.page-transition-overlay.active {
    pointer-events: all;
    opacity: 1;
}

/* Dark mode overlay */
body.dark-mode .page-transition-overlay {
    background: rgba(12, 21, 32, 0.85);
}

body.dark-mode .page-transition-overlay .ol-gold {
    color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .page-transition-overlay .ol-takas {
    color: rgba(218, 170, 0, 0.25);
}

/* Page Enter */
body.page-entering .container {
    animation: softReveal 0.4s ease forwards;
}

@keyframes softReveal {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Parallax Scroll Reveal */
.parallax-section {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.parallax-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.parallax-section.visible .item,
.parallax-section.visible .news-card,
.parallax-section.visible .bulten-item,
.parallax-section.visible .bank-card,
.parallax-section.visible .contact-item,
.parallax-section.visible .product-item {
    animation: softFadeIn 0.4s ease forwards;
    opacity: 0;
}

.parallax-section.visible .item:nth-child(1),
.parallax-section.visible .news-card:nth-child(1) { animation-delay: 0.05s; }
.parallax-section.visible .item:nth-child(2),
.parallax-section.visible .news-card:nth-child(2) { animation-delay: 0.1s; }
.parallax-section.visible .item:nth-child(3),
.parallax-section.visible .news-card:nth-child(3) { animation-delay: 0.15s; }
.parallax-section.visible .item:nth-child(4) { animation-delay: 0.2s; }
.parallax-section.visible .item:nth-child(5) { animation-delay: 0.25s; }
.parallax-section.visible .item:nth-child(6) { animation-delay: 0.3s; }

@keyframes softFadeIn {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Footer reveal */
footer {
    opacity: 0;
    animation: softFooter 0.5s ease 0.2s forwards;
}

@keyframes softFooter {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ============================================
   Progress Bar on Page Transition
   ============================================ */
.page-transition-overlay .progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #264da0, #daaa00);
    transition: width 0.3s ease;
}

.page-transition-overlay.active .progress-bar {
    animation: progressSlide 2s ease forwards;
}

@keyframes progressSlide {
    0%   { width: 0; }
    30%  { width: 45%; }
    60%  { width: 70%; }
    80%  { width: 85%; }
    100% { width: 95%; }
}

/* GPU acceleration for animated elements */
.parallax-section,
.page-transition-overlay,
.animate-on-scroll {
    will-change: opacity, transform;
}

/* ============================================
   Accessibility: Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .page-transition-overlay {
        transition: none;
    }

    .page-transition-overlay.active .progress-bar {
        animation: none;
        width: 95%;
    }

    body.page-entering .container {
        animation: none;
        opacity: 1;
    }

    .parallax-section {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .parallax-section.visible .item,
    .parallax-section.visible .news-card,
    .parallax-section.visible .bulten-item,
    .parallax-section.visible .bank-card,
    .parallax-section.visible .contact-item,
    .parallax-section.visible .product-item {
        animation: none;
        opacity: 1;
    }

    footer {
        opacity: 1;
        animation: none;
    }

    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   Skeleton Loading Placeholders
   ============================================ */
.skeleton {
    position: relative;
    overflow: hidden;
    background: #e9ecef;
    border-radius: 4px;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: skeletonShimmer 1.5s ease infinite;
}

@keyframes skeletonShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 60%; }

.skeleton-title {
    height: 20px;
    margin-bottom: 12px;
    width: 60%;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    margin-bottom: 12px;
}

.skeleton-card {
    padding: 16px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Dark mode skeleton */
body.dark-mode .skeleton {
    background: #2a3444;
}

body.dark-mode .skeleton::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

body.dark-mode .skeleton-card {
    background: #1e2a3a;
}

@media (prefers-reduced-motion: reduce) {
    .skeleton::after {
        animation: none;
    }
}
