/* =============================================
   MOBITREX.ONLINE - COMPLETE STYLESHEET
   ============================================= */

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f4f6f9;
    color: #1a202c;
    line-height: 1.7;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    transition: 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
    background: #131921;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.logo a {
    color: #ff9900;
    font-size: 32px;
    font-weight: 700;
}

.logo a i {
    color: #ff9900;
}

.search-box {
    flex: 1;
    max-width: 700px;
}

.search-box form {
    display: flex;
}

.search-box input {
    width: 100%;
    padding: 12px;
    border: none;
    outline: none;
    font-size: 15px;
    border-radius: 6px 0 0 6px;
}

.search-box button {
    background: #febd69;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 0 6px 6px 0;
}

/* ===== MOBILE MENU BUTTON ===== */
.menu-toggle {
    display: none;
    background: #232f3e;
    color: #fff;
    border: none;
    padding: 14px;
    width: 100%;
    font-size: 18px;
    cursor: pointer;
}

/* ===== NAVIGATION ===== */
.navbar {
    background: #232f3e;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.navbar ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.navbar li {
    position: relative;
}

.navbar li a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-weight: 600;
}

.navbar li a i {
    margin-right: 8px;
}

.navbar li:hover {
    background: #37475a;
}

/* ===== DROPDOWN ===== */
.dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: #fff;
    min-width: 260px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
}

.dropdown li {
    width: 100%;
}

.dropdown li a {
    color: #222;
    padding: 14px 18px;
}

.dropdown li a:hover {
    background: #f3f5f8;
}

.has-dropdown:hover .dropdown {
    display: block;
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
    display: flex;
    gap: 5px;
    align-items: flex-start;
    background: #f4f6f9;
    margin: 0;
    padding: 0;
}

/* ===== LEFT SIDEBAR ===== */
.left-sidebar {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

/* ===== RIGHT SIDEBAR ===== */
.right-sidebar {
    width: 300px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

/* ===== CONTENT ===== */
.content {
    flex: 1;
    min-width: 0;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin: 0;
}

.content h1 {
    font-size: 34px;
    margin-bottom: 20px;
}

.content h2 {
    margin: 30px 0 15px;
    font-size: 28px;
}

.content h3 {
    margin: 25px 0 12px;
}

.content p {
    margin-bottom: 18px;
}

.content ul,
.content ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

/* ===== SIDEBAR BOX (Common) ===== */
.sidebar-box {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.sidebar-title {
    background: #0d6efd;
    color: #fff;
    padding: 14px 18px;
    font-weight: 700;
    font-size: 16px;
}

.sidebar-title i {
    margin-right: 10px;
}

.sidebar-box ul {
    list-style: none;
}

.sidebar-box li {
    border-bottom: 1px solid #eee;
}

.sidebar-box li:last-child {
    border-bottom: none;
}

.sidebar-box li a {
    display: block;
    padding: 12px 18px;
    color: #333;
    font-size: 14px;
}

.sidebar-box li a:hover {
    background: #f4f8ff;
    color: #0d6efd;
    padding-left: 22px;
}

.sidebar-box li a i {
    margin-right: 8px;
    color: #0d6efd;
}

/* ===== ADS ===== */
.ad-box {
    background: #fff;
    height: 280px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, #131921, #232f3e);
    color: #fff;
    padding: 50px 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.hero-section h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
}

.hero-section p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 25px;
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-block;
    padding: 14px 38px;
    background: #ff9900;
    color: #111;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #e88a00;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 153, 0, 0.4);
}

button,
.btn {
    background: #ff9900;
    color: #111;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-weight: 700;
    border-radius: 6px;
}

button:hover,
.btn:hover {
    opacity: 0.9;
}

/* ===== POSTS GRID ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border-color: #ff9900;
}

.post-card-content {
    padding: 22px;
}

.post-card-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.post-card-content h3 a {
    color: #1a202c;
    transition: color 0.3s ease;
}

.post-card-content h3 a:hover {
    color: #ff9900;
}

.post-card-content p {
    color: #718096;
    font-size: 14px;
    margin-bottom: 14px;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: #a0aec0;
    margin-bottom: 14px;
}

.post-meta i {
    margin-right: 4px;
    color: #0d6efd;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0d6efd;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 14px;
    color: #ff9900;
}

.featured-posts h2,
.latest-posts h2 {
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1a202c;
}

.featured-posts h2 i {
    color: #ff9900;
}

.latest-posts h2 i {
    color: #0d6efd;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th {
    background: #0d6efd;
    color: #fff;
    padding: 12px;
    text-align: left;
}

table td {
    padding: 12px;
    border: 1px solid #ddd;
}

table tr:nth-child(even) {
    background: #f8f9fb;
}

/* ===== CODE BOX ===== */
pre {
    background: #111827;
    color: #fff;
    padding: 20px;
    overflow: auto;
    border-radius: 10px;
    margin: 20px 0;
}

code {
    background: #edf2f7;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #2d3748;
}

/* ===== FOOTER ===== */
footer {
    background: #111827;
    color: #fff;
    margin-top: 40px;
    padding: 40px 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #fff;
    font-size: 14px;
}

.footer-links a:hover {
    color: #ff9900;
}

.visitor-counter {
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
}

footer p {
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 50px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* ===== RESPONSIVE - TABLET ===== */
@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
    }

    .left-sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        order: 2;
    }

    .content {
        order: 1;
    }

    .right-sidebar {
        width: 100%;
        order: 3;
    }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .logo {
        text-align: center;
    }

    .search-box {
        max-width: 100%;
    }

    .navbar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100%;
        overflow: auto;
        transition: 0.3s;
        z-index: 99999;
        background: #232f3e;
    }

    .navbar.show-menu {
        left: 0;
    }

    .navbar ul {
        flex-direction: column;
    }

    .dropdown {
        display: block;
        position: static;
        background: #2f3b4c;
        box-shadow: none;
    }

    .dropdown li a {
        color: #fff;
        padding-left: 35px;
    }

    .content {
        padding: 20px;
    }

    .content h1 {
        font-size: 28px;
    }

    .content h2 {
        font-size: 24px;
    }

    .hero-section {
        padding: 35px 25px;
    }

    .hero-section h1 {
        font-size: 30px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .right-sidebar {
        width: 100%;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== RESPONSIVE - SMALL MOBILE ===== */
@media (max-width: 480px) {
    .content {
        padding: 15px;
    }

    .logo a {
        font-size: 28px;
    }

    .search-box input {
        font-size: 14px;
    }

    .hero-section h1 {
        font-size: 24px;
    }

    .hero-section {
        padding: 25px 18px;
    }

    .post-card-content {
        padding: 18px;
    }

    .post-card-content h3 {
        font-size: 16px;
    }
}

/* ===== FORCE FIXES ===== */
body {
    margin: 0 !important;
    padding: 0 !important;
}

html {
    margin: 0 !important;
    padding: 0 !important;
}

.main-layout {
    display: flex !important;
    gap: 5px !important;
    align-items: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #f4f6f9;
}

.left-sidebar {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

/* ===== VISITOR COUNTER ===== */
.visitor-counter {
    text-align: center;
    margin: 15px 0;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.visitor-counter i {
    margin-right: 8px;
}

.visitor-counter strong {
    color: #ff9900;
    font-weight: 700;
}

.visitor-counter .divider {
    color: #555;
    margin: 0 10px;
}