/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-areas: 
        "header header"
        "main sidebar"
        "footer footer";
    min-height: 100vh;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Header */
.site-header {
    grid-area: header;
    background: #2c3e50;
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.blog-description {
    font-style: italic;
    opacity: 0.8;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.main-nav a:hover {
    opacity: 0.8;
}

/* Main Content */
.content {
    grid-area: main;
    padding: 2rem;
    min-height: 60vh;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Styles */
.post-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
}

.form-group textarea {
    min-height: 300px;
    resize: vertical;
}

.form-group input[type="file"] {
    padding: 0.5rem;
}

.submit-btn {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #1a252f;
}

/* Image Preview */
.image-preview {
    margin-top: 1rem;
    max-width: 300px;
}

.image-preview img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Post Styles */
.post-preview {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}

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

.post-preview h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.post-preview .post-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-preview .post-excerpt {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-preview .post-image {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

/* Post Detail */
.post-detail {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
}

.post-detail h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.post-detail .post-image {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-detail .post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-detail .post-content p {
    margin-bottom: 1.5rem;
}

/* Admin Panel */
.admin-dashboard {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-card h3 {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.stat-card span {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.admin-posts-list {
    margin-top: 1rem;
}

.admin-post-item {
    background: #f8f9fa;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-post-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    padding: 2rem 1rem;
}

.widget {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.widget-title {
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.widget a {
    color: #3498db;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
}

.widget a:hover {
    text-decoration: underline;
}

.widget a span {
    color: #7f8c8d;
}

/* Footer */
.site-footer {
    grid-area: footer;
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
}
.msp {
    text-align: center;
    color: #2c3e50;
}
.contact {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    padding: 0.5rem;
    justify-content: center;
}
.contact ul {
    text-align: center;
}
.fa-google {
  background: #dd4b39;
  color: white;
}
.fa-instagram {
 background: black;
  color: white;
}
.fa {
  padding: 9px;
  font-size: 30px;
  width: 30px;
  text-align: center;
  text-decoration: none;
  border-radius: 30%;
}

/* Comments Section */
.comments-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.comment {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
}

.comment-date {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.comment-actions {
    margin-top: 0.5rem;
}

.comment-reply-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
}

.comment-reply-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.admin-badge {
    background: #27ae60;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 5px;
}

.add-comment {
    margin-top: 1.5rem;
}
/* Responsive */
@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "main"
            "sidebar"
            "footer";
    }
    
    .site-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .admin-post-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .admin-post-actions {
        justify-content: center;
    }
}
