/* ========== GLOBAL ========== */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #85c6ae;
    color: #333;
    overflow-x: hidden;
}

/* ========== HEADER ========== */
header {
    background-color: #85c6ae;
    color: white;
    display: flex;
    align-items: center;
    padding: 15px 10px;
    justify-content: space-between;
    flex-wrap: wrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
header img.logo { max-width: 80px; height: auto; margin-right: 10px; }
.header-title { flex-grow: 1; text-align: center; font-size: 32px; }
.top-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.top-links a { color: #0b3b5f; text-decoration: none; font-weight: 600; padding: 10px 12px; border-radius: 8px; }
.top-links a:hover { text-decoration: underline; }

/* ========== MAIN LAYOUT (3 columns) ========== */
main {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Left Sidebar */
.sidebar-left-nav {
    width: 22%;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 82vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    order: 1;
}
/* Right Sidebar */
.sidebar-right-nav {
    width: 22%;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 82vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    order: 3;
}
/* Content area */
.content {
    width: 52%;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
    order: 2;
}

/* Sidebar links */
.sidebar-left-nav a, .sidebar-right-nav a {
    display: block;
    color: #0b3b5f;
    text-decoration: none;
    padding: 10px;
    margin: 5px 0;
    border-radius: 8px;
    transition: 0.2s;
}
.sidebar-left-nav a:hover, .sidebar-right-nav a:hover {
    background-color: #85c6ae;
    color: white;
}
.sidebar-left-nav h2, .sidebar-right-nav h2 {
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    border-bottom: 2px solid #85c6ae;
    padding-bottom: 5px;
}
.sidebar-note {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0b3b5f;
    background: #edf7f3;
    border: 1px solid #c8e7dc;
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 10px;
}
.sidebar-left-nav a, .sidebar-right-nav a {
    line-height: 1.35;
}
.sidebar-left-nav::-webkit-scrollbar, .sidebar-right-nav::-webkit-scrollbar {
    width: 8px;
}
.sidebar-left-nav::-webkit-scrollbar-thumb, .sidebar-right-nav::-webkit-scrollbar-thumb {
    background: #b6d8cb;
    border-radius: 999px;
}
.sidebar-left-nav::-webkit-scrollbar-track, .sidebar-right-nav::-webkit-scrollbar-track {
    background: #f3f7f5;
}

/* Affiliate box */
.affiliate-box { margin-top: 20px; }
.affiliate-links { display: flex; flex-wrap: wrap; gap: 8px; }
.affiliate-btn {
    background: #0b3b5f;
    color: white !important;
    padding: 8px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
}
.affiliate-btn:hover { background: #1b5a7a; }

/* ========== TABLES & TYPOGRAPHY ========== */
h1 { font-size: 28px; margin-bottom: 15px; }
h2 { font-size: 22px; margin-top: 25px; margin-bottom: 10px; }
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    display: block;
    overflow-x: auto;
}
th, td { border: 1px solid #ddd; padding: 10px; text-align: left; }
th { background-color: #85c6ae; color: white; }

/* ========== BACKLINKS ========== */
.dynamic-backlinks { list-style: none; padding: 0; margin: 20px 0; }
.dynamic-backlinks li { margin: 10px 0; }
.dynamic-backlinks a {
    background: #f0f7ff;
    padding: 10px 18px;
    border-radius: 40px;
    text-decoration: none;
    color: #0b3b5f;
    border: 1px solid #cbd5e1;
    display: inline-block;
}

/* ========== ADS ========== */
.ad-box { min-height: 280px; margin: 15px 0; text-align: center; }
.ad-responsive-container {
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    padding: 0 10px;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
}
.ad-responsive-container ins {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    min-height: 90px;
}
.ad-responsive-container.ad-header {
    max-width: 1400px;
}

/* ========== FOOTER ========== */
footer { background-color: #333; color: white; text-align: center; padding: 15px; margin-top: 30px; }

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 992px) {
    .sidebar-left-nav, .sidebar-right-nav, .content {
        width: 100%;
    }
    main {
        flex-direction: column;
    }
    .content { order: 1; }
    .sidebar-left-nav { order: 2; }
    .sidebar-right-nav { order: 3; }
    .sidebar-left-nav, .sidebar-right-nav {
        max-height: 40vh;
    }
}
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    header img.logo {
        max-width: 60px;
        margin-right: 0;
    }
    .header-title {
        font-size: 24px;
        text-align: left;
    }
    .top-links {
        justify-content: flex-start;
    }
    .top-links a {
        font-size: 12px;
        padding: 6px 8px;
    }
    .content {
        padding: 14px;
        border-radius: 10px;
    }
    .sidebar-left-nav, .sidebar-right-nav {
        max-height: 40vh;
        padding: 12px;
        margin-top: 0;
    }
    table { font-size: 14px; }
    h1 { font-size: 24px; }
    h2 { font-size: 19px; }
    .ad-responsive-container {
        padding: 0 4px;
        margin: 14px auto;
    }
}
