/* ==============================================
   تنظیمات کلی
   ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0b0d17;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==============================================
   هدر (فقط لوگو - بدون منو)
   ============================================== */
#site-header {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 50px;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);  /* ← سافاری */
    border-bottom: 1px solid rgba(249, 115, 22, 0.15);
    min-height: 80px;
    max-height: 160px;
    overflow: visible;
    /* ایزوله کردن رندرینگ */
    contain: layout style paint;
}

/* ==============================================
   منوی جدید با نئون کرم‌وار روان (بدون لگ)
   ============================================== */
#main-nav {
    position: relative;
    z-index: 2;
    background: rgba(10, 14, 39, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);  /* ← سافاری */
    border-top: 1px solid rgba(249, 115, 22, 0.1);
    border-bottom: 1px solid rgba(249, 115, 22, 0.1);
    padding: 12px 0;
    /* ایزوله کردن رندرینگ */
    contain: layout style paint;
}

#main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 30px;
}

#main-nav ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 18px;
    padding: 8px 20px;
    border-radius: 10px;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    background: transparent;
    border: 2px solid transparent;
    z-index: 1;
    
}

/* ==============================================
   نئون کرم‌وار با گرادینت خطی (سبک و روان)
   ============================================== */
#main-nav ul li a::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    padding: 3px;
    background: linear-gradient(90deg, #ff0000, #ff8800, #ffff00, #00ff00, #0088ff, #8800ff, #ff0000);
    background-size: 300% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
   
}

/* ==============================================
   هاله نوری پشت گزینه
   ============================================== */
#main-nav ul li a::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 14px;
    background: linear-gradient(90deg, #ff0000, #ff8800, #ffff00, #00ff00, #0088ff, #8800ff, #ff0000);
    background-size: 300% 100%;
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.4s ease;
    z-index: -2;
   
}

/* ==============================================
   فعال شدن هنگام هاور (حرکت روان با background-position)
   ============================================== */
#main-nav ul li a:hover::before {
    opacity: 1;
    animation: wormMoveSmooth 1.5s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

#main-nav ul li a:hover::after {
    opacity: 0.5;
    animation: glowMoveSmooth 1.5s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

/* ==============================================
   انیمیشن حرکت کرم‌وار با background-position (بدون لگ)
   ============================================== */
@keyframes wormMoveSmooth {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; opacity: 0.7; }
}

@keyframes glowMoveSmooth {
    0% { background-position: 0% 0%; opacity: 0; }
    50% { opacity: 0.6; }
    100% { background-position: 300% 0%; opacity: 0.4; }
}

/* ==============================================
   درخشش متن و پس‌زمینه منو هنگام هاور
   ============================================== */
#main-nav ul li a:hover {
    color: #f97316 !important;
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
    background: rgba(249, 115, 22, 0.05);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
    transform: scale(1.05);
    /* آماده‌سازی برای ترنسفورم */
    will-change: transform;
}

/* ==============================================
   کانتینر لوگو - بالای همه چیز
   ============================================== */
.logo-container {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

.custom-logo-link {
    display: inline-block;
}

.custom-logo {
    height: 70px;
    width: auto;
    position: relative;
    z-index: 10;
}

/* ==============================================
   درخشش لوگو (بهینه شده)
   ============================================== */
.custom-logo-link img {
    width: 250px !important;
    height: auto !important;
    max-width: none !important;
    animation: edge-shine 2.5s infinite linear;
    image-rendering: auto;
    /* آماده‌سازی برای انیمیشن */
    will-change: transform, filter;
    /* ایزوله کردن رندرینگ */
    contain: layout style paint;
}

@keyframes edge-shine {
    0% { filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0)); }
    20% { filter: drop-shadow(20px 0 30px rgba(255, 255, 255, 1)) drop-shadow(10px 0 20px rgba(255, 255, 255, 0.9)) brightness(1.1); }
    40% { filter: drop-shadow(-20px 0 30px rgba(255, 255, 255, 1)) drop-shadow(-10px 0 20px rgba(255, 255, 255, 0.9)) brightness(1.1); }
    60% { filter: drop-shadow(0 20px 30px rgba(255, 255, 255, 1)) drop-shadow(0 10px 20px rgba(255, 255, 255, 0.9)) brightness(1.1); }
    80% { filter: drop-shadow(0 -20px 30px rgba(255, 255, 255, 1)) drop-shadow(0 -10px 20px rgba(255, 255, 255, 0.9)) brightness(1.1); }
    100% { filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0)); }
}

/* ==============================================
   نور فانوس دریایی (بهینه شده)
   ============================================== */
.lighthouse-beam {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lighthouse-beam.active {
    opacity: 1;
}

.beam-light {
    position: fixed;
    width: 500px;
    height: 700px;
    transform-origin: top center;
    background: linear-gradient(to bottom, rgba(249, 115, 22, 0.6) 0%, rgba(249, 115, 22, 0.25) 20%, rgba(249, 115, 22, 0.08) 50%, transparent 80%);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    filter: blur(1px);
    margin-left: -250px;
    margin-top: 0;
    pointer-events: none;
    /* آماده‌سازی برای انیمیشن */
    will-change: transform, opacity;
}

.beam-light.active {
    opacity: 1;
    transform: scale(3);
}

.beam-glow {
    position: fixed;
    width: 350px;
    height: 550px;
    transform-origin: top center;
    background: radial-gradient(ellipse at center top, rgba(249, 115, 22, 0.3) 0%, rgba(249, 115, 22, 0.1) 30%, transparent 70%);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    filter: blur(15px);
    margin-left: -175px;
    margin-top: 0;
    pointer-events: none;
    /* آماده‌سازی برای انیمیشن */
    will-change: transform, opacity;
}

.beam-glow.active {
    opacity: 1;
    transform: scale(3);
}

/* ==============================================
   سیستم موج آب نئونی (Water Ripple) بهینه شده
   ============================================== */
.water-ripple-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    z-index: 1;
    pointer-events: none;
}

.ripple-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: transparent;
    border: 4px solid rgba(249, 115, 22, 0.7);
    box-shadow: 0 0 22px rgba(249, 115, 22, 0.45), inset 0 0 15px rgba(249, 115, 22, 0.25);
    opacity: 0;
    pointer-events: none;
    /* آماده‌سازی برای انیمیشن */
    will-change: transform, opacity;
}

.water-ripple-container.active .ripple-ring {
    animation: rippleEffectDynamic 3.8s cubic-bezier(0.1, 0.8, 0.25, 1) forwards;
}

.water-ripple-container.active .r2 {
    animation-delay: 0.35s;
}

.water-ripple-container.active .r3 {
    animation-delay: 0.7s;
}

@keyframes rippleEffectDynamic {
    0% { transform: translate(-50%, -50%) scale(0.1); opacity: 0; }
    8% { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(16); opacity: 0; }
}

/* ==============================================
   محتوای اصلی - بالای نور
   ============================================== */
main {
    position: relative;
    z-index: 6;
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 30px;
}

.hero {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(249, 115, 22, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero h1 {
    font-size: 32px;
    color: #f97316;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 30px rgba(249, 115, 22, 0.2);
}

.hero p {
    font-size: 18px;
    line-height: 2;
    text-align: justify;
    color: #ddd;
    margin-bottom: 20px;
}

/* ==============================================
   فوتر - بالای نور
   ============================================== */
footer {
    position: relative;
    z-index: 6;
    text-align: center;
    padding: 30px;
    color: #888;
    border-top: 1px solid rgba(249, 115, 22, 0.1);
    margin-top: 50px;
}

/* ==============================================
   صفحات دیگر (تعرفه‌ها، مطالب، درباره ما)
   ============================================== */
.page-content {
    position: relative;
    z-index: 6;
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 30px;
}

.page-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(249, 115, 22, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.page-box h1 {
    font-size: 30px;
    color: #f97316;
    margin-bottom: 30px;
    text-shadow: 0 0 30px rgba(249, 115, 22, 0.2);
}

.page-box p,
.page-box li {
    font-size: 18px;
    line-height: 2;
    color: #ddd;
}

.page-box ul {
    padding-right: 30px;
}

.page-box a {
    color: #fb923c;
    text-decoration: none;
    border-bottom: 1px dashed rgba(249, 115, 22, 0.3);
}

.page-box a:hover {
    color: #fff;
    border-bottom-color: #f97316;
}

/* ==============================================
   تب‌های انتخاب سال
   ============================================== */
.year-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.year-tab {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(249, 115, 22, 0.15);
    border-radius: 10px;
    color: #aaa;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: inherit;
}

.year-tab:hover {
    background: rgba(249, 115, 22, 0.05);
    color: #fff;
}

.year-tab.active {
    background: rgba(249, 115, 22, 0.15);
    border-color: #f97316;
    color: #f97316;
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.1);
}

/* ==============================================
   محتوای تعرفه‌ها
   ============================================== */
.tarifeh-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tarifeh-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==============================================
   شبکه کارت‌های تعرفه
   ============================================== */
.tarifeh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.tarifeh-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(249, 115, 22, 0.08);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.tarifeh-card:hover {
    background: rgba(249, 115, 22, 0.05);
    border-color: rgba(249, 115, 22, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.card-icon {
    font-size: 28px;
}

.card-title {
    font-size: 16px;
    color: #ddd;
    font-weight: bold;
}

.tarifeh-card .download-btn {
    width: 100%;
    text-align: center;
    padding: 10px;
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.15);
    border-radius: 8px;
    color: #f97316;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tarifeh-card .download-btn:hover {
    background: rgba(249, 115, 22, 0.15);
    border-color: #f97316;
}

/* ==============================================
   دکمه دانلود عمومی
   ============================================== */
.download-btn {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: rgba(249, 115, 22, 0.2);
    border-color: #f97316;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(249, 115, 22, 0.15);
}

/* ==============================================
   پاسخگویی موبایل و مدیا کوئری‌ها
   ============================================== */
@media (max-width: 768px) {
    #site-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        min-height: auto;
    }

    #main-nav ul {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 15px;
    }

    #main-nav ul li a {
        font-size: 14px;
        padding: 6px 12px;
    }

    .custom-logo {
        height: 50px;
    }

    .hero,
    .page-box {
        padding: 25px;
    }

    .hero h1,
    .page-box h1 {
        font-size: 22px;
    }

    .hero p,
    .page-box p {
        font-size: 15px;
    }

    .tarifeh-grid {
        grid-template-columns: 1fr;
    }

    .year-tabs {
        justify-content: center;
    }

    .year-tab {
        padding: 8px 20px;
        font-size: 14px;
    }

    .tarifeh-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    #main-nav ul li a {
        font-size: 12px;
        padding: 4px 10px;
    }

    #site-header {
        padding: 10px 15px;
    }

    #main-nav ul {
        gap: 5px;
    }

    .custom-logo {
        height: 40px;
    }

    .hero,
    .page-box {
        padding: 15px;
    }

    .hero h1,
    .page-box h1 {
        font-size: 18px;
    }

    .year-tab {
        padding: 6px 15px;
        font-size: 12px;
    }

    .card-title {
        font-size: 14px;
    }
}