/* --- RESET & GLOBAL VARIABLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand-blue: #0d6efd;
    --brand-blue-hover: #0b5ed7;
    --brand-gold: #ffc107;
    --bg-light: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #666666;
    --link-blue: #133c9d;
}

html, body {
    min-height: 100%;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text-main);
}

/* --- MAIN LAYOUT --- */
.container {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* LEFT & RIGHT SIDE PERCENTAGES */
.main {
    width: 70%;
}

.sidebar {
    width: 30%;
}

/* --- CATEGORY BOXES --- */
.categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.cat-box {
    flex: 1;
    background: var(--card-bg);
    padding: 18px;
    text-align: center;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cat-box a {
    text-decoration: none;
    color: var(--text-main);
    display: block;
    width: 100%;
    height: 100%;
}

/* --- HEADINGS --- */
.section-heading {
    font-size: 24px;
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 700;
}

/* --- CARDS --- */
.card {
    background: var(--card-bg);
    padding: 18px 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.4;
}

.card h3 a {
    color: var(--link-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.card h3 a:hover {
    color: #000000;
    text-decoration: underline;
}

.card-date {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.card p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
}

.empty-card {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 8px 14px;
    background: var(--brand-blue);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover {
    background: var(--brand-blue-hover);
    color: #ffffff;
}

.btn:active {
    transform: scale(0.98);
}

/* --- SIDEBAR COMPONENTS (For consistency with index styling) --- */
.sidecard {
    background: var(--card-bg);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidecard h3 {
    margin-bottom: 12px;
    font-size: 18px;
    color: var(--text-main);
}

.telegram {
    background: #0088cc;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 136, 204, 0.3);
}

.telegram .btn {
    background: #ffffff;
    color: #0088cc;
    font-weight: bold;
    margin-top: 10px;
}

.whatsapp {
    background: #25D366;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.wa-btn {
    background: #ffffff;
    color: #25D366;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
}


/* ========================================================
   --- TABLET RESPONSIVE (Max-Width: 1024px) --- 
======================================================== */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
        gap: 15px;
    }

    .main {
        width: 65%;
    }

    .sidebar {
        width: 35%;
    }

    .categories {
        flex-wrap: wrap;
        gap: 8px;
    }

    .cat-box {
        flex: 1 1 calc(50% - 8px); /* 2x2 Grid on tablets */
        padding: 14px;
    }

    .card {
        padding: 15px;
    }

    .card h3 {
        font-size: 17px;
    }
}


/* ========================================================
   --- MOBILE RESPONSIVE (Max-Width: 540px) --- 
======================================================== */
@media (max-width: 540px) {
    .container {
        flex-direction: column;
        padding: 10px;
        gap: 15px;
    }

    .main,
    .sidebar {
        width: 100%;
    }

    /* Stack Category Boxes 2 per row for better tapping on mobile */
    .categories {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 15px;
    }

    .cat-box {
        padding: 15px 10px;
        font-size: 14px;
    }

    .section-heading {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .card {
        padding: 14px 12px;
        margin-bottom: 12px;
    }

    .card h3 {
        font-size: 16px;
    }

    .card-date {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .btn {
        width: 100%; /* Full width action button on phones */
        text-align: center;
        padding: 10px;
    }
}