/* Reset and General Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
	
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #2c3e50;
    color: white;
}

header .logo h1 {
    font-size: 24px;
}

header nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links li a {
    color: white;
    text-decoration: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    background-color: white;
    height: 3px;
    width: 30px;
    margin: 5px 0;
}

/* Search Box */
.search-section {
    text-align: center;
    margin: 20px 0;
}

.search-section input {
    padding: 10px;
    width: 70%;
    border: 2px solid #2980b9;
    border-radius: 5px;
}

.search-section button {
    padding: 10px;
    background-color: #2980b9;
    color: white;
    border: none;
    border-radius: 5px;
}

/* Hero Section */
.hero {
    background-color: #2980b9;
    color: white;
    text-align: center;
    padding: 50px 20px;
}

/* AdSense Styling */
.adsense {
    text-align: center;
    padding: 15px;
    background-color: #ddd;
    margin: 20px auto;
    max-width: 100%;
}

/* Top Ad */
.ad-top {
    margin-bottom: 20px;
}

/* Bottom Ad */
.ad-bottom {
    margin-top: 20px;
}
/* Categories */
.categories {
    padding: 40px 20px;
    text-align: center;
}

.category-list {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.category-card {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 85%;
}

/* Articles */
.article-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.article-card {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 45%;
}

/* Article View Page */
.article-view {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.article-view h1 {
    text-align: center;
    margin-bottom: 10px;
	margin-left:10px;
}

.article-meta {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.article-content p {
    margin-bottom: 15px;
    font-size: 17px;
    line-height: 1.8;
	margin-left:10px;
	margin-right:10px;
	text-align:justify;
}
.article-content ul {
margin-left:25px;
}
.article-content ol {
margin-left:25px;
}


/* User Link */
.user-link {
    margin-top: 30px;
    padding: 15px;
    background: #f4f4f4;
    border-left: 4px solid #2980b9;
}

.user-link p {
    margin: 5px 0;
}

.user-link a {
    color: #2980b9;
    text-decoration: none;
    font-weight: bold;
}




/* Footer Section */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center; /* Centers text */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
}

.footer-content .social-links a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
}
/* Form Sections */
.login-form, .register-form {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
}

.login-form h2, .register-form h2 {
    margin-bottom: 20px;
}

.login-form input, .register-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #2980b9;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Dashboard Section */
.dashboard {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.dashboard h2 {
    text-align: center;
    margin-bottom: 20px;
}

/* Profile Section */
.profile-section {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.profile-section p {
    margin: 10px 0;
}

.edit-btn {
    background-color: #2980b9;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
}

/* User Articles Section */
.user-articles h3 {
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table th, table td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: left;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
}

/* Profile View Page */
.profile-view {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.profile-view h2 {
    margin-bottom: 20px;
}

/* Profile Card */
.profile-card {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.profile-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.profile-card p {
    margin: 10px 0;
    font-size: 16px;
}
/* Edit Profile Section */
.edit-profile {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
}

.edit-profile h2 {
    margin-bottom: 20px;
    text-align: center;
}

.edit-profile input,
.edit-profile textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.edit-profile textarea {
    height: 80px;
    resize: none;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #2980b9;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
/* Post Article Form */
.post-article {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
}

.post-article h2 {
    text-align: center;
    margin-bottom: 15px;
}

.post-article input,
.post-article select,
.post-article textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #2980b9;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}



/* Responsive Design */
@media screen and (max-width: 768px) {

    .dashboard {
        width: 90%;
    }

    table {
        display: block;
        overflow-x: auto;
    }







    /* Responsive Menu */
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: #2c3e50;
    }

    .nav-links li {
        text-align: center;
        padding: 15px 0;
    }

    .nav-links.show {
        display: flex;
    }

    /* Responsive Grid */
    .category-list, .article-grid {
        flex-direction: column;
        align-items: center;
    }

    .category-card, .article-card {
        width: 99%;
    }
}
