/* ========== ДЕСКТОП (БАЗОВЫЕ СТИЛИ) ========== */
:root {
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-main: #333;
    --text-muted: #777;
    --accent-blue: #00a2ec;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: #222;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 40px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    transition: transform 0.2s;
    display: inline-block;
}

.brand:hover {
    transform: scale(1.02);
}

/* Навигация десктопная (скрыта на мобилках) */
.nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(0, 162, 236, 0.08);
    color: var(--accent-blue);
}

.tg-link {
    background: var(--accent-blue);
    color: #fff !important;
}

.tg-link:hover {
    background: #008ecc;
    box-shadow: 0 4px 12px rgba(0, 162, 236, 0.3);
}

/* Кнопка бургера — скрыта на десктопе */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Мобильное меню (слайдер) — скрыто на десктопе */
.mobile-nav {
    display: none;
}

.menu-overlay {
    display: none;
}

/* Макет: Лента + Сайдбар */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

/* Сетка карточек */
.feed-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* Карточки */
.card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 20px;
}

.card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}

.card-body h2 {
    font-size: 1.2rem;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.card-body p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

/* Сайдбар (ВИДЕН ВСЕГДА, НЕ СКРЫВАЕМ) */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.side-card:hover {
    background-color: #dfdfdf;
}

.fa-kaaba {
    color: var(--accent-blue);
}

.profile-logo {
    font-size: 50px;
    margin-bottom: 15px;
}

.banner-ad {
    padding: 0;
    overflow: hidden;
}

.banner-ad img {
    width: 100%;
    display: block;
}

.profile-card h3, .profile-card p {
    color: #555;
}

/* Telegram ссылки в сайдбаре */
.tg-chanels h3 {
    margin: 15px 0 5px 0;
    font-size: 1rem;
}

.tg-chanel-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 12px;
    margin-top: 5px;
    transition: opacity 0.2s ease, transform 0.1s ease;
    background-color: var(--accent-blue);
    width: 100%;
    box-sizing: border-box;
}

.tg-chanel-item:hover {
    opacity: 0.9;
    transform: scale(0.98);
}

.tg-icon-wrapper {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 15px;
}

.tg-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tg-label {
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 500;
}

/* Цвета для каналов */
#red { background-color: #e1306c; }
#violet { background-color: #6b3082; }
#green { background-color: #92d3d7; }
#riyad_useimin{ background-color: #92d3d7;}
#black { background-color: #222; }
#emerald { background-color: #00685b; }
#white { background-color: #d4d4d4; }
#yellow { background-color: #f8c512; }
#sira-yellow{ background-color: #ffd339;}
#alyi{ background-color: #ff0000;}

/* Footer */
.footer {
    background: #fff;
    margin-top: 50px;
    padding: 40px 0 20px;
    border-top: 1px solid #eee;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.footer-bottom a {
    color: var(--accent-blue);
}

/* ========== АДАПТИВ (max 600px) ========== */
@media (max-width: 600px) {

    .header .right-group {
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    }

    .header .right-group .nav-link {
        white-space: nowrap;
    }

    /* Скрываем десктопную навигацию */
    .header .nav {
        display: none;
    }

    /* Показываем бургер */
    .menu-toggle {
        display: block;
    }

    /* Сетка карточек в 1 колонку */
    .feed-grid {
        grid-template-columns: 1fr;
    }

    /* Макет в колонку */
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Сайдбар НЕ скрываем — он виден */
    .sidebar {
        display: flex;
    }

    /* Мобильное меню (слайдер) */
    .mobile-nav {
        display: flex;
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 300px;
        height: 100vh;
        background: white;
        transition: left 0.3s ease;
        z-index: 9999;
        flex-direction: column;
        padding: 60px 0 20px 0;
        box-shadow: 10px 0 20px rgba(0,0,0,0.2);
        overflow-y: auto;
    }

    .mobile-nav.active {
        left: 0;
    }

    .mobile-nav .nav-scroll-content {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }

    .close-menu {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 28px;
        cursor: pointer;
        width: 40px;
        height: 40px;
    }

    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9000;
    }

    .menu-overlay.active {
        display: block;
    }

    body.menu-open {
        overflow: hidden;
    }

    .tg-chanels{
        display: none;
    }

    .tg-chanel-item:last-of-type{
        margin-bottom: 80px;
    }
}