/* BASIC RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f8f9fa;
    font-family: Arial, sans-serif;
    color: #202122;
    line-height: 1.6;
}

/* GLOBAL CONTAINER */
.wiki-container, .container {
    width: 95%;
    max-width: 1100px;
    margin: 20px auto;
}

/* --------------------------------------
   HEADER (Wikipedia style)
--------------------------------------- */
.wiki-header {
    background: #fff;
    border-bottom: 1px solid #ccc;
}

.wiki-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.wiki-logo {
    font-size: 28px;
    font-weight: bold;
    color: #202122;
    text-decoration: none;
}

/* Search */
.wiki-search input {
    width: 280px;
    padding: 8px;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-size: 15px;
}

/* NAVIGATION */
.wiki-nav {
    background: #f3f3f3;
    border-top: 1px solid #ccc;
    padding: 8px 0;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.wiki-nav a {
    color: #0645ad;
    text-decoration: none;
    font-size: 15px;
    padding: 2px 0;
}

.wiki-nav a:hover {
    text-decoration: underline;
}

/* --------------------------------------
   FOOTER (Wikipedia style)
--------------------------------------- */
.wiki-footer {
    margin-top: 50px;
    padding: 40px 0;
    background: #f8f9fa;
    border-top: 1px solid #ccc;
}

.wiki-footer-grid {
    width: 95%;
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
    gap: 25px;
}

.wiki-footer h3, .wiki-footer h4 {
    margin-bottom: 10px;
    color: #202122;
}

.wiki-footer a {
    color: #0645ad;
    text-decoration: none;
    margin: 5px 0;
    display: block;
}

.wiki-footer a:hover {
    text-decoration: underline;
}

.wiki-copy {
    text-align: center;
    margin-top: 20px;
    color: #555;
    font-size: 14px;
}

/* --------------------------------------
   HOMEPAGE
--------------------------------------- */
.wiki-home-search input {
    width: 90%;
    max-width: 480px;
    padding: 12px;
    border: 1px solid #aaa;
    border-radius: 5px;
    font-size: 16px;
    margin: 12px auto;
}

.wiki-home-title {
    font-size: 24px;
    font-weight: bold;
    color: #202122;
    margin: 25px 0 12px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4px;
}

/* Categories Grid */
.wiki-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.wiki-cat-box {
    border: 1px solid #ccc;
    padding: 12px;
    background: #fff;
    text-align: center;
    color: #0645ad;
    text-decoration: none;
    border-radius: 4px;
}

.wiki-cat-box:hover {
    background: #e8e8e8;
}

/* Latest Guides Grid */
.wiki-article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.wiki-article-card {
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 4px;
}

.wiki-article-card h3 a {
    color: #0645ad;
    text-decoration: none;
}

.wiki-article-card h3 a:hover {
    text-decoration: underline;
}

.wiki-article-card p {
    margin-top: 8px;
    color: #444;
    font-size: 14px;
}

/* --------------------------------------
   CATEGORY PAGE
--------------------------------------- */
.category-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: #202122;
    font-weight: bold;
    border-bottom: 2px solid #ccc;
    padding-bottom: 8px;
}

.category-list-item {
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

.category-list-item a {
    font-size: 17px;
    color: #0645ad;
    text-decoration: none;
}

.category-list-item a:hover {
    text-decoration: underline;
}

/* --------------------------------------
   ARTICLE PAGE
--------------------------------------- */
.article-title {
    font-size: 32px;
    font-weight: bold;
    color: #202122;
    margin-bottom: 10px;
}

.article-meta {
    font-size: 14px;
    color: #54595d;
}

/* Article Content */
.article-content {
    font-size: 17px;
    color: #202122;
    margin-top: 15px;
}

.article-content h2 {
    font-size: 24px;
    margin-top: 25px;
    margin-bottom: 10px;
}

.article-content h3 {
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 8px;
}

.article-content p {
    margin-bottom: 14px;
}

.article-content ul, .article-content ol {
    margin: 15px 0 15px 30px;
}

/* Tables (Wikipedia style) */
.article-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
}

.article-content th, .article-content td {
    border: 1px solid #ccc;
    padding: 10px;
}

.article-content th {
    background: #f3f3f3;
}

/* --------------------------------------
   SEARCH PAGE
--------------------------------------- */
.search-title {
    font-size: 26px;
    margin-bottom: 18px;
}

.search-result {
    margin-bottom: 18px;
}

.search-result a {
    font-size: 18px;
    color: #0645ad;
    text-decoration: none;
}

.search-result a:hover {
    text-decoration: underline;
}

.search-result p {
    color: #555;
}

/* --------------------------------------
   SIDEBAR (Optional)
--------------------------------------- */
.sidebar {
    width: 270px;
    background: #fff;
    padding: 15px;
    border: 1px solid #ccc;
    height: fit-content;
}

.sidebar h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.sidebar a {
    display: block;
    color: #0645ad;
    text-decoration: none;
    margin: 6px 0;
}

.sidebar a:hover {
    text-decoration: underline;
}

/* --------------------------------------
   MOBILE OPTIMIZATION
--------------------------------------- */
@media(max-width: 768px) {

    .wiki-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .wiki-search input {
        width: 100%;
    }

    .wiki-nav {
        justify-content: center;
        gap: 10px;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
}
.comment-box {
    background: #fff;
    border: 1px solid #ccc;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.comment-form input, 
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #aaa;
    border-radius: 4px;
    margin-bottom: 10px;
}

.comment-form button {
    padding: 10px 18px;
    background: #0645ad;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.comment-form button:hover {
    background: #083b8c;
}
/* ===============================
   GUEST POST (VIP ADMIN-STYLE)
================================*/

/* Main box */
.guestpost-box {
    background: #fff;
    border: 1px solid #d0d0d0;
    padding: 25px;
    border-radius: 8px;
    max-width: 850px;
    margin: 35px auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Title */
.guestpost-box h1 {
    font-size: 28px;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ccc;
    color: #202122;
    font-weight: bold;
}

/* Labels */
.guestpost-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #202122;
}

/* Inputs + Select */
.guestpost-box input[type="text"],
.guestpost-box select,
.guestpost-box textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #a2a9b1;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 16px;
    color: #222;
    font-family: inherit;
}

/* Textarea height */
.guestpost-box textarea {
    min-height: 180px;
}

/* Button */
.guestpost-box button {
    background: #0645ad;
    color: #fff;
    padding: 12px 22px;
    border: none;
    border-radius: 6px;
    font-size: 17px;
    cursor: pointer;
    transition: 0.2s;
}

.guestpost-box button:hover {
    background: #083a8a;
}

/* Success Message */
.guest-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 15px;
}

/* Error Message */
.guest-error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 15px;
}

/* Placeholder styling */
.guestpost-box input::placeholder,
.guestpost-box textarea::placeholder {
    color: #888;
}

/* Mobile Responsive */
@media(max-width: 600px) {
    .guestpost-box {
        padding: 18px;
    }
    .guestpost-box h1 {
        font-size: 24px;
    }
    .guestpost-box button {
        width: 100%;
        padding: 14px;
    }
}
.wiki-article-card {
    background: #fff;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #eee;
    transition: .2s;
    overflow: hidden; /* VERY IMPORTANT */
}

.wiki-article-thumb {
    width: 100%;
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    display: block; /* Fix image shifting */
}

/* Mobile Fix */
@media(max-width: 600px){
    .wiki-article-card {
        padding: 10px;
    }

    .wiki-article-thumb {
        height: 130px;
        border-radius: 6px;
    }
}
.article-feature-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 12px 0;
    display: block;
}

.article-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
}

.article-cat {
    font-size: 14px;
    margin-bottom: 15px;
}

.article-cat a {
    color: #007bff;
    text-decoration: none;
}

.article-content img {
    max-width: 100%;
    height: auto;
}
.related-title {
    margin-top: 40px;
    font-size: 22px;
    font-weight: 700;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 15px;
}

.related-card {
    display: block;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    transition: transform 0.2s;
}

.related-card:hover {
    transform: translateY(-3px);
}

.related-img-box img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.related-info {
    padding: 8px 10px;
}

.related-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
}

.related-info p {
    font-size: 13px;
    color: #666;
    line-height: 1.4em;
}
