/* Esasy CSS stilleri */
:root {
    --primary-color: #28a745; /* Ýaşyl reňk */
    --secondary-color: #F8F8F8; /* Açyk ýaşyl fon */
    --text-color: #333;
    --light-text-color: #555;
    --border-color: #c8e6c9; /* Ýaşyl gyralar */
    --card-bg: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --accent-color: #f0ad4e; /* Aktiw baýdak düwmesi üçin */
}

/* Tüm elementlere box-sizing uygulayalım */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 20px 40px;
    margin-bottom: 30px; /* Header'dan sonra boşluk */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 4px 15px var(--shadow-medium);
    position: relative; /* Z-index için gerekirse */
    z-index: 10; /* Header'ın diğer elementlerin üzerinde olmasını sağlamak için */
}

header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
}

.controls-muradov {
    width: auto;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top:0;
    align-items: center;
}

/* Gözleg meýdançasy üçin täze stiller */
.search-container-muradov {
    position: relative;
    display: flex; /* Giriş we arassalama düwmelerini ýanaşyk etmek üçin */
    align-items: center;
}

.search-container-muradov input[type="text"] {
    padding: 10px 15px;
    color: var(--primary-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    width: 250px; /* Giňligi artdyrdyk */
    padding-right: 40px; /* Arassalama düwmesi üçin ýer goýmak */
}

.search-container-muradov input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

.clear-search-button-muradov {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
    display: none; /* Başlangyçda gizlenen */
    transition: color 0.2s ease;
}

.clear-search-button-muradov:hover {
    color: #777;
}

/* Dil baýdaklary üçin stiller */
.language-flags-muradov {
    display: flex;
    gap: 8px;
    /* Eğer bayraklar üst üste biniyorsa veya görünmüyorsa, z-index ekleyebiliriz */
    position: relative;
    z-index: 5; /* Diğer içeriklerin üzerinde olmasını sağlamak için */
}

.flag-button-muradov {
    background: none;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.flag-button-muradov img {
    width: 35px;
    height: 25px;
    object-fit: cover;
    display: block;
}

.flag-button-muradov:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.flag-button-muradov.active {
    border-color: var(--accent-color);
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(240, 173, 78, 0.5);
}

main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    /* "Foto yukarsi yapisti" sorununu çözmek için main içeriğine üst boşluk ekleyelim */
    margin-top: 30px; /* Header'ın margin-bottom'ı ile uyumlu veya biraz daha fazla */
}

#newsContainerMuradov {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding-bottom: 30px;
    margin-top: 30px; /* Zaten vardı, bu iyi */
}

.news-item-muradov {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-light);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.news-item-muradov:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.news-item-muradov img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.news-item-muradov h3 { 
    font-size: 20px;
    margin: 15px 20px 10px 20px;
    color: var(--primary-color);
    font-weight: 600;
    min-height: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-item-muradov p {
    font-size: 15px;
    color: var(--light-text-color);
    margin: 0 20px 15px 20px;
    flex-grow: 1;
    min-height: 55px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.news-info-muradov {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 20px 10px 20px;
    font-size: 13px;
    color: #777;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.news-info-muradov span {
    display: flex;
    align-items: center;
    gap: 8px; /* Ikonyň tekste ýakynlygy */
}

/* Göz ikony üçin CSS */
.news-info-muradov .icon.eye::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: var(--primary-color); /* Ikonyň reňki */
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zm0 12c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>') no-repeat center / contain;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zm0 12c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>') no-repeat center / contain;
}

/* Kalendar ikony üçin CSS */
.news-info-muradov .icon.calendar::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: var(--primary-color); /* Ikonyň reňki */
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 4h-3V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11zM7 11h5v5H7z"/></svg>') no-repeat center / contain;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 4h-3V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11zM7 11h5v5H7z"/></svg>') no-repeat center / contain;
}


.news-item-muradov .read-more-muradov {
    display: block;
    text-align: right;
    padding: 0 20px 20px 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
}

.news-item-muradov .read-more-muradov:hover {
    text-decoration: underline;
    color: #1e7e34;
}

.loading-message-muradov, .error-message-muradov {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    font-size: 20px;
    color: #555;
    font-weight: 500;
}

.error-message-muradov {
    color: #dc3545;
    font-weight: bold;
}

#loadMoreContainerMuradov {
    text-align: center;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;  
    grid-column: 1 / -1;
}

#loadMoreButtonMuradov {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: 600;
    display: inline-block;
}

#loadMoreButtonMuradov:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

#loadMoreButtonMuradov:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.spinner-muradov {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: none;  
    margin-left: 15px;  
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Mobil responsiwlik */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }
    .controls-muradov {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 35px;
    }
    .search-container-muradov {
        width: 100%;
    }
    .search-container-muradov input[type="text"] {
        width: 100%;
        box-sizing: border-box;
    }
    .language-flags-muradov {
        width: 100%;
        justify-content: center;
    }
    main {
        padding: 0 15px;
        margin-top: 20px; /* Mobil için de üst boşluğu ayarlayalım */
    }
    #newsContainerMuradov {
        grid-template-columns: 1fr;
    }
    .news-item-muradov img {
        height: 180px;
    }
    .news-item-muradov h3 {
        font-size: 18px;
    }
    .news-item-muradov p {
        font-size: 14px;
    }
}
