body {
    background-color: #12141c; 
    color: #d1d5db; 
    margin: 0 auto; /* Centers the whole site */
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* The CSS Grid Magic */
    display: grid;
    grid-template-columns: 220px 1fr; /* 220px sidebar, Content takes the remaining space */
    grid-template-areas: 
        "logo logo"
        "sidebar content";
    gap: 40px; /* Perfect spacing between the sidebar and the content box */
    align-items: start; /* Prevents the menu box from stretching if your content is really long */
    max-width: 1200px; /* Keeps the site looking tight on ultra-wide monitors */
}

/* Zone 1: The Logo (Spans across the top) */
.logo {
    grid-area: logo;
    width: 100%;  
    text-align: center;
    margin-bottom: 20px; /* Breathing room before the content starts */
}

.logo img {
    width: 100%;
    max-width: 400px; 
}

/* Zone 2: The Left Sidebar */
#menu {
    grid-area: sidebar;
    display: flex;
    flex-direction: column; /* This changes the menu from horizontal to a vertical stack! */
    gap: 30px; 
    padding: 30px 20px;
    margin: 0; /* Clears old horizontal centering */
    
    /* Giving the sidebar its own frosted glass box to match the content */
    background: rgba(30, 41, 59, 0.5); 
    border: 1px solid rgba(56, 189, 248, 0.15); 
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); 
}

/* Zone 3: The Main Content */
.mainDoc { 
    grid-area: content;
    width: 100%;
    margin: 0; /* Clears old horizontal centering */
    
    background: rgba(30, 41, 59, 0.5); 
    border: 1px solid rgba(56, 189, 248, 0.15); 
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); 
    padding: 40px 0; 
}

.menuLinks {
    text-align: left;
    padding-left: 10px;
}

.menuLinks a {
    display: inline-block;
    padding: 5px 0; 
    text-decoration: none;
    color: #d1d5db; 
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 1px;
    position: relative; 
    transition: color 0.3s ease;
}

/* The Animated Underline */
.menuLinks a::after {
    content: '';
    position: absolute;
    width: 0%; 
    height: 2px;
    bottom: -2px; 
    left: 0;
    background-color: #38bdf8; 
    transition: width 0.3s ease; 
}

.menuLinks a:hover {
    color: #ffffff; 
}

.menuLinks a:hover::after {
    width: 100%; 
}

.mainContent {
    width: 85%;
    margin: 0 auto;
    text-align: left;
    line-height: 1.8; 
    font-size: 1.05rem;
}

.blog-post {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}

.blog-date {
    color: #38bdf8;
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.blog-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
}

/* Pagination Controls */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.page-btn {
    color: #38bdf8;
    text-decoration: none;
    width: 80px;
    transition: color 0.3s ease;
}

.page-btn:hover {
    color: #ffffff;
}

.page-btn.next {
    text-align: right;
}

.page-indicator {
    color: #d1d5db;
}

.page-spacer {
    width: 80px;
    visibility: hidden;
}

/* Telegram Button */
.telegram-promo {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.telegram-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.telegram-btn:hover {
    background-color: rgba(56, 189, 248, 0.2);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "logo"
            "sidebar"
            "content";
    }
    
    #menu {
        flex-direction: row; /* Puts the menu back to horizontal for phones */
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .menuLinks {
        text-align: center;
        padding-left: 0;
    }
}