/*
Theme Name: WinROMs
Theme URI: https://winroms.com
Author: WinROMs Team
Author URI: https://winroms.com
Description: A modern WordPress theme for game ROMs download site
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: winroms
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Navigation Styles */
.nav_single_main {
    background-color: #f8f8f8;
    border-bottom: 1px solid #e7e7e7;
    padding: 0;
}

.nav_single {
    width: 100% !important;
    position: relative !important;
    float: none !important;
    padding: 0;
}

.nav_single .container {
    height: auto !important;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 10px 15px;
}

.nav_single nav {
    flex-direction: row !important;
    flex: 1;
    display: flex;
    gap: 0.5rem;
}

.nav_single .logo {
    padding: 0 !important;
}

.logo h1 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: bold;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #333;
    transition: background-color 0.3s;
    border-radius: 4px;
}

.nav-link:hover {
    background-color: #e7e7e7;
}

.nav-link svg {
    margin-right: 8px;
}

.nav-link .body-2 {
    font-size: 14px;
}

/* Search Styles */
#blocksearch {
    position: relative;
    width: 300px;
}

#blocksearch input.search {
    width: 100%;
    padding: 8px 80px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search_btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.q_search_btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
}

.clear_btn {
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Mobile Navigation */
.mobile-bar {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: left 0.3s;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.mobile-bar.active {
    left: 0;
}

.mob-nav-body {
    height: 100%;
    overflow-y: auto;
}

.m-close {
    background: transparent;
    border: none;
    cursor: pointer;
}

.blocksearch-container {
    padding: 15px;
}

#m-blocksearch {
    display: none;
}

.m_nav_btn,
.m_search_btn {
    background: transparent;
    border: none;
    cursor: pointer;
}

.mb_search {
    display: none;
    padding: 15px;
}

/* Main Content Styles */
main {
    padding: 0;
}

.home_custom {
    padding: 20px 0;
}

/* Section Titles */
.title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e7e7e7;
}

.title h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.title a {
    color: #337ab7;
    font-size: 14px;
}

.title a:hover {
    text-decoration: underline;
}

/* Card Grid Styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.more-col {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Article Item Styles */
.article-item {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.article-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.article-item picture,
.article-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.article-item .container {
    padding: 12px;
}

.article-item .text h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #333;
}

.article-item .text h2:hover {
    color: #337ab7;
}

.article-item .caption-1 {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.article-item .topline {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e7e7e7;
}

.article-item .topline .caption-1 {
    font-size: 11px;
    color: #999;
}

/* Soft Item (Game Item) Styles */
.soft-item {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.soft-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.soft-item .container {
    padding: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.archive-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 120px;
}

.icon-big {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
}

.icon-big img,
.icon-big picture {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.soft-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.soft-item-title:hover {
    color: #337ab7;
}

.app-badge {
    margin-top: 8px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
}

.badge-warning {
    background-color: #f0ad4e;
    color: #fff;
}

.archive-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.archive-right .version {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.archive-right .category {
    font-size: 12px;
    color: #666;
}

.archive-right .date {
    font-size: 11px;
    color: #999;
}

/* Panel Styles */
.panel {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}

.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    background-color: #f5f5f5;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.panel-body {
    padding: 15px;
}

/* Right Container (Game Details) */
.right-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.right-container span.body-2.gray {
    color: #333;
    font-weight: 600;
}

.right-container span.body-2.gray::after {
    content: ":";
    margin-right: 5px;
}

/* Screenshots */
.screenshots_row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.screenshots_row a {
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border 0.2s ease-in-out;
    display: block;
}

.screenshots_row a:hover {
    border: 1px solid #337ab7;
}

.screen_shot img {
    width: 100%;
    height: auto;
    display: block;
}

/* Plugins Mini */
.plugins-mini a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    margin-bottom: 10px;
    transition: background-color 0.3s;
}

.plugins-mini a:hover {
    background-color: #f8f8f8;
}

.plugins-mini__image img {
    width: 46px;
    height: auto;
}

/* Last News */
.last_news {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* Help Block */
.help-block {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    margin-bottom: 32px;
    background-color: #f8f9fa;
}

/* Footer Styles */
#footer {
    background-color: #f8f8f8;
    border-top: 1px solid #e7e7e7;
    padding: 20px 0;
    margin-top: 40px;
}

.footer_inner {
    text-align: center;
}

.footer-nav {
    font-size: 13px;
}

.footer-nav a {
    color: #666;
    margin: 0 5px;
}

.footer-nav a:hover {
    color: #337ab7;
    text-decoration: underline;
}

.separator {
    margin: 0 5px;
    color: #999;
}

/* Utility Classes */
.text-dark {
    color: #333 !important;
}

.text-muted {
    color: #666 !important;
}

.text-uppercase {
    text-transform: uppercase;
}

.text-white {
    color: #fff !important;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.my-4 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.p-0 {
    padding: 0 !important;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.py-3 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.shadow-sm {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Responsive Styles */
@media only screen and (max-width: 900px) {
    .nav_single nav {
        display: none;
    }

    #blocksearch {
        display: none;
    }

    #m-blocksearch {
        display: block;
    }

    .blocksearch-container {
        display: block;
    }

    .logo {
        display: none;
    }

    .logo-mobile {
        display: block !important;
    }

    .right-container {
        grid-template-columns: 100%;
    }

    .last_news {
        grid-template-columns: 100%;
    }

    .screenshots_row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .mobile-grid {
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width: 600px) {
    .soft-item .container {
        flex-direction: column;
        text-align: center;
    }

    .archive-right {
        align-items: center;
        text-align: center;
    }

    .title h2 {
        font-size: 1.2rem;
    }
}

/* Typography */
.body-2 {
    font-size: 14px;
}

.caption-1 {
    font-size: 12px;
}

.h4 {
    font-size: 1.25rem;
}

.font-weight-bold {
    font-weight: 700;
}

/* Additional Styles */
.main-page {
    margin: 20px 0;
}

.wrapper_game {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.bg-transparent {
    background: transparent;
}

.text-decoration-none {
    text-decoration: none;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Single Game Page Styles */
.single_game .main-title {
    margin-bottom: 20px;
}

.single_game .main-title .icon {
    align-items: flex-start;
}

.single_game .main-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.single_game .version {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.single_game .category a {
    color: #337ab7;
    text-decoration: none;
}

.single_game .category a:hover {
    text-decoration: underline;
}

.single_game .info-block {
    margin-bottom: 15px;
}

.single_game .info-block span {
    display: block;
    margin-bottom: 5px;
}

.single_game .btn-block .btn {
    font-size: 16px;
    font-weight: 600;
}

.single_game .btn.green {
    background-color: #28a745;
    border-color: #28a745;
}

.single_game .btn.green:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Mini Articles / Related Games */
.mini-articles {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    padding: 15px;
}

.plugins-mini {
    margin-bottom: 15px;
}

.plugins-mini:last-child {
    margin-bottom: 0;
}

.plugins-mini a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.plugins-mini a:hover {
    background-color: #f8f8f8;
}

.plugins-mini__image {
    flex-shrink: 0;
}

.plugins-mini__image img {
    width: 46px;
    height: auto;
    border-radius: 3px;
}

.plugins-mini .text {
    flex: 1;
    min-width: 0;
}

.plugins-mini .text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-news-container {
    margin-bottom: 30px;
}

.related-news-container h2 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.related-news .caption-1 {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #666;
}

/* Breadcrumbs */
.bread-crumbs {
    margin-bottom: 15px;
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
    font-size: 13px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 8px;
    color: #999;
}

.breadcrumb-item a {
    color: #337ab7;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #666;
}

/* Download Button Styling */
.btn-primary {
    background-color: #337ab7;
    border-color: #2e6da4;
    color: #fff;
}

.btn-primary:hover {
    background-color: #286090;
    border-color: #204d74;
}

/* Text Utilities */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.font-weight-bold {
    font-weight: 700;
}

/* Responsive adjustments for single page */
@media only screen and (max-width: 900px) {
    .single_game .main-title .icon {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .single_game .main-title .ml-3 {
        margin-left: 0 !important;
        margin-top: 15px;
    }
    
    .single_game .main-title h1 {
        font-size: 1.25rem;
    }
}
