/* =========================================================
   ROMSNS.NET - ULTIMATE MASTER CSS (ALL-IN-ONE CONSOLIDATED)
   ========================================================= */

/* ---------------------------------------------------------
   1. GLOBAL LAYOUT & CONTAINER BOUNDS
   --------------------------------------------------------- */
.inside-article,
.site-main,
.grid-container,
.content-area {
    max-width: 1200px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

body .grid-container,
body .inside-article,
body .content-area {
    max-width: 1200px !important;
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* ---------------------------------------------------------
   COMPACT & PREMIUM NAVIGATION MENU (SLIM HEIGHT FIX)
   --------------------------------------------------------- */
.main-navigation {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    position: relative !important;
    z-index: 9999 !important;
    min-height: 56px !important; /* Compact header height */
    max-height: 60px !important;
}

.main-navigation .inside-navigation {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    min-height: 56px !important;
}

.main-navigation .main-nav ul {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    gap: 4px !important;
}

.main-navigation .main-nav ul li {
    position: relative !important;
}

.main-navigation .main-nav ul li a {
    color: #1e293b !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    padding: 8px 12px !important; /* Reduced vertical padding */
    line-height: 1.4 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li:hover > a {
    color: #e50914 !important;
    background: #f8fafc !important;
}

/* Premium Dropdown Sub-menu List */
.main-navigation .main-nav ul ul {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    display: none !important;
    flex-direction: column !important;
    min-width: 200px !important;
    padding: 6px 0 !important;
    margin-top: 2px !important;
    z-index: 99999 !important;
}

.main-navigation .main-nav ul li:hover > ul {
    display: flex !important;
}

.main-navigation .main-nav ul ul li {
    width: 100% !important;
}

.main-navigation .main-nav ul ul li a {
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    white-space: nowrap !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-radius: 0 !important;
    transition: all 0.2s ease !important;
}

.main-navigation .main-nav ul ul li:last-child a {
    border-bottom: none !important;
}

.main-navigation .main-nav ul ul li a:hover {
    background: #f8fafc !important;
    color: #e50914 !important;
    padding-left: 20px !important;
}

/* Dark Mode Navigation Support */
html.romsns-dark .main-navigation {
    background-color: #0b0f17 !important;
    border-bottom-color: #1e293b !important;
}

html.romsns-dark .main-navigation .main-nav ul li a {
    color: #cbd5e1 !important;
}

html.romsns-dark .main-navigation .main-nav ul li a:hover,
html.romsns-dark .main-navigation .main-nav ul li:hover > a {
    color: #ff3045 !important;
    background: #1e293b !important;
}

html.romsns-dark .main-navigation .main-nav ul ul {
    background: #131924 !important;
    border-color: #1e293b !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}

html.romsns-dark .main-navigation .main-nav ul ul li a {
    color: #94a3b8 !important;
    border-bottom-color: #1e293b !important;
}

html.romsns-dark .main-navigation .main-nav ul ul li a:hover {
    background: #1e293b !important;
    color: #ff3045 !important;
}

/* ---------------------------------------------------------
   2. TOP HERO SECTION & SEARCH FILTER BOX (HOMEPAGE)
   --------------------------------------------------------- */
.romsns-forced-full-wrapper {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto 30px auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    grid-column: 1 / -1 !important;
}

@media (max-width: 768px) {
    .romsns-forced-full-wrapper {
        padding: 0 15px !important;
    }
}

.romsns-main-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 10px 0 20px;
    padding: 0;
    width: 100%;
}

.romsns-main-title-wrap .title-line {
    width: 55px;
    height: 1px;
    background: #d1d5db;
    display: block;
    flex-shrink: 0;
}

.main-hero-heading {
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 30px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #111827;
}

.main-hero-heading .highlight-red {
    color: #e50914;
}

.homepage-search-filter-section {
    width: 100%;
    margin: 0 0 25px 0;
    position: relative;
    box-sizing: border-box;
    text-align: center;
}

#live-search-form {
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

#live-search-form input {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 50px;
    outline: none;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#live-search-form input:focus {
    border-color: #e50914;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.15);
}

.category-pills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.cat-pill {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cat-pill:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}

.romsns-hero-p {
    margin: 0 0 16px 0;
    padding: 0;
    color: #4b5563;
    font-size: 15.5px;
    line-height: 1.8;
    font-weight: 400;
}

.romsns-hero-p strong {
    color: #111827;
}

.romsns-p-last {
    margin-bottom: 28px !important;
}

.popular-roms-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 5px 0;
    padding: 0;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
    color: #111827;
}

.popular-roms-heading .flash-icon {
    color: #ff3045;
    font-size: 24px;
}

.popular-roms-subtitle {
    margin: 0;
    padding: 0 0 14px 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    border-bottom: 1px solid #e5e7eb;
}

.popular-roms-subtitle span {
    color: #e50914;
    font-weight: 600;
}

/* ---------------------------------------------------------
   3. HIDE SIDEBARS & THEME HEADERS ON SEARCH/ARCHIVES
   --------------------------------------------------------- */
body.search #right-sidebar,
body.search #left-sidebar,
body.archive #right-sidebar,
body.archive #left-sidebar {
    display: none !important;
}

body.search .site-content,
body.search .content-area,
body.search #primary,
body.archive .site-content,
body.archive .content-area,
body.archive #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* ---------------------------------------------------------
   4. UNIVERSAL 4-COLUMN GRID (HOME, SEARCH, ARCHIVES)
   --------------------------------------------------------- */
.custom-home-posts-grid,
body.search .site-main,
body.archive .site-main {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 22px 16px !important;
    max-width: 1200px !important;
    margin: 25px auto !important;
    padding: 0 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
    clear: both !important;
}

@media (max-width: 1024px) {
    .custom-home-posts-grid, 
    body.search .site-main, 
    body.archive .site-main {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .custom-home-posts-grid, 
    body.search .site-main, 
    body.archive .site-main {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px 12px !important;
    }
}

/* ---------------------------------------------------------
   5. CARD OUTER RESET & HOVER LIFT ANIMATIONS
   --------------------------------------------------------- */
.custom-home-posts-grid article,
body.search .site-main > article,
body.archive .site-main > article {
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.custom-home-posts-grid article:hover,
body.search article:hover,
body.archive article:hover {
    transform: translateY(-4px) !important;
}

.custom-home-posts-grid article .inside-article,
body.search .site-main > article .inside-article,
body.archive .site-main > article .inside-article {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Hide Unwanted Card Metadata */
.custom-home-posts-grid article .entry-meta,
.custom-home-posts-grid article .entry-summary,
.custom-home-posts-grid article .entry-content,
.custom-home-posts-grid article .entry-footer,
.custom-home-posts-grid article .my-post-categories,
body.search article .entry-meta,
body.search article .entry-summary,
body.search article .entry-content,
body.search article .entry-footer,
body.archive article .entry-meta,
body.archive article .entry-summary,
body.archive article .entry-content,
body.archive article .entry-footer {
    display: none !important;
}

/* ---------------------------------------------------------
   6. FEATURED IMAGE CONTAINER & BADGES SYNC
   --------------------------------------------------------- */
.custom-home-posts-grid article .post-thumbnail,
.custom-home-posts-grid article .featured-image,
body.search .site-main > article .post-thumbnail,
body.search .site-main > article .featured-image,
body.archive .site-main > article .post-thumbnail,
body.archive .site-main > article .featured-image,
.romsns-thumb-wrapper {
    order: 1 !important;
    position: relative !important;
    width: 100% !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: transparent !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.custom-home-posts-grid article .post-thumbnail img,
body.search article .post-thumbnail img,
body.archive article .post-thumbnail img,
.custom-home-posts-grid article .featured-image img,
body.search article .featured-image img,
body.archive article .featured-image img,
.romsns-thumb-wrapper img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    border: none !important;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.custom-home-posts-grid article:hover .post-thumbnail img,
body.search article:hover .post-thumbnail img,
body.archive article:hover .post-thumbnail img {
    transform: scale(1.06) !important;
}

.custom-home-posts-grid article:hover .romsns-badge-dl,
body.search article:hover .romsns-badge-dl,
body.archive article:hover .romsns-badge-dl {
    transform: scale(1.12) !important;
    background: #ff1e27 !important;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.6) !important;
}

/* ---------------------------------------------------------
   7. BOLD DARK CARD TITLES (CENTER ALIGNED)
   --------------------------------------------------------- */
.custom-home-posts-grid article .entry-header,
body.search .site-main > article .entry-header,
body.archive .site-main > article .entry-header {
    order: 2 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-home-posts-grid .entry-title,
body.search .site-main > article .entry-title,
body.archive .site-main > article .entry-title {
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.custom-home-posts-grid .entry-title a,
body.search .site-main > article .entry-title a,
body.archive .site-main > article .entry-title a {
    color: #0f172a !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.custom-home-posts-grid .entry-title a:hover,
body.search .site-main > article .entry-title a:hover,
body.archive .site-main > article .entry-title a:hover {
    color: #e50914 !important;
}

/* Dark Mode Title Styling */
html.romsns-dark .custom-home-posts-grid .entry-title a,
html.romsns-dark body.search .entry-title a,
html.romsns-dark body.archive .entry-title a {
    color: #f8fafc !important;
}

/* ---------------------------------------------------------
   8. CLEAN TRANSPARENT & CENTERED PAGINATION
   --------------------------------------------------------- */
.home .site-main .navigation,
.home .site-main .pagination,
.home .site-main .paging-navigation,
.search .site-main .navigation,
.search .site-main .pagination,
.search .site-main .paging-navigation,
.archive .site-main .navigation,
.archive .site-main .pagination,
.archive .site-main .paging-navigation,
.site-main .navigation,
.site-main .pagination,
.site-main .paging-navigation {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 25px 0 20px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    clear: both !important;
}

.site-main .nav-links,
.home .nav-links,
.search .nav-links,
.archive .nav-links {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 7px !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.site-main .nav-links a,
.site-main .nav-links span,
.home .nav-links a,
.home .nav-links span,
.search .nav-links a,
.search .nav-links span,
.archive .nav-links a,
.archive .nav-links span {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 12px !important;
    background: #ffffff !important;
    border: 1px solid #e4e7eb !important;
    border-radius: 7px !important;
    color: #333333 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease !important;
}

.site-main .nav-links a:hover,
.home .nav-links a:hover,
.search .nav-links a:hover,
.archive .nav-links a:hover {
    background: #f7f8fa !important;
    border-color: #d5d9df !important;
    color: #111827 !important;
    transform: translateY(-1px) !important;
}

.site-main .nav-links .current,
.home .nav-links .current,
.search .nav-links .current,
.archive .nav-links .current {
    background: #111827 !important;
    border-color: #111827 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Hide Pagination Dots (...) and Unwanted Arrow Icons / Extra Boxes */
.site-main .nav-links .dots,
.home .nav-links .dots,
.search .nav-links .dots,
.archive .nav-links .dots,
.nav-links .prev .elementor-button-icon,
.nav-links a.prev svg,
.nav-links a.next svg,
.nav-links a.prev i,
.nav-links a.next i,
.nav-links a.prev span.screen-reader-text,
.nav-links .prev::before,
.nav-links .next::after {
    display: none !important;
}

/* ---------------------------------------------------------
   9. HIDE DEFAULT THEME SEARCH HEADERS
   --------------------------------------------------------- */
body.search header.page-header,
body.search .page-header,
body.search .page-header-content,
body.search .archive-description,
body.search h1.page-title {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.search .romsns-forced-full-wrapper {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 25px auto 20px auto !important;
    text-align: center !important;
}

/* ---------------------------------------------------------
   10. HIDE GENERATEPRESS COPYRIGHT FOOTER BAR
   --------------------------------------------------------- */
.site-info,
.copyright-bar,
footer.site-info,
.site-footer .copyright-bar {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}