﻿/* ========== لودینگ حرفه‌ای ========== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e5631 0%, #153d23 100%);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.bg-primary {
    background-color: #1e5631 !important;
}

.bg-primary-dark {
    background-color: #153d23 !important;
}

.hover\:bg-primary-dark:hover {
    background-color: #153d23 !important;
}

.text-primary {
    color: #1e5631 !important;
}

.border-primary {
    border-color: #1e5631 !important;
}

.focus\:border-primary:focus {
    border-color: #1e5631 !important;
}

.focus\:ring-primary:focus {
    --tw-ring-color: #1e5631 !important;
}
.preloader-fade {
    opacity: 0;
    visibility: hidden;
}

.preloader-container {
    text-align: center;
    animation: float 2s infinite ease-in-out;
}

.preloader-logo {
    margin-bottom: 30px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
    animation: pulse 1.5s infinite;
}

    .logo-circle svg {
        width: 100%;
        height: 100%;
        animation: rotate 3s linear infinite;
    }

.preloader-spinner {
    width: 50px;
    height: 50px;
    margin: 20px auto;
    border: 4px solid rgba(201, 162, 39, 0.3);
    border-top: 4px solid #c9a227;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.preloader-text {
    color: #c9a227;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-top: 20px;
    font-weight: bold;
}

.preloader-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

    .preloader-dots span {
        width: 10px;
        height: 10px;
        background-color: #c9a227;
        border-radius: 50%;
        animation: bounce 1.4s infinite ease-in-out both;
    }

        .preloader-dots span:nth-child(1) {
            animation-delay: -0.32s;
        }

        .preloader-dots span:nth-child(2) {
            animation-delay: -0.16s;
        }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* ========== منوی افقی دسکتاپ ========== */
.desktop-navbar {
    position: fixed;
    top: 70px; /* بعد از هدر ثابت */
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #fde68a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    z-index: 55;
    padding: 8px 0;
}

    .desktop-navbar .nav-link {
        display: inline-block;
        padding: 8px 12px;
        color: #374151;
        font-weight: 500;
        transition: all 0.2s;
        border-radius: 0.5rem;
    }

        .desktop-navbar .nav-link:hover {
            color: var(--primary);
            background-color: rgba(30, 86, 49, 0.05);
        }

        .desktop-navbar .nav-link.active {
            color: var(--primary);
            background-color: rgba(30, 86, 49, 0.1);
            font-weight: bold;
        }

@media (max-width: 1023px) {
    .desktop-navbar {
        display: none;
    }

    body {
        padding-top: 70px;
    }
}

@media (min-width: 1024px) {
    body {
        padding-top: 120px; /* فضا برای هدر + منوی افقی */
    }

    .desktop-header {
        top: 0;
    }

    .main-navbar {
        display: none;
    }
}
/* ========== رفع مشکلات کنتراست ========== */
.text-dark {
    color: #1f2937 !important;
}

.bg-light-bg {
    background-color: #fef9f0;
}

.card-white {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
}
    /* اطمینان از خوانایی متن در داخل کارت‌های سفید */
    .card-white p, .card-white h1, .card-white h2, .card-white h3, .card-white h4, .card-white div:not(.text-primary) {
        color: #374151;
    }