/*
 Theme Name:   GeneratePress Chill
 Description:  Custom "Chill" theme for ROMs website, based on GeneratePress.
 Author:       Antigravity
 Template:     generatepress
 Version:      1.0.0
 Text Domain:  generatepress-chill
*/

/* ------------------------------------------------------------------------- *
 *  Performance & CWV Optimizations
 * ------------------------------------------------------------------------- */
:root {
    --chill-font-display: swap;
}

body {
    background-color: var(--chill-bg);
    font-display: swap;
}

/* ------------------------------------------------------------------------- *
 *  Grid Layout for Archives/Blog/Search ONLY
 * ------------------------------------------------------------------------- */
.blog .site-main,
.archive .site-main,
.search .site-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 0 10px;
}

@media (min-width: 769px) {

    .blog .site-main,
    .archive .site-main,
    .search .site-main {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 30px;
        margin-top: 30px;
        padding: 0;
    }
}

/* ... existing code ... */

/* ------------------------------------------------------------------------- *
 *  Custom Single Header (Image Left, Info Right)
 * ------------------------------------------------------------------------- */
/* Reset the main container to be transparent - AGGRESSIVE */
.single .inside-article,
.single.one-container .inside-article,
.single .site-content,
.single .site-main,
.single .container {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

/* Grey Navigation Bar & Search Fix */
.site-header {
    background-color: #f4f7f6;
}

.navigation-search input {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
}

.main-navigation,
.main-navigation .inside-navigation {
    background-color: transparent !important;
}

.generate-columns-container {
    display: contents;
    margin-right: 0;
}

.generate-columns {
    width: 100% !important;
    padding-left: 0 !important;
}

/* ------------------------------------------------------------------------- *
 *  Card Styling (Archives)
 * ------------------------------------------------------------------------- */
.blog .inside-article,
.archive .inside-article,
.search .inside-article {
    background-color: var(--chill-surface);
    border-radius: var(--chill-radius);
    box-shadow: var(--chill-shadow);
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

@media (min-width: 769px) {

    .blog .inside-article,
    .archive .inside-article,
    .search .inside-article {
        padding: 20px;
    }
}

.blog .type-post:hover .inside-article,
.archive .type-post:hover .inside-article,
.search .type-post:hover .inside-article {
    transform: translateY(-5px);
    box-shadow: var(--chill-shadow-hover);
}

/* Badge (Exclusives) */
.rom-card-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--chill-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 12px;
    border-bottom-right-radius: 8px;
    z-index: 10;
}

/* Post Image (Archives) */
.blog .post-image,
.archive .post-image,
.search .post-image {
    margin-top: 0 !important;
    width: 100%;
    order: 1;
}

.blog .post-image img,
.archive .post-image img,
.search .post-image img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 2/3;
}

/* Typography & Layout Order (Archives) */
.blog .inside-article,
.archive .inside-article,
.search .inside-article {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}

.blog .inside-article:hover,
.archive .inside-article:hover,
.search .inside-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
}

.blog .entry-header,
.archive .entry-header,
.search .entry-header {
    width: 100%;
    order: 2;
    display: block;
    /* Remove flex to allow natural top alignment */
}

.blog .entry-title,
.archive .entry-title,
.search .entry-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 0;
    min-height: 2.6em;
    text-align: center;
    /* Removed flex to prevent vertical centering */
}

/* Limit to 2 lines for perfect symmetry */
.entry-title a {
    color: var(--chill-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.entry-title a:hover {
    color: var(--chill-primary);
}

/* HIDE Content/Excerpt/Meta specifically on Archives/Blog/Search */
.blog .entry-summary,
.blog .entry-content,
.blog .entry-meta,
.blog footer.entry-meta,
.archive .entry-summary,
.archive .entry-content,
.archive .entry-meta,
.archive footer.entry-meta,
.search .entry-summary,
.search .entry-content,
.search .entry-meta,
.search footer.entry-meta {
    display: none !important;
}

/* ------------------------------------------------------------------------- *
 *  Card Meta (Format, Size, Genre)
 * ------------------------------------------------------------------------- */
.rom-card-meta {
    order: 3;
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    /* Slightly tighter gap now that genres are gone */
}

.rom-meta-line-1 {
    order: 2;
    /* Switch to second position */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rom-badge-format {
    background-color: #FF3C28;
    /* Site Red */
    color: #ffffff !important;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
}

.rom-badge-size {
    background-color: #0899BD;
    /* Site Blue */
    color: #ffffff !important;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
}

/* Remove bullet separator as they are now side-by-side badges */
.rom-badge-format+.rom-badge-size::before {
    display: none;
}

.rom-meta-genre {
    display: none !important;
    /* Removed genres from cards as requested */
}

.rom-meta-genre a {
    color: #94a3b8;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.rom-meta-genre a:hover {
    color: var(--chill-primary);
}

/* ------------------------------------------------------------------------- *
 *  Single Post Styling
 * ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- *
 *  Single Post Styling (Stacked Cards Layout)
 * ------------------------------------------------------------------------- */
/* Reset the main container to be transparent - AGGRESSIVE */
body.single {
    background-color: #ffffff !important;
}

.single .inside-article,
.single.one-container .inside-article,
.single .site-content,
.single .site-main,
.single .container {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

/* 1. Header Card */
.rom-single-header {
    background-color: var(--chill-surface);
    border-radius: var(--chill-radius);
    box-shadow: var(--chill-shadow);
    padding: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}

/* 2. Content Box (Description) */
.rom-content-body {
    padding: 30px;
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.8;
}

.rom-content-body strong,
.rom-content-body b {
    color: #2d3748;
    font-weight: 800;
}

/* Hide duplicate user-written title inside the content body */
.rom-content-body h1:first-of-type,
.rom-content-body h2:first-of-type,
.rom-content-body h3:first-of-type,
.rom-content-body strong:first-of-type {
    display: none !important;
}

.rom-content-body h2,
.rom-content-body h3 {
    margin-top: 1.5em;
    font-weight: 800;
    color: #2d3748;
}

/* 3. Game Info Box (& Description Wrapper) */
.rom-game-info-wrapper,
.rom-description-box {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 30px 0;
    overflow: hidden;
    font-family: inherit;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.rom-info-header,
h2.rom-info-header {
    background-color: #0899BD;
    padding: 12px 20px;
    font-weight: 800;
    color: #ffffff;
    border-radius: 8px 8px 0 0;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.rom-info-label {
    font-weight: 800;
    color: #2d3748;
    margin-right: 5px;
}

.rom-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px 30px;
    padding: 25px;
    font-size: 0.95rem;
    line-height: 1.6;
}


/* 5. Screenshots Section (Card Style) */
.rom-screenshots-wrapper {
    margin: 30px 0;
    background-color: var(--chill-surface);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 0;
    overflow: hidden;
}

h2.rom-section-title {
    font-size: 1.15rem;
    color: #ffffff;
    background-color: #0899BD;
    margin: 0;
    font-weight: 800;
    text-align: left;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
    display: block;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rom-screenshots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 30px;
}

.rom-screenshot-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.rom-screenshot-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.rom-screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

@media (max-width: 1024px) {
    .rom-screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .rom-screenshots-grid {
        grid-template-columns: 1fr;
    }
}


/* Page Pagination */
.paging-navigation {
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

/* ------------------------------------------------------------------------- *
 *  Custom Meta Logic Handled Above
 * ------------------------------------------------------------------------- */

.rom-header-image img {
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
    display: block;
}

.rom-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 10px;
}

.rom-single-header .entry-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 20px;
    line-height: 1.2;
    text-align: left;
}

/* Header Anchor Button */
.rom-download-wrapper-header {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.rom-download-button {
    background-color: #4a5568;
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.rom-download-button:hover {
    background-color: #2d3748;
    transform: translateY(-2px);
}


.rom-download-box p {
    margin-bottom: 20px;
    font-weight: 600;
    color: #4a5568;
}

.rom-download-button-large {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: #fff !important;
    padding: 20px 50px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 15px -3px rgba(72, 187, 120, 0.4);
    transition: all 0.3s ease;
}

.rom-download-button-large:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(72, 187, 120, 0.5);
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

@media (max-width: 768px) {
    .rom-single-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .rom-header-image {
        max-width: 250px;
        margin: 0 auto;
    }

    .rom-single-header .entry-title {
        text-align: center;
        font-size: 1.8rem;
    }
}

/* Content Box (Description) - Wrapper Fix */
/* We successfully wrapped the content in a PHP filter with .rom-description-box */
/* So we MUST remove the styling from the default WP container to avoid "Box in a Box" */
.single .entry-content {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* The inner header inside the content */
/* Removed display:none to allow our new H2 titles to show */
.single .entry-content h2:first-child {
    display: block;
}

.rom-content-body h2,
.rom-content-body h3 {
    margin-top: 1.5em;
    font-weight: 800;
    color: #2d3748;
    text-transform: uppercase;
}

/* ------------------------------------------------------------------------- *
 *  Custom Single Header (Image Left, Info Right)
 * ------------------------------------------------------------------------- */
/* Reset the main container to be transparent - AGGRESSIVE */
.single .inside-article,
.single.one-container .inside-article,
.single .site-content,
.single .site-main,
.single .container {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

/* ------------------------------------------------------------------------- *
 *  Custom Single Header (Image Left, Info Right)
 * ------------------------------------------------------------------------- */
/* Grey Navigation Bar */
.site-header {
    background-color: #f4f7f6;
}

.main-navigation,
.main-navigation .inside-navigation {
    background-color: transparent !important;
}

.rom-single-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
    /* Remove Grey Box */
    background-color: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.rom-header-image {
    flex: 0 0 240px;
    max-width: 240px;
}

.rom-header-image img {
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
    display: block;
}

.rom-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 10px;
}

.rom-single-header .entry-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 10px;
    /* Reduced bottom margin */
    line-height: 1.2;
    text-align: left;
}

/* Header Quick Stats */
.rom-header-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* Tighter gap */
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #4a5568;
    align-items: center;
    /* Vertically align label and buttons */
}

.rom-genre-label {
    font-weight: 800;
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-right: 12px;
}

.rom-stat-item,
.rom-genre-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 50px;
    background-color: #f1f5f9;
    color: #475569 !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.rom-genre-btn:hover {
    background-color: #e2e8f0;
    color: var(--chill-primary, #0899BD) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.rom-icon {
    display: none;
    /* Safely hide any remaining icons */
}

/* Header Excerpt */
.rom-header-excerpt {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    /* Limit to 4 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 90%;
}

.rom-download-button {
    background-color: #4a5568;
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.rom-trailer-button {
    background-color: var(--chill-menu-bg, #FF3C28);
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-bottom: 12px;
    width: fit-content;
}

.rom-trailer-button:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
}

.rom-download-button:hover {
    background-color: #2d3748;
    transform: translateY(-2px);
}

/* ------------------------------------------------------------------------- *
 *  Bottom Download Section
 * ------------------------------------------------------------------------- */
.rom-download-section {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 0;
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
    scroll-margin-top: 60px;
    overflow: hidden;
}

h2.rom-download-title {
    font-size: 1.1rem;
    color: #ffffff;
    background-color: #0899BD;
    padding: 12px 20px;
    margin: 0 0 30px 0;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: 8px 8px 0 0;
}

.rom-download-box {
    padding: 0 40px 40px 40px;
}

.rom-download-box p {
    margin-bottom: 20px;
    font-weight: 600;
    color: #4a5568;
}

.rom-download-button-large {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: #fff !important;
    padding: 20px 50px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 15px -3px rgba(72, 187, 120, 0.4);
    transition: all 0.3s ease;
}

.rom-download-button-large:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(72, 187, 120, 0.5);
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

@media (max-width: 768px) {
    .rom-single-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .rom-header-image {
        max-width: 250px;
        margin: 0 auto;
    }

    .rom-single-header .entry-title {
        text-align: center;
        font-size: 1.8rem;
    }
}

/* ------------------------------------------------------------------------- *
 *  Social Sharing Buttons
 * ------------------------------------------------------------------------- */
.rom-social-share-wrapper {
    margin: 50px 0 0 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 25px;
}

.rom-share-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #4a5568;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rom-social-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.rom-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.95rem;
    background-color: var(--btn-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.rom-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.rom-share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.rom-share-icon svg {
    width: 100%;
    height: 100%;
    fill: #fff;
    display: block;
}

@media (max-width: 600px) {
    .rom-social-buttons {
        gap: 10px;
    }

    .rom-share-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}

/* ------------------------------------------------------------------------- *
 *  Footer Emulator Buttons (Home Only)
 * ------------------------------------------------------------------------- */
.rom-footer-emulators {
    background-color: var(--chill-surface);
    padding: 60px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.rom-footer-emu-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--chill-heading);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rom-footer-emu-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.rom-footer-emu-btn {
    display: inline-block;
    padding: 12px 35px;
    border-radius: 50px;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1.1rem;
    background-color: var(--emu-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.rom-footer-emu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .rom-footer-emulators {
        padding: 40px 20px;
    }

    .rom-footer-emu-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .rom-footer-emu-btn {
        width: 100%;
        max-width: 300px;
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* ------------------------------------------------------------------------- *
 *  Pagination
 * ------------------------------------------------------------------------- */
.paging-navigation {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    width: 100%;
}

.paging-navigation .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border-radius: 50px;
    background-color: var(--chill-surface);
    color: var(--chill-text) !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.85rem;
    /* Slightly smaller for more elegance */
    letter-spacing: 0.5px;
    /* More "air" between letters */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
    text-transform: uppercase;
}

.page-numbers:not(.current):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    color: var(--chill-button) !important;
}

.page-numbers.current {
    background-color: var(--chill-button);
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

.page-numbers.prev,
.page-numbers.next {
    background-color: var(--chill-surface);
    padding: 0 25px;
    /* More horizontal padding to avoid the "tight" look */
    min-width: 120px;
    /* Ensure enough space for the word */
}

/* Fallback: Ensure default featured image is hidden on single posts */
.single .featured-image,
.single .page-header-image-single {
    display: none !important;
}

/* Ensure our custom header image IS visible and has space reserved */
.rom-single-header .rom-header-image img {
    display: block !important;
    aspect-ratio: 2/3;
}

/* --- 8.0 Comments (Native Chill System) --- */
/* --- 8.0 Comments (Native Chill System) --- */
.comments-area {
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.comments-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--chill-heading);
    padding-left: 10px;
}

/* --- Comment Form (Dark Box Replica) --- */
.comment-respond {
    margin-top: 10px;
    background: transparent;
    border: none;
    padding: 0;
}

.rom-comment-box-wrapper {
    background-color: var(--chill-comment-form-bg) !important;
    border: 1px solid #2d313a;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

.rom-textarea-wrapper {
    padding: 12px 15px;
    background: transparent;
}

.rom-comment-box-wrapper textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 1rem;
    resize: vertical;
    min-height: var(--chill-comment-form-height) !important;
    padding: 0;
    font-family: inherit;
}

.rom-comment-box-wrapper textarea:focus {
    outline: none;
    box-shadow: none;
}

.rom-comment-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.1);
    /* Subtle darkening but transparent to main bg */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 15px;
    min-height: 40px;
}

.rom-toolbar-left {
    display: flex;
    gap: 15px;
    align-items: center;
}

.rom-toolbar-icon {
    color: #64748b;
    cursor: pointer;
    font-size: 18px;
    /* Dashicon size */
    transition: color 0.2s;
}

.rom-toolbar-icon:hover {
    color: #94a3b8;
}

.comment-form-submit {
    margin: 0 !important;
    /* Reset default margins */
}

/* Floating Submit Button into Toolbar Area (Visual Trick) */
/* We can't move the button DOM easily without JS, but we can position it.
   Actually, standard WP puts <p class="form-submit"> AFTER .rom-comment-box-wrapper.
   We need to pull it up. */

.comment-form {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: var(--chill-comment-form-width) !important;
    /* Forced dynamic width */
    margin-bottom: 30px;
}

/* Hack to move submit button into the toolbar area visually */
.form-submit {
    position: absolute;
    bottom: 5px;
    /* Adjust to stay inside the 40px toolbar */
    right: 15px;
    margin: 0;
    z-index: 10;
}

/* If the "form-submit" container has weird styling, reset it */
.comment-form .form-submit {
    margin: 0;
    padding: 0;
}

.rom-submit-button {
    background-color: var(--chill-button) !important;
    /* Use dynamic theme color */
    color: #fff;
    border: none;
    padding: 5px 14px;
    /* More compact button */
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.rom-submit-button:hover {
    filter: brightness(1.1);
    opacity: 1;
}

/* Hide labels for name/email/url to keep it clean (or style them to look better if logged out) */
/* For this request, assuming logged in user mostly, but let's just make inputs decent if present */
.comment-form-author,
.comment-form-email {
    margin-bottom: 10px;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-body {
    display: flex;
    margin-bottom: 15px;
    /* Reduced gap */
    gap: 12px;
}

.comment-author .avatar {
    width: 40px;
    /* Smaller avatar */
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comment-content-wrapper {
    flex: 1;
    background-color: var(--chill-comment-bg);
    color: var(--chill-comment-text);
    padding: 10px 15px;
    /* Compact padding */
    border-radius: 12px;
    border-top-left-radius: 2px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    /* Ensure only wrapper has BG */
}

/* Reset inner content styles to prevent "double box" */
.comment-content {
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.comment-author cite {
    font-style: normal;
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 2px;
    color: var(--chill-heading);
}

.comment-meta {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 8px;
    display: block;
}

.rom-toggle-btn {
    display: block;
    width: auto;
    margin: 15px auto;
    padding: 8px 20px;
    background-color: transparent;
    border: 1px solid var(--chill-comment-form-bg);
    color: var(--chill-comment-accent);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rom-toggle-btn:hover {
    background-color: var(--chill-comment-form-bg);
    color: #fff;
    transform: translateY(-1px);
}

.rom-load-more-replies {
    margin: 10px 0 10px 65px;
    /* Offset to align with replies */
    font-size: 0.8rem;
    padding: 5px 15px;
}

/* Fix paragraphs inside comments */
.comment-content p {
    margin-bottom: 5px;
    /* Tighter spacing */
    line-height: 1.4;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* Links in comments (if enabled) */
.comment-content a {
    color: var(--chill-comment-accent);
    text-decoration: underline;
}

/* Uploaded Image */
.rom-comment-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

/* Reply Button */
.comment-reply-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--chill-comment-accent);
    text-decoration: none;
}

.comment-reply-link:hover {
    text-decoration: underline;
}

/* Comment Form */
.comment-respond {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.comment-form p {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #333;
}

.comment-form input[type="submit"] {
    background-color: var(--chill-button);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    transition: opacity 0.2s;
}

.comment-form input[type="submit"]:hover {
    opacity: 0.9;
}

/* File Input Styling */
.comment-form-image input[type="file"] {
    padding: 5px 0;
}

/* ------------------------------------------------------------------------- *
/* ------------------------------------------------------------------------- *
 *  Header Search Bar
 * ------------------------------------------------------------------------- */
.rom-header-extras {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

.rom-header-search .search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.rom-header-search .search-field {
    background-color: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 25px;
    padding: 16px 15px 16px 48px;
    font-size: 1rem;
    width: 200px;
    transition: all 0.3s ease;
    color: var(--chill-text);
}

@media (min-width: 769px) {
    .rom-header-search .search-field {
        width: 240px;
    }

    .rom-header-search .search-field:focus {
        width: 300px;
    }
}

.rom-header-search .search-submit {
    background: none;
    border: none;
    position: absolute;
    left: 8px;
    color: var(--chill-text-light);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* -----------------------------------------------------------------------------
// SEARCH & ARCHIVE HEADER FIX
// ----------------------------------------------------------------------------- */
/* Force Page Header to span all columns in Grid Layout */
.blog .site-main .page-header,
.archive .site-main .page-header,
.search .site-main .page-header {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--chill-surface);
    /* Subtle divider */
    text-align: center;
    /* Center alignment looks cleaner */
}

/* Style the Search Title (Typography Clean-up) */
.search .page-header h1 {
    font-size: 1.5rem;
    /* Reduce immense size */
    font-weight: 500;
    /* Medium weight */
    color: var(--chill-text);
    /* Use body text color for "Search Results for:" */
    margin: 0;
    line-height: 1.4;
}

/* Highlight the actual search query inside the title */
.search .page-header h1 span {
    display: block;
    /* Force query to new line or emphasize block? keep inline or block? */
    /* Let's keep it inline but bold/highlighted for better readability */
    display: inline-block;
    font-weight: 700;
    font-size: 2rem;
    /* Larger than label */
    color: var(--chill-heading);
    /* Heading color for the query */
    margin-top: 5px;
}

/* Optional: Add a subtle background or container style to the header */
.search .page-header {
    background: var(--chill-surface);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* -----------------------------------------------------------------------------
// SEARCH RESULTS REFINEMENT (Square & Compact)
// ----------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- *
 *  Search Results Refinement
 * ------------------------------------------------------------------------- */
.search .site-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search .generate-columns-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 15px !important;
    width: 100%;
    max-width: 1200px;
    justify-content: center;
    margin: 0 auto;
}

@media (min-width: 769px) {
    .search .generate-columns-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
        gap: 25px !important;
    }
}

/* Beautiful Search Header (Layout only, colors in theme-options) */
.search .page-header {
    margin-left: auto;
    margin-right: auto;
}

.search .page-title {
    margin: 0;
    line-height: 1.4;
}

/* Compact Typography for Search Results */
.search .entry-title {
    font-size: 1rem !important;
    font-weight: 700;
    margin-bottom: 0.5em;
    min-height: auto;
}

.search .inside-article {
    padding: 15px !important;
}

/* -----------------------------------------------------------------------------
// MAIN MENU STYLING (Pill Buttons - Modern & Compact)
// ----------------------------------------------------------------------------- */
.main-navigation .main-nav ul li a {
    background-color: transparent;
    border-radius: 12px;
    /* Softer, modern roundness */
    padding: 6px 16px;
    /* More compact */
    margin: 0 4px;
    /* Tighter spacing */
    font-weight: 600;
    font-size: 0.95rem;
    /* Slightly smaller for elegance */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* Snappy modern transition */
}

/* Hover State */
.main-navigation .main-nav ul li:hover>a,
.main-navigation .main-nav ul li.current-menu-item>a,
.main-navigation .main-nav ul li.current-menu-ancestor>a {
    background-color: var(--chill-button);
    /* Use theme button color */
    color: #fff !important;
    /* Force white text for contrast */
    transform: translateY(-1px);
    /* Subtle lift */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    /* Minimalist shadow */
}

/* Alignment Fix (Top Level Only) */
.main-navigation .main-nav>ul {
    display: flex;
    align-items: center;
}

/* Sub-menu Styling  */
.main-navigation .main-nav ul ul li a {
    border-radius: 8px;
    /* Slight roundness for dropdown items */
    margin: 2px 4px;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.main-navigation .main-nav ul ul {
    width: 200px;
    display: block !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    /* Soft, deep shadow */
    border-radius: 12px;
    /* Modern container radius */
    padding: 8px 0;
    background-color: var(--chill-surface);
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border for definition */
}

/* Ensure sub-menu parent has relative positioning if needed */
.main-navigation .main-nav ul ul li {
    display: block;
    width: 100%;
}

/* Compact Header */
.site-header .inside-header {
    padding: 5px 40px;
    /* Reduced vertical padding (was 10px) */
}




/* Ensure wpDiscuz remains visible if it's somehow inside these (it shouldn't be, but good to check) */
#wpdcom {
    display: block !important;
}

/* ------------------------------------------------------------------------- *
 *  Post Navigation (Pill Buttons - Like Share Buttons)
 * ------------------------------------------------------------------------- */
.post-navigation {
    display: flex;
    justify-content: center;
    gap: 8px;
    /* Reduced gap for a tighter look */
    margin: 30px 0;
    padding: 20px 0;
    clear: both;
}

.nav-previous,
.nav-next {
    flex: 0 1 auto !important;
    /* Allow them to be more compact */
    display: flex;
}

.post-navigation a {
    display: inline-flex;
    flex-direction: row;
    /* Horizontal icons */
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 50px;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    min-width: 140px;
    max-width: 380px;
    text-align: center;
}

.nav-btn-icon {
    width: 20px;
    /* Slightly smaller icons */
    height: 20px;
    display: block;
    color: #ffffff;
    opacity: 0.9;
    transition: transform 0.3s ease;
}

.icon-prev {
    margin-right: 8px;
}

.icon-next {
    margin-left: 8px;
}

.nav-previous:hover .icon-prev {
    transform: translateX(-3px);
}

.nav-next:hover .icon-next {
    transform: translateX(3px);
}

.nav-btn-title {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-previous a {
    background-color: #FF3C28;
    /* Site Red */
}

.nav-next a {
    background-color: #0899BD;
    /* Site Blue */
}

.post-navigation a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

@media (max-width: 600px) {
    .post-navigation {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .post-navigation a {
        width: 100%;
        max-width: 250px;
    }
}

/* ------------------------------------------------------------------------- *
 *  Intermediate Download Page (V2 - Wide professional Box)
 * ------------------------------------------------------------------------- */
/* Aggressive Wide Layout Fixes */
body.full-width-content .grid-container,
body.full-width-content .site-content,
body.full-width-content #primary,
body.full-width-content #main {
    max-width: 100% !important;
    width: 100% !important;
}

body.full-width-content .site-content {
    padding: 0 !important;
}

.rom-v2-download-page {
    width: 100% !important;
    max-width: 100% !important;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.rom-v2-box {
    background: #ffffff;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 60px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

.rom-v2-header {
    margin-bottom: 40px;
}

.rom-v2-main-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.rom-v2-sub-title {
    font-size: 1rem;
    color: #94a3b8;
}

.rom-v2-table {
    width: 100%;
    margin-top: 30px;
}

.rom-v2-table-header {
    display: grid;
    grid-template-columns: 8fr 2fr 1fr;
    /* archive takes most space */
    padding: 0 25px 15px 25px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    border-bottom: 1px solid #f1f5f9;
}

.rom-v2-row {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 8fr 2fr 1fr;
    align-items: center;
    padding: 22px 30px;
    margin-top: 15px;
    transition: all 0.2s ease;
}

.rom-v2-row:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.rom-v2-file {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.rom-v2-size strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: #334155;
}

.rom-v2-type {
    text-align: right;
}

.rom-v2-badge {
    background-color: #dcfce7;
    color: #166534;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    border: 1px solid #bbf7d0;
    transition: transform 0.2s ease;
}

.rom-v2-badge:hover {
    transform: scale(1.1);
    background-color: #bbf7d0;
    color: #166534 !important;
}

.rom-v2-footer {
    margin-top: 60px;
    text-align: left;
}

.rom-v2-btn-back {
    color: #64748b;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.rom-v2-btn-back:hover {
    color: #1e293b;
}

.rom-v2-empty {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

/* Response: Tablet/Mobile */
@media (max-width: 1024px) {
    .rom-v2-box {
        padding: 30px;
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    .rom-v2-table-header {
        display: none;
    }

    .rom-v2-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
        padding: 25px;
    }

    .rom-v2-type {
        text-align: center;
    }
}

/* No Results Search Page */
.rom-no-results-box {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 30px auto;
    max-width: 800px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.rom-search-retry .search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    background: #f8fafc;
    border-radius: 50px;
    padding: 5px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.rom-search-retry .search-form:focus-within {
    border-color: #0899BD;
    box-shadow: 0 0 0 4px rgba(8, 153, 189, 0.1);
}

.rom-search-retry .search-field {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 10px 20px !important;
    font-size: 1rem;
    color: #1e293b;
}

.rom-search-retry .search-submit {
    background: #0899BD !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 10px 25px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background 0.2s ease;
    min-width: 120px;
}

.rom-search-retry .search-submit:hover {
    background: #0681a0 !important;
}

@media (max-width: 768px) {
    .rom-no-results-box {
        margin: 15px;
    }

    .rom-search-retry .search-form {
        border-radius: 12px;
    }
}

/* Recommendations Section (Global) */
.rom-v2-recommendations {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 1px solid #f0f0f0;
}

.rom-v2-rec-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #4b5563;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.rom-v2-rec-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.rom-v2-rec-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.rom-v2-rec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.rom-v2-rec-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #ff3c28;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-bottom-right-radius: 8px;
    z-index: 10;
}

.rom-v2-rec-thumb {
    width: 100%;
    margin-bottom: 15px;
}

.rom-v2-rec-thumb img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 2/3;
    display: block;
}

.rom-v2-rec-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    min-height: 2.6em;
}

.rom-v2-rec-meta {
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.rom-v2-rec-format {
    background-color: #ff3c28;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 800;
}

.rom-v2-rec-size {
    background-color: #0899bd;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .rom-v2-rec-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .rom-v2-rec-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }
}


/* SEARCH NO RESULTS - CONSOLIDATED & BALANCED */

/* SEARCH NO RESULTS - CONSOLIDATED & BALANCED */
.rom-no-results-box {
    display: none !important;
}

/* Force the section to take full grid width and center content */
.search .site-main .rom-search-no-results {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px 20px 80px 20px !important;
}

.rom-no-results-content {
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    text-align: center;
}

.rom-search-retry-box {
    width: 100% !important;
    max-width: 550px !important;
    /* Balanced width */
    margin: 30px auto 20px auto !important;
}

.rom-search-retry-box .search-form {
    display: flex !important;
    width: 100% !important;
    background: #ffffff !important;
    border-radius: 50px !important;
    padding: 6px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease;
    align-items: center !important;
}

/* Ensure the label/input wrapper expands to push button to the right */
.rom-search-retry-box .search-form label {
    flex: 1 !important;
    display: flex !important;
    margin-bottom: 0 !important;
}

.rom-search-retry-box .search-field {
    flex: 1 !important;
    width: 100% !important;
    border: none !important;
    padding: 10px 25px !important;
    font-size: 1rem !important;
    color: #1e293b !important;
    outline: none !important;
    background: transparent !important;
}

.rom-search-retry-box .search-submit {
    border-radius: 50px !important;
    padding: 10px 25px !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    background-color: #0899BD !important;
    color: white !important;
    border: none !important;
    cursor: pointer;
    min-width: 110px;
    transition: all 0.2s ease;
}

.rom-search-retry-box .search-submit:hover {
    background: #0681a0 !important;
}

/* Recommendations Scaling */
.rom-v2-rec-title {
    font-size: 1.3rem !important;
    text-align: center !important;
    font-weight: 800;
    color: #1e293b !important;
    margin: 60px 0 40px 0 !important;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.rom-v2-rec-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    .rom-v2-rec-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .rom-search-retry-box {
        max-width: 100% !important;
    }
}

/* TURNSTILE MODAL */
.rom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.rom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.rom-modal-content {
    background: #fff;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rom-modal-overlay.active .rom-modal-content {
    transform: scale(1);
}

.rom-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #9ca3af;
}

.rom-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #1f2937;
    margin-top: 0;
}

.rom-modal-header p {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.rom-modal-body {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    min-height: 65px;
}

.rom-modal-status {
    min-height: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.rom-modal-status.error {
    color: #dc2626;
}

.rom-modal-status.success {
    color: #16a34a;
}

/* Pointer events fix for links */
[data-target] {
    cursor: pointer;
}