/* Reset some basic elements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

/* Header Styling */
header {
    background: #000000;
    color: #fff;
    /*padding: 20px 5%;*/
    display: flex;
    justify-content: space-between;
    align-items: center;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header .logo a {
    color: #ffffff;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

header nav {
    float: right;
}

header nav ul {
    display: flex;
}

header nav ul li {
    display: inline;
    margin-left: 30px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: #e0e0e0;
}

header::after {
    content: "";
    display: table;
    clear: both;
}

/* Banner logo styling */
.banner-logo {
    max-width: 100%; /* Makes sure the logo is responsive */
    height: auto; /* Keeps the aspect ratio */
    display: block;
    margin: 0 auto; /* Centers the logo */
}

/* Hero section enhancements */
.hero {
    background-color: #f0f8ff;
    padding: 10px 5%;
    text-align: center;
}

.hero h1 {
    font-size: 34px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content Section */
.content {
    padding: 40px 0;
}

/* Headings */
h1, h2, h3, h4 {
    font-family: 'Roboto', sans-serif;
}

h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 20px;
}

h2 {
    font-size: 28px;
    color: #4CAF50;
    margin-bottom: 20px;
}

h3 {
    font-size: 24px;
    color: #4CAF50;
    margin-bottom: 15px;
}

h4 {
    font-size: 22px;
    color: #4CAF50;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Paragraphs */
p {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
}

/* Lists */
ul.stats-list, ul {
    list-style: none;
    padding: 0;
}

.stats-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.stats-list li {
    flex: 1 1 30%;
    background: #fff;
    margin: 10px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stats-list li strong {
    display: block;
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

ul li {
    margin-bottom: 10px;
}

ul li strong {
    font-weight: bold;
}

/* Entry Content */
.entry-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.entry-content .cartoon {
    flex: 1;
    min-width: 300px;
    text-align: center;
    margin-bottom: 20px;
}

.entry-content .cartoon img {
    width: 100%;
    height: auto;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.entry-content .cartoon img:hover {
    transform: scale(1.05);
}

.entry-content .entry-description {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.entry-description p {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Read More Button */
.read-more {
    display: inline-block;
    padding: 10px 20px;
    background: #4CAF50;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.read-more:hover {
    background: #45a049;
}

/* Categories Section */
.categories {
    background: #f9f9f9;
    padding: 40px 0;
    text-align: center;
    border-radius: 8px;
}

.categories h2 {
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Category Button Styling */
.category-button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 16px;
}

.category-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

/* Remove default button focus outline */
.category-button:focus {
    outline: none;
}

.category-button.active {
    background-color: #388E3C; /* Darker green */
    transform: translateY(0);
}

.category-button.active:hover {
    background-color: #2E7D32;
    transform: none;
}

.category-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.category-item h3 {
    font-size: 20px;
    color: #4CAF50;
    margin-bottom: 10px;
}

/* Add these styles to make category links look like titles */
.category-item h3 a {
    text-decoration: none;      /* Remove underline */
    color: inherit;             /* Inherit color from h3 */
    cursor: pointer;            /* Pointer cursor on hover */
    transition: color 0.3s ease; /* Smooth color transition */
}

.category-item h3 a:hover {
    color: #45a049;             /* Change color on hover */
}

/* Footer Styling */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 5%;
    text-align: center;
}

footer .social-media {
    margin-top: 20px;
}

footer .social-media a {
    color: #fff;
    margin: 0 10px;
    font-size: 18px;
    text-decoration: none;
    transition: color 0.3s;
}

footer .social-media a:hover {
    color: #4CAF50;
}

/* Back to Home Button */
.back-to-home {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #4CAF50;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.back-to-home:hover {
    background: #45a049;
}

/* Thumbnail Image */
.thumbnail-img {
    max-width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.thumbnail-img:hover {
    transform: scale(1.02);
}

/* Lightbox Styles */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark background */
    z-index: 1000; /* Ensures it is on top */
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: none;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ff0000;
}

/* Poll Section */
.poll-section {
    background: #f4f4f4;
    padding: 30px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    text-align: center;
}

.poll-section h3 {
    font-size: 24px;
    color: #4CAF50;
    margin-bottom: 15px;
    text-align: center;
}

.poll-section form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.poll-section label {
    font-size: 18px;
    margin-bottom: 10px;
    cursor: pointer;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 10px auto;
    text-align: center;
}

.poll-section input[type="radio"] {
    transform: scale(1.2);
    margin-right: 10px;
}

.poll-section button {
    padding: 10px 20px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
    margin: 0 auto;
}

.poll-section button:hover {
    background: #45a049;
}

/* Case Studies Section */
.case-studies {
    background: #f9f9f9;
    padding: 30px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.case-studies h4 {
    font-size: 22px;
    color: #4CAF50;
    margin-top: 20px;
}

.case-studies p {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
}

/* Comments Section */
.comments-section {
    background: #fff;
    padding: 30px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.comments-section h3 {
    font-size: 24px;
    color: #4CAF50;
    margin-bottom: 15px;
    text-align: center;
}

.comment-form {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.comment-form button {
    align-self: flex-end;
    padding: 10px 20px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.comment-form button:hover {
    background: #45a049;
}

.comment {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.comment:last-child {
    border-bottom: none;
}

.comment p {
    font-size: 16px;
    color: #555;
}

/* Poll Results Styling */
.poll-results {
    margin-top: 20px;
    font-size: 16px;
    color: #333;
    text-align: center; /* Center the text */
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    max-width: 600px; /* Optional: Limit the width */
    margin-left: auto;
    margin-right: auto;
}

#poll-results h4 {
    color: #4CAF50;
    margin-bottom: 15px;
}

#poll-results ul {
    list-style-type: disc;
    margin-left: 20px;
    display: inline-block;
    text-align: left;
}

#poll-message {
    margin-top: 15px;
    font-size: 16px;
    text-align: center; /* Center the message */
}

#poll-message p {
    margin: 0;
}

.poll-section h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.poll-section ul {
    padding-left: 20px;
    list-style-type: disc;
}

#results-list {
    list-style: none;
    padding: 0;
    text-align: left;
    display: inline-block;
}

#results-list li {
    margin-bottom: 10px;
    font-size: 16px;
}

/* Main Article Styling */
.main-article {
    margin-bottom: 40px;
}

.main-article, .other-articles {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Tag Filter Button Styling */
.tag-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
}

.tag-filters button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.tag-filters button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

/* Other Articles Section */
.other-articles h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #4CAF50;
}

/* --- Added Styles for Clickable Titles and Images --- */

/* Make article titles clickable without underlines and inherit color */
.main-article h2 a,
.other-articles h3 a {
    text-decoration: none; /* Remove underline */
    color: inherit; /* Inherit color from parent */
    cursor: pointer; /* Show pointer cursor on hover */
    transition: color 0.3s ease;
}

.main-article h2 a:hover,
.other-articles h3 a:hover {
    color: #45a049; /* Change to a lighter green on hover */
}

/* Ensure that the image links are block elements */
.main-article .cartoon a,
.other-articles .cartoon a {
    display: block;
}

/* Optionally, adjust image hover effects if needed */
/* (Existing hover transform already present) */

/* --- End of Added Styles --- */

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    header {
        flex-direction: column;
    }

    .entry-content {
        grid-template-columns: 1fr;
    }

    .entry-description {
        padding: 0;
    }

    .stats-list {
        flex-direction: column;
        align-items: center;
    }

    .stats-list li {
        flex: 1 1 80%;
    }

    .poll-section form {
        width: 100%;
    }

    .poll-section button {
        width: 100%;
    }

    /* Ensure comments section is responsive */
    .comments-section {
        padding: 20px;
    }

    .thumbnail-img {
        width: 100%;
        height: auto;
    }
}
