/* ================= UMUMIY SOZLAMALAR ================= */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Nunito', sans-serif; }
body { background-color: #f0f4f8; color: #334155; line-height: 1.7; display: flex; flex-direction: column; min-height: 100vh; }

/* ================= YUQORI MENYU (GLASSMORPHISM) ================= */
.header {
    position: sticky; top: 0; background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px); color: white; display: flex;
    justify-content: space-between; align-items: center; padding: 15px 5%;
    z-index: 1000; box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.logo { font-size: 30px; font-weight: 800; letter-spacing: 1px; }
.logo span.in { color: #a4c639; } 
.logo span.it { color: #fff; } 
.logo span.alia { color: #ef4444; }

.nav-menu { display: flex; gap: 30px; list-style: none; align-items: center; }
.nav-menu li { position: relative; padding: 10px 0; cursor: pointer; font-size: 16px; font-weight: 600; transition: color 0.3s; }
.nav-menu li:hover { color: #60a5fa; }
.nav-menu li::after { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 20px; background: transparent; }

/* Zamonaviy silliq Dropdown */
.dropdown {
    position: absolute; top: calc(100% + 15px); left: -10px;
    background-color: #ffffff; color: #334155; list-style: none;
    min-width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 12px; overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease-in-out;
}
.nav-menu li:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li { padding: 12px 20px; border-bottom: 1px solid #f1f5f9; transition: all 0.3s; position: relative; }
.dropdown li:hover { background-color: #f8fafc; color: #2563eb; padding-left: 28px; }
.dropdown li::before { content: '•'; position: absolute; left: 12px; color: #3b82f6; opacity: 0; transition: opacity 0.3s; }
.dropdown li:hover::before { opacity: 1; }

.header-icons { display: flex; gap: 15px; align-items: center; }
.icon-btn { 
    background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); 
    border-radius: 50%; width: 40px; height: 40px; 
    cursor: pointer; font-size: 16px; transition: all 0.3s; display: flex; justify-content: center; align-items: center;
}
.icon-btn:hover { background: #fff; color: #0f172a; transform: scale(1.1); }
#mobile-menu-btn { display: none; }

/* ================= RASM DIZAYNI ================= */
.banner-container { width: 100%; height: 350px; position: relative; overflow: hidden; }
.banner-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(15,23,42,0.2), rgba(15,23,42,0.8)); z-index: 1; }
.banner-image { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.banner-text { position: absolute; bottom: 40px; left: 5%; z-index: 2; color: #fff; }
.banner-text h1 { font-size: 42px; font-weight: 800; margin-bottom: 10px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

/* ================= ASOSIY MAYDON ================= */
.container { display: flex; gap: 40px; padding: 50px 5%; max-width: 1400px; margin: auto; flex: 1; width: 100%; }
.main-content, .sidebar { background: #fff; padding: 40px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); border: 1px solid #e2e8f0; }
.main-content { flex: 3; }
.main-content p { font-size: 18px; color: #475569; text-align: justify; margin-bottom: 15px; }

/* ================= YON PANEL ================= */
.sidebar { flex: 1; padding: 30px; height: max-content; }
.search-input { width: 100%; padding: 15px 20px; margin-bottom: 30px; border: 2px solid #e2e8f0; border-radius: 30px; font-size: 15px; outline: none; transition: all 0.3s; background: #f8fafc; }
.search-input:focus { border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); }
.sidebar-menu { list-style: none; }
.accordion-item { border-bottom: 1px solid #e2e8f0; }
.accordion-item:last-child { border-bottom: none; }
.accordion-btn { width: 100%; text-align: left; padding: 18px 10px; background: none; border: none; font-size: 16px; font-weight: 700; color: #1e293b; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: color 0.3s; }
.accordion-btn:hover { color: #2563eb; }
.accordion-btn .arrow { transition: transform 0.3s; font-size: 18px; color: #94a3b8; }
.accordion-btn.active .arrow { transform: rotate(180deg); color: #2563eb; }
.accordion-content { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease-in-out; }
.accordion-content.open { grid-template-rows: 1fr; }
.accordion-inner { overflow: hidden; }
.nested-menu { list-style: none; background: #f8fafc; border-radius: 12px; margin-bottom: 10px; }
.nested-menu .accordion-btn { font-size: 15px; padding: 14px 20px; font-weight: 600; color: #475569; }
.nested-links { list-style: none; background: #fff; }
.nested-links li a { display: block; padding: 12px 20px 12px 40px; color: #64748b; text-decoration: none; font-size: 14px; font-weight: 600; transition: all 0.2s; border-left: 2px solid transparent; }
.nested-links li a:hover { color: #2563eb; background: #eff6ff; border-left-color: #2563eb; }

/* ================= FOOTER ================= */
.footer { background-color: #0f172a; color: #94a3b8; padding: 50px 5% 30px; border-top: 4px solid #3b82f6; margin-top: auto; }
.footer-container { display: flex; justify-content: space-between; align-items: flex-start; max-width: 1400px; margin: auto; flex-wrap: wrap; gap: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 30px; margin-bottom: 20px; }
.footer-logo { margin-bottom: 15px; }
.footer-desc { max-width: 400px; font-size: 14px; line-height: 1.6; }
.footer-links h3 { color: #fff; margin-bottom: 15px; font-size: 18px; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a { color: #94a3b8; text-decoration: none; transition: color 0.3s; font-size: 15px; }
.footer-links ul li a:hover { color: #60a5fa; padding-left: 5px; }
.footer-bottom { text-align: center; font-size: 14px; }
.footer-bottom span { color: #fff; }

/* ================= MOBIL ADAPTATSIYA ================= */
@media (max-width: 992px) {
    .container { flex-direction: column; padding: 30px 5%; }
    #mobile-menu-btn { display: flex; }
    .nav-menu {
        position: fixed; top: 0; left: -100%; width: 300px; height: 100vh; background-color: #0f172a;
        flex-direction: column; justify-content: flex-start; align-items: flex-start;
        padding: 80px 30px 30px; transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 5px 0 25px rgba(0,0,0,0.5); z-index: 999; overflow-y: auto;
    }
    .nav-menu.active { left: 0; }
    .nav-menu li { width: 100%; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 18px; }
    .dropdown { position: static; visibility: visible; opacity: 1; transform: none; box-shadow: none; background: rgba(255,255,255,0.05); margin-top: 10px; display: none; width: 100%; }
    .dropdown.show-mobile { display: block; }
    .dropdown li { padding: 12px 15px; border-bottom: none; }
    .nav-menu li:hover .dropdown { transform: none; }
    .menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); z-index: 998; opacity: 0; visibility: hidden; transition: all 0.3s; }
    .menu-overlay.active { opacity: 1; visibility: visible; }
    .footer-container { flex-direction: column; }
}/* <--- DIQQAT! Mana shu yopiluvchi qavs @media ning tugashini bildiradi */




/* ================= ZAMONAVIY ALOQA FORMASI ================= */
.modern-contact-form {
    background: #ffffff; padding: 35px; border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid #e2e8f0;
    display: flex; flex-direction: column; gap: 20px; margin-top: 25px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-weight: 700; color: #475569; font-size: 14px; }

.modern-contact-form input[type="text"], 
.modern-contact-form textarea {
    width: 100%; padding: 15px; border: 2px solid #e2e8f0; border-radius: 10px;
    font-size: 15px; outline: none; transition: 0.3s; background: #f8fafc; color: #334155; resize: none;
}
.modern-contact-form input:focus, 
.modern-contact-form textarea:focus {
    border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.file-upload-wrapper { position: relative; margin-top: 5px; }
.hidden-file-input { display: none; }
.file-upload-label {
    display: block; width: 100%; padding: 15px; border: 2px dashed #cbd5e1;
    border-radius: 10px; text-align: center; color: #64748b; font-weight: 600;
    cursor: pointer; transition: 0.3s; background: #f8fafc; font-size: 15px;
}
.file-upload-label:hover { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }

.submit-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff;
    border: none; padding: 16px; border-radius: 10px; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: 0.3s; box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    margin-top: 10px;
}
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4); }

.alert-success { background: #dcfce7; color: #166534; padding: 15px; border-radius: 10px; border: 1px solid #bbf7d0; font-weight: 600; margin-bottom: 20px; text-align: center; }
.alert-error { background: #fee2e2; color: #991b1b; padding: 15px; border-radius: 10px; border: 1px solid #fecaca; font-weight: 600; margin-bottom: 20px; text-align: center; }



/* ================= ZAMONAVIY MAQOLALAR KARTALARI (GRID USULI) ================= */
.articles-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* Kompyuterda 3 tadan yonma-yon, 3 raqamini o'zgartirish kerak */
    gap: 30px; 
    margin-top: 20px; 
}

.article-card { 
    display: flex; flex-direction: column; /* Rasm tepada, matn pastda */
    background: #fff; border-radius: 16px; 
    border: 1px solid #e2e8f0; transition: all 0.3s ease; 
    overflow: hidden; /* Rasm chetdan chiqib ketmasligi uchun */
}
.article-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.06); 
    border-color: #cbd5e1; 
}

.article-img { 
    width: 100%; height: 220px; object-fit: cover; 
}

.article-info { 
    padding: 25px; display: flex; flex-direction: column; 
    flex: 1; /* Tugmalarni bir xil chiziqda ushlab turish uchun */
}

.article-title { 
    font-size: 20px; color: #0f172a; margin-bottom: 12px; 
    font-weight: 800; text-decoration: none; transition: color 0.3s; 
    line-height: 1.4; display: block;
}
.article-title:hover { color: #2563eb; }

.article-desc { 
    color: #475569; font-size: 15px; margin-bottom: 20px; 
    line-height: 1.6; flex: 1; /* Matn qisqa bo'lsa ham kartani to'ldirib turadi */
}

.article-footer { 
    display: flex; justify-content: space-between; align-items: center; 
    padding-top: 15px; border-top: 1px solid #f1f5f9; 
}

.read-more { 
    display: inline-block; color: #2563eb; font-weight: 700; 
    text-decoration: none; font-size: 14px; transition: 0.3s; 
}
.read-more:hover { color: #1d4ed8; padding-left: 5px; }

.article-date { font-size: 13px; color: #94a3b8; font-weight: 600; }

/* Mobil ekranlar uchun moslashuv */
@media (max-width: 768px) {
    .articles-grid { 
        grid-template-columns: 1fr; /* Telefonlarda yana 1 tadan ketma-ket bo'ladi */
    }
    .article-img { height: 200px; }
}


/* ================= TO'LIQ MAQOLA SAHIFASI (MAQOLA.PHP) ================= */
.article-detail-img { 
    width: 100%; max-height: 450px; object-fit: cover; 
    border-radius: 16px; margin-bottom: 25px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); 
}
.article-detail-title { 
    font-size: 34px; color: #0f172a; margin-bottom: 15px; 
    font-weight: 800; line-height: 1.3; 
}
.article-meta { 
    color: #64748b; font-size: 15px; margin-bottom: 30px; 
    display: flex; gap: 20px; font-weight: 600; 
    border-bottom: 1px solid #e2e8f0; padding-bottom: 15px;
}
.article-body { 
    font-size: 17px; color: #334155; line-height: 1.8; text-align: justify; 
}
.article-body p { margin-bottom: 15px; }

.back-btn {
    display: inline-block; padding: 10px 20px; background: #f1f5f9;
    color: #475569; border-radius: 8px; text-decoration: none;
    font-weight: 700; transition: all 0.3s; margin-bottom: 25px;
}
.back-btn:hover { background: #e2e8f0; color: #0f172a; transform: translateX(-5px); }


/* CKEditor orqali yozilgan matnlar dizayni */
.article-body ul, .article-body ol { margin-left: 25px; margin-bottom: 20px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { font-weight: 800; color: #0f172a; }
.article-body a { color: #2563eb; text-decoration: underline; font-weight: 600; }
.article-body blockquote { 
    border-left: 4px solid #3b82f6; padding: 15px 20px; 
    font-style: italic; color: #475569; background: #f8fafc; 
    border-radius: 0 10px 10px 0; margin: 20px 0;
}