/* ========== تنظیمات پایه ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: black;
    font-family: 'dana', 'tahoma', 'Vazirmatn', sans-serif;
    direction: rtl;
    min-height: 100vh;
    transition: background-color 0.5s, color 0.5s;
}

/* ========== تم تاریک و روشن ========== */
/* body.dark-mode {
    background-color: #ffffff !important;
    color: #ffffff !important;
} */

/* body.light-mode {
    background-color: #ffffff !important;
    color: #e8e8e8 !important;
} */

body.light-mode .navbar {
    background-color: #1a1a1a !important;
}

body.light-mode .news-card-modern {
    background: rgba(0, 0, 0, 0.8) !important;
}

/* ========== لودر ========== */
#lodaa {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: black;
    z-index: 999999;
}

#lodaa video {
    width: 300px;
    border-radius: 22px;
}

#myDiv1 {
    display: none;
}

.animate-bottom {
    animation: animatebottom 0.5s ease-out;
}

@keyframes animatebottom {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== منو ========== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: black;
    padding: 15px 30px;
    border-radius: 22px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    position: relative;
    z-index: 9999 !important;
}

.nav-logo {
    z-index: 9999;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    position: relative;
    z-index: 9999 !important;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    padding: 10px;
    border-radius: 22px;
    display: block;
}

.nav-links a:hover {
    background-color: red;
    box-shadow: 0 0 20px black;
}

.burger {
    display: none;
    cursor: pointer;
    z-index: 10000 !important;
    position: relative;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: 0.3s;
}

/* ========== ریسپانسیو منو ========== */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        background-color: black !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        transition: 0.5s;
        gap: 30px;
        z-index: 99999 !important;
    }
    
    .nav-links.nav-active {
        right: 0;
    }
    
    .burger {
        display: block;
        z-index: 100000 !important;
    }
    
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 99999 !important;
        border-radius: 0;
    }
    
    body {
        padding-top: 70px;
    }
}

/* ========== بقیه المان‌ها با z-index پایین‌تر ========== */
.slider-container {
    position: relative;
    width: 95%;
    margin: 20px auto;
    height: 500px;
    overflow: hidden;
    border-radius: 22px;
    z-index: 1 !important;
}

.ticker {
    background-color: rgba(136, 4, 4, 0.44);
    color: white;
    padding: 10px;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 1 !important;
}

.ticker p {
    display: inline-block;
    animation: scroll-left 15s linear infinite;
}

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

.theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999 !important;
}

#toggleBtn {
    background: linear-gradient(45deg, #ff0000, #0000ff);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.4s;
}

#toggleBtn:hover {
    transform: scale(1.1);
}

#myBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 999 !important;
    background-color: red;
    color: white;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 50%;
    border: none;
    font-size: 18px;
    box-shadow: 0 0 30px blue;
}

/* ========== اسلایدر ========== */
.slider-container {
    position: relative;
    width: 95%;
    margin: 20px auto;
    height: 500px;
    overflow: hidden;
    border-radius: 22px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-caption {
    background: rgba(0,0,0,0.6);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.slide-caption h2 a {
    color: white;
    text-decoration: none;
    font-size: 28px;
}

.dot-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background: white;
}

/* ========== اخبار ========== */
.news-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.news-header-modern {
    text-align: center;
    margin-bottom: 40px;
}

.news-header-modern h2 {
    font-size: 32px;
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-line {
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b);
    margin: 15px auto;
    border-radius: 4px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.news-card-modern {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
}

.news-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255,215,0,0.3);
}

.news-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card-modern:hover .news-image {
    transform: scale(1.1);
}

.news-date-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0,0,0,0.7);
    padding: 5px 10px;
    border-radius: 20px;
}

.news-date-badge svg {
    width: 16px;
    fill: #ffd700;
}

.news-content-modern {
    padding: 20px;
}

.news-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: white;
}

.news-excerpt {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffd700;
    text-decoration: none;
    margin-top: 15px;
}

/* ========== فوتر ========== */
.gtge2 {
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(0,0,0,0.5));
    border-radius: 30px;
    padding: 40px;
    margin: 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.gtge fieldset {
    border: 2px solid rgba(0,0,255,0.3);
    border-radius: 20px;
    padding: 20px;
    margin: 20px;
    background: rgba(0,0,0,0.2);
}

.gtge img {
    width: 80px;
    border-radius: 50%;
    transition: all 0.3s;
        box-shadow: 0 0 30px rgb(0, 51, 255);

}

.gtge img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px gold;
}
 
.zoom-target {
    transform: scale(0.8);
    transition: transform 0.5s ease;
}

.zoom-target.visible {
    transform: scale(1);
}

/* ========== دراپ داون منو ========== */
.dropdown {
    position: relative;
    z-index: 9999;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: linear-gradient(442deg, rgba(255, 0, 0, 0.9), rgba(3, 19, 237, 0.9));
    min-width: 250px;
    border-radius: 22px;
    z-index: 99999 !important;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
}

.dropdown-content a:hover {
    background: rgba(0,0,0,0.5);
}

/* ========== ریسپانسیو ========== */
@media (max-width: 768px) {
    .slider-container {
        height: 350px;
    }
    
    .slide-caption h2 a {
        font-size: 18px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .gtge2 {
        margin: 20px;
        padding: 20px;
    }
    
    .hed1 img {
        width: 70%;
    }
}

@media (max-width: 900px) {
    

}

 

.hed1 {
    position: relative;
    z-index: 1;
}

.hed1 img {
    max-width: 50%;
    border-radius: 22px;
}




/* دکمه شب/روز بدون متن */
#toggleBtn {
    background: linear-gradient(45deg, #ff0000, #0000ff);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toggleBtn:hover {
    transform: scale(1.1);
}

.day-icon, .night-icon {
    display: none;
}

body.dark-mode .night-icon {
    display: inline;
}

body.dark-mode .day-icon {
    display: none;
}

body.light-mode .day-icon {
    display: inline;
}

body.light-mode .night-icon {
    display: none;
}




/* ========== سرچ در منو ========== */
.nav-search {
    position: relative;
    margin-right: 20px;
}

.nav-search input {
    padding: 8px 15px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.7);
    color: white;
    direction: rtl;
    width: 200px;
    transition: all 0.3s;
}

.nav-search input:focus {
    width: 250px;
    outline: none;
    border-color: #ffd700;
}

.search-results {
    position: absolute;
    top: 45px;
    left: 0;
    right: 0;
    background: black;
    border-radius: 15px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 99999;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.search-results.show {
    display: block;
}

.search-results a {
    display: block;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.search-results a:hover {
    background: #ff0000;
}

/* موبایل */
@media (max-width: 768px) {
    .nav-search {
        width: 90%;
        margin: 10px auto;
    }
    
    .nav-search input {
        width: 100%;
    }
    
    .nav-search input:focus {
        width: 100%;
    }
    
    .nav-menu {
        position: fixed;
        right: -100%;
        top: 70px;
        width: 100%;
        height: calc(100vh - 70px);
        background: black;
        transition: 0.5s;
        padding: 20px;
        overflow-y: auto;
    }
    
    .nav-menu.nav-active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-results {
        position: fixed;
        top: auto;
        left: 20px;
        right: 20px;
        z-index: 99999;
    }
}




/* ========== دکمه تم داخل منو ========== */
.theme-menu-item {
    list-style: none;
}

.theme-menu-btn {
    background: linear-gradient(45deg, #ff0000, #0000ff);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    width: 100%;
}

.theme-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}

.theme-text {
    font-size: 14px;
}

/* مخفی کردن دکمه قبلی */
#theme-toggle {
    display: none;
}

/* موبایل */
@media (max-width: 768px) {
    .theme-menu-btn {
        justify-content: center;
        width: 90%;
        margin: 5px auto;
    }
    
    .theme-text {
        display: inline;
    }
}

/* دسکتاپ */
@media (min-width: 769px) {
    .theme-text {
        display: inline;
    }
}

body.light-mode .night-icon {
    display: none;
}

body.light-mode .day-icon {
    display: inline;
}

body.dark-mode .day-icon {
    display: none;
}

body.dark-mode .night-icon {
    display: inline;
}
.slide a {
    position: relative;
    z-index: 10;
    display: inline-block;
}

.slide {
    cursor: pointer;
}

.slide-caption {
    pointer-events: auto;
}
