/* Sunil Khairnar Blog - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 300px;
    background: linear-gradient(to bottom, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 30px 20px 15px;
    text-align: center;
    position: relative;
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: bold;
    color: #d4d4d4;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
    line-height: 1.3;
}

.sidebar-image {
    width: 100%;
    max-width: 200px;
    margin: 0 auto 15px;
    border-radius: 5px;
    overflow: hidden;
}

.sidebar-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 250px;
    object-fit: cover;
}

.sidebar-nav {
    padding: 15px 20px 30px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 12px;
}

.sidebar-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: block;
    padding: 8px 0;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav a:hover {
    color: #d4a574;
}

/* Main Content Area */
.main-content {
    margin-left: 300px;
    flex: 1;
    padding: 40px;
    background-color: #fff;
}

/* Blog Grid Container */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 50px;
    width: 100%;
}

/* Ensure grid items are properly sized */
.blog-grid .blog-post {
    width: 100%;
    min-width: 0; /* Prevents grid items from overflowing */
}

/* Blog Post Styles */
.blog-post {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-post:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Full width blog post (for featured and top post) */
.blog-post.full-width {
    grid-column: 1 / -1;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.blog-post.full-width:last-child {
    border-bottom: none;
}

.post-image {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-meta {
    color: #666;
    font-size: 12px;
    margin-bottom: 12px;
}

.blog-grid .post-meta {
    font-size: 11px;
    margin-bottom: 10px;
}

.post-meta span {
    margin-right: 10px;
}

.post-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.3;
}

.blog-grid .post-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.post-excerpt {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1;
}

.blog-grid .post-excerpt {
    font-size: 13px;
    margin-bottom: 12px;
}

.read-more-btn {
    display: inline-block;
    background-color: #d4a574;
    color: #fff;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 13px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    align-self: flex-start;
    margin-top: auto;
}

.blog-grid .read-more-btn {
    padding: 8px 20px;
    font-size: 12px;
}

.read-more-btn:hover {
    background-color: #c49564;
}

/* Featured Section */
.featured-label {
    display: inline-block;
    background-color: #d4a574;
    color: #fff;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-header {
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    margin: 50px 0 30px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Single Post Page */
.single-post {
    max-width: 900px;
    margin: 0 auto;
}

.single-post .post-title {
    font-size: 42px;
    margin-bottom: 20px;
}

.single-post-content {
    font-size: 18px;
    line-height: 1.9;
    color: #444;
    margin-top: 30px;
}

.single-post-content p {
    margin-bottom: 20px;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 5px;
}

/* Admin Panel Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.admin-header h1 {
    font-size: 32px;
    color: #333;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #d4a574;
    color: #fff;
}

.btn-primary:hover {
    background-color: #c49564;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

/* Admin Form */
.admin-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 200px;
    resize: vertical;
}

.form-group input[type="file"] {
    padding: 8px;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .container {
        flex-direction: column;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar-image {
        max-width: 150px;
    }
    
    .sidebar-header h1 {
        font-size: 18px;
    }
}


