/* =====================================================
      PREMIUM BLOG SYSTEM — FRONTEND THEME
      Light + Dark Mode | Mobile Responsive
      By: ChatGPT (Custom for Soyal)
======================================================*/

/* -------------------------
   THEME VARIABLES
--------------------------*/
:root {
    --bg: #f6f8fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #2563eb;
    --radius: 14px;
    --shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

[data-theme="dark"] {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --primary: #3b82f6;
    --shadow: 0 5px 15px rgba(255,255,255,0.06);
}

/* -------------------------
   GLOBAL RESET + BASICS
--------------------------*/
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

img { max-width: 100%; display: block; }

/* -------------------------
   CONTAINER
--------------------------*/
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

/* NAVBAR */
.site-header {
    background: var(--card);
    border-bottom: 1px solid #e5e7eb33;
    position: sticky;
    top: 0;
    z-index: 99;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    position: relative;
}

.logo {
    text-decoration: none;
    font-weight: 800;
    font-size: 20px;
    color: var(--text);
}

/* Desktop nav */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}

/* Hamburger button (hidden on PC) */
.menu-btn {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* MOBILE MODE */
@media(max-width: 768px) {

    .menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background: var(--card);
        position: absolute;
        right: 0;
        top: 60px;
        width: 200px;
        padding: 18px;
        border-radius: 12px;
        box-shadow: var(--shadow);
        transition: 0.25s ease;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 10px 0;
    }
}

/* -------------------------
   GRID SYSTEM
--------------------------*/
.grid {
    display: grid;
    gap: 20px;
}

.posts {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* -------------------------
   CARDS
--------------------------*/
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: 0.25s;
}

.card a {
    color: #111;
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
    color: #000;
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
}

/* -------------------------
   META TEXT
--------------------------*/
.meta {
    color: var(--muted);
    font-size: 14px;
    margin-top: 6px;
}

/* -------------------------
   BUTTONS
--------------------------*/
.btn {
    background: var(--primary);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

/* -------------------------
   ADS STYLING (premium)
--------------------------*/
.ad-card {
    padding: 20px;
    border-radius: 16px;
    color: #fff;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: 0 14px 30px rgba(0,0,0,.20);
    transition: .2s;
}

.ad-card:hover { transform: translateY(-4px); }

.ad-card img {
    width: 150px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
}

.ad-content a {
    background: #fff;
    color: #111;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    margin-top: 10px;
}

/* -------------------------
   PAGINATION
--------------------------*/
.pagination {
    display: flex;
    gap: 8px;
    margin: 25px 0;
}

.pagination a {
    padding: 9px 14px;
    background: var(--card);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    transition: .2s;
}

.pagination a:hover {
    background: var(--primary);
    color: #fff;
}

/* -------------------------
   POST PAGE
--------------------------*/
.post-title {
    font-size: 34px;
    font-weight: 800;
    margin: 10px 0 5px;
}

.post-meta {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 25px;
}

.post-content p {
    line-height: 1.75;
    font-size: 17px;
    margin: 18px 0;
}

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--primary);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s linear;
}

/* -------------------------
   AUTHOR BOX
--------------------------*/
.author-hero {
    background: var(--card);
    padding: 35px 25px;
    border-radius: 14px;
    margin-bottom: 35px;
    text-align: center;
    box-shadow: var(--shadow);
}

.author-hero h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
}

.author-socials a {
    display: inline-block;
    margin: 5px;
    padding: 8px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}

/* -------------------------
   CATEGORY PAGE
--------------------------*/
.category-hero {
    background: var(--card);
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.category-list {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
}

.category-chip {
    padding: 16px;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid #e5e7eb44;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    color: var(--text);
    transition: .2s;
}

.category-chip:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* -------------------------
   SPONSORED PAGE
--------------------------*/
.ads-hero {
    text-align: center;
    padding: 40px 20px;
    background: var(--card);
    border-radius: 14px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.ads-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* -------------------------
   FOOTER
--------------------------*/
.site-footer {
    margin-top: 50px;
    padding: 30px 0;
    background: var(--card);
    border-top: 1px solid #e5e7eb33;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-right a {
    margin-left: 15px;
    text-decoration: none;
    color: var(--text);
    transition: .2s;
}
.footer-right a:hover { color: var(--primary); }

/* PREMIUM FOOTER */
.premium-footer {
    background: var(--card);
    padding: 50px 0 40px;
    border-top: 1px solid #e5e7eb33;
    margin-top: 40px;
}

.footer-section {
    text-align: center;
}

.footer-brand h2 {
    font-weight: 800;
    font-size: 26px;
    margin-bottom: 8px;
}

.footer-brand p {
    color: var(--muted);
    margin-bottom: 25px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

.footer-links a {
    color: var(--text);
    font-weight: 600;
    opacity: 0.8;
    transition: .2s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 25px;
    font-size: 22px;
}

.footer-social a {
    opacity: 0.8;
    transition: .2s;
}

.footer-social a:hover {
    opacity: 1;
}

.footer-bottom {
    margin-top: 10px;
    font-size: 14px;
    color: var(--muted);
}

.powered-by {
    margin-top: 5px;
    font-size: 13px;
    opacity: 0.7;
}