/*
 Theme Name:   RBSEADDA
 Author:       Elite WP Developer
 Version:      3.0.0 (Final Fix)
*/

/* ==========================================================================
   1. FIXED HEADER LAYOUT (Desktop)
   ========================================================================== */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    position: relative;
    z-index: 500;
}

.site-header .inside-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 40px;
    box-sizing: border-box; /* Important fix */
}

.site-branding { margin-right: auto; z-index: 20; flex-shrink: 0; }

/* Desktop Menu */
@media (min-width: 1025px) {
    .main-navigation { position: absolute; left: 50%; transform: translateX(-50%); width: auto !important; }
    .main-navigation .main-nav ul { display: flex; gap: 15px; }
    .main-navigation .main-nav ul li a { font-weight: 600; font-size: 15px; color: #333; padding: 0 10px; }
    .hide-on-desktop { display: none; }
}

.menu-bar-items { margin-left: auto; display: flex; gap: 15px; z-index: 999; }
.menu-bar-items a { color: #333; cursor: pointer; }

/* ==========================================================================
   2. TABLET & MOBILE HEADER (The Fix)
   ========================================================================== */
@media (max-width: 1024px) {
    .site-header .inside-header {
        height: 60px;
        padding: 0 15px;
        display: flex;
        flex-wrap: nowrap !important; /* Force single line */
        align-items: center;
        justify-content: space-between;
        position: relative; /* Base for absolute logo */
    }

    /* 1. TOGGLE BUTTON (Left) */
    .main-navigation {
        order: 1; /* First item */
        width: auto !important;
        flex-grow: 0;
        margin: 0 !important;
        float: none !important;
    }
    .main-navigation .menu-toggle {
        display: block;
        width: auto;
        padding: 0;
        font-size: 24px; /* Icon size */
        line-height: 60px; /* Vertically center */
    }
    .mobile-menu { display: none; } /* Hide text */

    /* 2. LOGO (Absolute Center) */
    .site-branding {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0 !important;
        z-index: 10; /* Behind menu dropdown */
        width: auto;
        max-width: 60%; /* Prevent overlap */
        text-align: center;
        order: 0; /* Ignored due to absolute, but good practice */
    }
    .site-logo img, .header-image {
        max-height: 40px; /* Limit height */
        width: auto;
        vertical-align: middle;
    }

    /* 3. SEARCH ICON (Right) */
    .menu-bar-items {
        order: 3; /* Last item */
        margin: 0 !important;
        flex-grow: 0;
    }
}

/* ==========================================================================
   3. TABLET SUB-MENU (Below Header)
   ========================================================================== */
.rbse-tablet-sub-menu {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 8px 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rbse-tablet-sub-menu::-webkit-scrollbar { display: none; }

.rbse-scroll-menu {
    display: flex;
    margin: 0;
    padding: 0 15px;
    list-style: none;
}
.rbse-scroll-menu li { margin-right: 10px; }
.rbse-scroll-menu li a {
    display: block;
    padding: 5px 12px;
    background: #f1f5f9;
    color: #444;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.rbse-scroll-menu li.current-menu-item a { background: #e0f2fe; color: #1a73e8; }

/* ==========================================================================
   4. SEARCH OVERLAY
   ========================================================================== */
.rbse-search-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.98); z-index: 99999; opacity: 0; visibility: hidden; transition: 0.2s; display: flex; justify-content: center; padding-top: 80px; }
.rbse-search-overlay.open { opacity: 1; visibility: visible; }
.search-capsule { display: flex; align-items: center; background: #f8f9fa; border: 1px solid #eee; border-radius: 50px; padding: 10px 20px; width: 90%; max-width: 600px; height: 55px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.search-capsule input { border: none; background: transparent; flex-grow: 1; padding: 0 10px; font-size: 17px; outline: none; }
.close-search-btn { position: absolute; top: 20px; right: 20px; border: none; background: none; font-size: 35px; cursor: pointer; color: #333; }

/* ==========================================================================
   5. BLOG LAYOUT (Card Style)
   ========================================================================== */
.cat-links, .tags-links, .comments-link { display: none !important; }
.blog .type-post, .archive .type-post { margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 30px; }
.blog .type-post:last-child { border: none; }

/* Desktop Grid */
@media (min-width: 769px) {
    .blog .inside-article, .archive .inside-article { display: grid; grid-template-columns: 260px 1fr; gap: 30px; position: relative; padding: 0 !important; }
    .blog .post-image, .archive .post-image { grid-row: 1 / 5; margin: 0 !important; height: 180px; border-radius: 8px; overflow: hidden; }
    .blog .post-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
    .blog .inside-article:hover .post-image img { transform: scale(1.05); }
    .rbse-cat-badge { position: absolute; top: 10px; left: 10px; background: #dbeafe; color: #1e40af; font-size: 10px; font-weight: 800; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; z-index: 10; pointer-events: none; }
    .entry-title { font-size: 20px; font-weight: 800; margin: 0 0 5px 0; line-height: 1.3; }
    .entry-summary { font-size: 15px; color: #555; line-height: 1.6; margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .entry-meta { display: flex; align-items: center; font-size: 12px; color: #888; font-weight: 600; text-transform: uppercase; margin-top: auto; }
}

/* Mobile Stack */
@media (max-width: 768px) {
    .blog .post-image { margin-bottom: 15px !important; border-radius: 8px; overflow: hidden; }
    .rbse-cat-badge { position: absolute; top: 10px; left: 10px; background: #dbeafe; color: #1e40af; padding: 4px 10px; font-size: 10px; font-weight: 800; border-radius: 20px; }
    .entry-title { font-size: 18px; margin-bottom: 5px; }
    .entry-meta { font-size: 11px; margin-top: 10px; }
}

.meta-avatar img { width: 24px; height: 24px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.posted-on::before { content: "|"; margin-right: 8px; color: #ddd; }

/* ==========================================================================
   6. PAGINATION & ADS
   ========================================================================== */
.nav-links { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.nav-links .page-numbers { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid #eee; border-radius: 50%; color: #555; text-decoration: none; font-weight: 700; transition: 0.3s; }
.nav-links .page-numbers.current, .nav-links .page-numbers:hover { background: #1a73e8; border-color: #1a73e8; color: #fff; }
.nav-links svg { width: 16px; height: 16px; stroke-width: 2.5; }

.rbseadda-ad-slot { background: #f1f5f9; border: 1px dashed #cbd5e1; padding: 20px; text-align: center; color: #64748b; font-size: 12px; margin: 20px 0; }
.rbseadda-author-box { background: #f9f9f9; padding: 20px; margin-top: 30px; border-left: 3px solid #1a73e8; }
.rbseadda-breadcrumbs { font-size: 13px; color: #777; margin-bottom: 20px; }
.sidebar .widget-title { font-size: 16px; font-weight: 700; margin-bottom: 20px; text-transform: uppercase; border-bottom: 2px solid #1a73e8; display: inline-block; padding-bottom: 5px; }