/*
  FiveM Search - Complete CSS Overhaul v3 (Part 1 of 2)
  Author: Gemini
  Description: Core styles, layout, header, footer, and homepage design.
*/

/* --- 1. CSS Variables & Root Setup --- */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
    --c-bg-primary: #12121a;
    --c-bg-secondary: #181824;
    --c-bg-tertiary: #1e1e2a;
    --c-text-primary: #f0f0f5;
    --c-text-secondary: #a0a0c0;
    --c-text-tertiary: #707088;
    --c-separator: rgba(142, 142, 147, 0.25);
    --c-separator-opaque: #38383a;
    --c-accent-blue: #58a6ff;
    --c-accent-blue-hover: #80bfff;
    --c-accent-green: #34c759;
    --c-accent-red: #ff3b30;
    --c-accent-yellow: #ffcc00;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --header-height: 70px;
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-med: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- 1.5 Keyframe Animations --- */
@keyframes dynamic-background-flow {
  0% { background-position: 0% 50%; background-size: 200% 200%; }
  25% { background-position: 100% 50%; background-size: 250% 250%; }
  50% { background-position: 50% 100%; background-size: 200% 200%; }
  75% { background-position: 50% 0%; background-size: 250% 250%; }
  100% { background-position: 0% 50%; background-size: 200% 200%; }
}

/* Find the existing body selector in your style.css file */
body {
    font-family: var(--font-sans);
    background-image: radial-gradient(at 20% 25%, hsla(220, 70%, 30%, 0.25) 0px, transparent 50%), 
                      radial-gradient(at 75% 80%, hsla(189, 84%, 12%, 0.35) 0px, transparent 50%),
                      radial-gradient(at 50% 50%, hsla(260, 50%, 20%, 0.15) 0px, transparent 50%);
    background-color: var(--c-bg-primary);
    background-attachment: fixed;
    animation: dynamic-background-flow 30s ease-in-out infinite;
    color: var(--c-text-secondary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 16px;
    overflow-x: hidden;
}

main {
    flex-grow: 1;
    padding-top: var(--header-height);
    padding-bottom: 5rem;
}

.container {
    width: 92%;
    max-width: 1320px;
    margin: 0 auto;
}

a {
    color: var(--c-accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--c-accent-blue-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.site-logo {
    width: 150px;
    height: auto;
    user-select: none;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--c-text-primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1, .hero-title { font-size: clamp(3rem, 1.5rem + 4.5vw, 4.5rem); }
h2, .section-title { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 1rem + 1.5vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); }

p {
    margin-bottom: 1.25rem;
}

/* --- 3. Utility & Layout --- */
.section-padding { padding: clamp(4rem, 2rem + 8vw, 7rem) 0; }
.bg-offset { background-color: var(--c-bg-secondary); border-top: 1px solid var(--c-separator); border-bottom: 1px solid var(--c-separator); }
.highlight-text { color: var(--c-accent-blue); }
.text-center { text-align: center; }
.section-title { margin-bottom: 1.5rem; }
.section-intro { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem); max-width: 750px; margin: 0 auto 3.5rem auto; line-height: 1.7; }
.section-cta { margin-top: 3.5rem; }
.grid-layout {
    display: grid;
    gap: 1.75rem;
    justify-content: center;
}
.grid-layout.two-columns {
    grid-template-columns: repeat(auto-fit, 350px);
}
.grid-layout.three-columns {
    grid-template-columns: repeat(auto-fit, 314px);
}
.grid-layout.four-columns {
    grid-template-columns: repeat(auto-fit, 250px);
}
.grid-left {
    justify-content: left !important;
}



/* --- 4. Buttons & Form Elements --- */
.btn { display: inline-block; padding: 14px 30px; font-size: 0.95rem; font-weight: 600; text-align: center; border-radius: var(--radius-lg); border: 1px solid transparent; cursor: pointer; transition: all var(--transition-fast); user-select: none; line-height: 1.5; }
.btn-primary { background-color: var(--c-accent-blue); color: #fff; }
.btn-primary:hover { background-color: var(--c-accent-blue-hover); transform: scale(1.03); box-shadow: 0 8px 25px rgba(10, 132, 255, 0.2); color: #fff; }
.btn-primary:active, .btn-primary.active { transform: scale(0.98); }
.btn-secondary { background-color: var(--c-bg-tertiary); color: var(--c-text-primary); border: 1px solid var(--c-separator-opaque); }
.btn-secondary:hover { border-color: var(--c-text-secondary); background-color: #2a2a3a; }
.btn-tebex { background-color: var(--c-accent-blue); color: #fff; }
.btn-cfx-forum { background-color: var(--c-bg-tertiary); color: var(--c-text-primary); border: 1px solid var(--c-separator-opaque); }
.btn-source-code { background-color: #333; color: #fff; }
.btn-submit-review { width: 100%; }
.btn-reset-filters { display: block; text-align: center; }
.btn.disabled, .btn-secondary.disabled, li span.disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
input, select, textarea { font-family: var(--font-sans); font-size: 1rem; color: var(--c-text-primary); background-color: var(--c-bg-secondary); border: 1px solid var(--c-separator-opaque); padding: 14px 18px; border-radius: var(--radius-md); transition: all var(--transition-fast); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-accent-blue); box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.3); background-color: var(--c-bg-tertiary); }
input::placeholder, textarea::placeholder { color: var(--c-text-tertiary); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; }


/* --- 5. Header & Navigation --- */
.site-header {
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: rgba(18, 18, 26, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--c-separator);
    transition: background-color var(--transition-med), box-shadow var(--transition-med);
}
.site-header.sticky {
    background-color: rgba(22, 22, 30, 0.8);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.site-header .container {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-area a {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--c-text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.logo-area .fa-search-location {
    color: var(--c-accent-blue);
}
.main-navigation ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.main-navigation a.nav-link {
    color: var(--c-text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    position: relative; /* Needed for the animated border */
    overflow: hidden; /* Hides the border initially */
}

/* Animated border for nav links */
.main-navigation a.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--c-accent-blue);
    transform: translateX(-101%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-navigation a.nav-link:hover,
.main-navigation li.dropdown-active > a.nav-link {
    color: var(--c-text-primary);
    
}

.main-navigation a.nav-link:hover::after,
.main-navigation li.dropdown-active > a.nav-link::after {
    transform: translateX(0);
}

.dropdown-indicator {
    margin-left: 0.4rem;
    font-size: 0.7em;
    transition: transform var(--transition-fast);
}
.has-dropdown:hover .dropdown-indicator,
.dropdown-active .dropdown-indicator {
    transform: rotate(180deg);
}

/* Updated Dropdown Menu with enhanced frosted glass effect */
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 340px;
    background: linear-gradient(135deg, rgba(30, 30, 42, 0.6), rgba(30, 30, 42, 0.5));
    border-radius: var(--radius-md);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), inset 0 0 0 1.5px rgba(255, 255, 255, 0.1); /* Added inner border for depth */
    z-index: 1010;
    padding: 1.75rem;
    
    opacity: 0;
    visibility: hidden;
    animation: dropdown-fade 0.3s forwards;
    text-align: center;
    backdrop-filter: blur(20px) saturate(180%);
}

@keyframes dropdown-fade {
    to {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}
li.has-dropdown.dropdown-active .dropdown-menu,
li.has-dropdown:hover .dropdown-menu {
    display: block;
}

/* Styles for simplified dropdown content */
.dropdown-title {
    color: var(--c-accent-blue);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-bottom: 0.75rem;
}

.dropdown-description {
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    color: var(--c-text-secondary);
}

.btn-dropdown-more {
    display: inline-block;
    width: auto;
    margin-top: 0; /* Adjusted from previous */
    padding: 12px 24px;
}

/* Header Search Styles */
.header-search-container {
    display: flex;
    align-items: center;
}
.header-search {
    display: flex;
    align-items: center;
    background-color: var(--c-bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 0 1rem;
    border: 1px solid var(--c-separator-opaque);
    transition: all var(--transition-fast);
}
.header-search:focus-within {
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.3);
    border-color: var(--c-accent-blue);
}
.header-search input[type="search"] {
    background: transparent;
    border: none;
    padding: 10px 8px;
    width: 220px;
    color: var(--c-text-primary);
}
.header-search input[type="search"]:focus {
    box-shadow: none;
}
.header-search .fa-search {
    color: var(--c-text-tertiary);
}

/* Mobile Navigation Styles */
.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    background: transparent;
    border: none;
    color: var(--c-text-primary);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem;
}

.mobile-nav {
    display: flex;
    position: fixed;
    top: 0;
    right: -100%; /* Hidden off-screen by default */
    width: 85%;
    max-width: 350px;
    height: 100%;
    background-color: rgba(24, 24, 34, 0.9);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    z-index: 9999;
    flex-direction: column;
    padding: 1.5rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
}

/* This is the key rule: It makes the menu slide in when the body has the class */
body.mobile-menu-active .mobile-nav {
    right: 0;
}

/* Darkens the background when the menu is open */
body.mobile-menu-active::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    backdrop-filter: blur(5px);
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 9998; /* Below the menu but above the content */
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--c-separator);
}

.mobile-nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.mobile-nav-close {
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--c-text-primary);
    cursor: pointer;
}

.mobile-nav ul {
    list-style: none;
    padding: 1.5rem 0;
}

.mobile-nav a {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--c-text-primary);
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.mobile-nav a:hover {
    background-color: var(--c-bg-tertiary);
}

.mobile-nav a i {
    color: var(--c-accent-blue);
    width: 20px;
    text-align: center;
}

.mobile-search-container {
    padding: 1.5rem;
    margin-top: auto;
    border-top: 1px solid var(--c-separator);
}

/* --- Responsive Rule to show the 3-bar icon on mobile --- */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }
}
body.mobile-menu-active {
    overflow: hidden;
}

/*
==============================================
    6. Homepage Sections (REDESIGNED)
==============================================
*/

/* --- Hero Section --- */
.hero-section {
    text-align: center;
    padding: clamp(3rem, 1rem + 8vw, 6rem) 0;
    background: none;
}
.hero-subtitle {
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
}
.hero-search-wrapper {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.hero-search-form {
    display: flex;
    width: 100%;
    max-width: 700px;
    position: relative;
    background: linear-gradient(135deg, rgba(30, 30, 42, 0.6), rgba(30, 30, 42, 0.5));
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 50px; /* Pill shape */
    border: 1px solid var(--c-separator);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.hero-search-form .search-icon-input {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-text-tertiary);
}
.hero-search-form input[type="search"] {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    color: var(--c-text-primary);
}
.hero-search-form input[type="search"]:focus {
    box-shadow: none;
    outline: none;
}
.hero-search-form .btn-search-hero {
    border-radius: 50px;
    margin: 6px;
}
.hero-search-form .btn-search-hero i {
    display: none;
    font-size: 1rem;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-or-text {
    margin: 0;
    color: var(--c-text-secondary);
    font-weight: 500;
}
.cfx-disclaimer {
    font-size: 0.9rem;
    margin-top: 2rem;
    opacity: 0.8;
    color: white;
}


/* --- Frosted Glass Panels - Base Style --- */
.feature-item,
.category-card,
.creator-card {
    background: linear-gradient(135deg, rgba(30, 30, 42, 0.45), rgba(30, 30, 42, 0.35));
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-separator);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    transition: all var(--transition-med);
    position: relative;
    overflow: hidden;
}
.feature-item:hover,
.category-card:hover,
.creator-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    animation: border-glow 2s ease-in-out infinite alternate;
}
.feature-item::before,
.category-card::before,
.creator-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at -20% -20%, rgba(137, 185, 255, 0.1), transparent 50%);
    pointer-events: none;
}

/* --- Specific Section Styles --- */
.feature-item {
    text-align: center;
}
.feature-icon {
    font-size: 1.8rem;
    color: var(--c-accent-blue);
    background-color: rgba(88, 166, 255, 0.1);
    border-radius: var(--radius-md);
    width: 60px;
    height: 60px;
    display: grid;
    place-content: center;
    margin: 0 auto 1.5rem auto;
    border: 1px solid var(--c-separator);
}

.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.category-card {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    text-align: left;
}
.category-card .category-icon {
    margin: 0;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
}
.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--c-text-primary);
    flex-grow: 1;
}
.category-script-count {
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 30px;
    color: var(--c-text-secondary);
    border: 1px solid var(--c-separator);
}

.creator-card {
    text-align: center;
}
.creator-card a {
    text-decoration: none; /* Make sure links aren't underlined */
    color: var(--c-text-primary);
    display: block;
}

.creator-description {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--c-text-secondary);
    line-height: 1.4;
    margin-top: 0.75rem; /* Space between script count and description */
    margin-bottom: 0;
}

/* --- MODIFIED CREATOR AVATAR STYLES --- */
.creator-avatar {
    height: 120px;
    margin: 0 auto 1.5rem auto;
    /* This is the key change: it fits the entire logo inside the container without cropping. */
    object-fit: contain;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.creator-card:hover .creator-avatar {
    transform: scale(1.08); /* Scale up on hover */
}
/* --- END OF MODIFICATIONS --- */

/* --- Keyframes for Animations --- */
@keyframes border-glow {
    0% { border-color: rgba(88, 166, 255, 0.5); }
    50% { border-color: rgba(120, 100, 255, 0.7); }
    100% { border-color: rgba(88, 166, 255, 0.5); }
}




/* --- 7. Script Card --- */
.script-card { background-color: transparent; border: 1px solid var(--c-separator-opaque); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition-med); position: relative; display: flex; flex-direction: column; }
.script-card:hover { transform: translateY(-8px);  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); border-color: var(--c-separator); }
.script-card-thumbnail { aspect-ratio: 16/10; overflow: hidden; position: relative; }
.script-card-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-med); }
.script-card:hover .script-card-thumbnail img { transform: scale(1.05); }
.script-card-content { 
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes footer to the bottom */
    gap: 0rem;
    background: rgba(18, 18, 26, 0.75);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
 }
.script-card-title a { color: var(--c-text-primary); }
.script-card-creator { font-size: 0.9rem; margin-bottom: 1rem; }
.script-card-description { flex-grow: 1; }
.script-card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 1.25rem; padding-bottom: 0.55rem; border-top: 1px solid var(--c-separator); }
.script-card-rating i { color: var(--c-accent-yellow); }
.script-card-price { font-weight: 600; color: var(--c-accent-green); }
.script-card-badge { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); color: #fff; padding: 5px 12px; border-radius: var(--radius-lg); font-size: 0.8rem; font-weight: 600; }
.script-card-badge.popular-badge { background-color: var(--c-accent-red); }
.script-card-badge.new-badge { background-color: var(--c-accent-green); color: var(--c-bg-primary); }

.featured-widget {
    position: absolute;
    top: 12px;
    right: 12px; /* Position in the top-right corner */
    background: linear-gradient(135deg, rgba(250, 16, 106, 0.7), rgba(250, 16, 28, 0.6)); /* Gold/Yellow Gradient */
    color: #ffffff; /* Dark text for contrast on gold */
    padding: 5px 12px;
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(85, 2, 2, 0.3);
    border: 1px solid rgba(248, 106, 106, 0.2);
    animation: gradient-animation 1s ease infinite;
}

.featured-widget .fa-star {
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

/* Related Search Match Styling */
.script-card.secondary-match {
    /* Lower the opacity to de-emphasize */
    opacity: 0.5;
    order: 2; 
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.script-card.secondary-match:hover {
    /* Bring to full opacity on hover */
    opacity: 1;
    transform: translateY(-8px) scale(1.02); 
}

.secondary-match-widget {
    position: absolute;
    top: 12px;
    left: 12px; /* Position in the top-left corner */
    background: rgba(42, 42, 58, 0.5); /* --c-bg-tertiary with transparency */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--c-text-secondary);
    padding: 5px 12px;
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 5; /* Ensure it's above the thumbnail */
    border: 1px solid var(--c-separator);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-match-widget .fa-align-left {
    color: var(--c-accent-blue);
}

@keyframes widget-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply the animation to both widgets */
.featured-widget,
.secondary-match-widget {
  /* Animation: name duration timing-function delay fill-mode */
  animation: widget-fade-in 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

/* --- 11. Footer --- */
.site-footer { background: transparent; color: var(--c-text-secondary); padding: 5rem 0 2rem 0; border-top: 1px solid var(--c-separator); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 3rem; margin-bottom: 4rem; }
.footer-section h4 { color: var(--c-text-primary); }
.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 0.85rem; }
.footer-section li a:hover {
    color: var(--c-accent-blue);
}
.footer-section a { color: var(--c-text-secondary); }
.social-links a { font-size: 1.3rem; margin-right: 1rem; color: var(--c-text-secondary); }
.social-links a:hover { color: var(--c-accent-blue); }
.footer-bottom { text-align: center; padding-top: 3rem; border-top: 1px solid var(--c-separator); font-size: 0.9rem; }
.footer-disclaimer { max-width: 800px; margin: 0.5rem auto 0; font-size: 0.8rem; opacity: 0.7; }



/* --- 8. Search Results Page --- */
.search-query-display {
    text-align: center;
    margin-bottom: 2.5rem;
}
.page-context-description {
    font-size: 1rem;
    color: var(--c-text-secondary);
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}
.results-count {
    font-size: 1rem;
    color: var(--c-text-tertiary);
}
.search-results-content-area {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: flex-start;
}

/* FROSTED GLASS EFFECT for sidebar and sort controls */
.search-filters-sidebar,
.filter-sort-controls {
    background: linear-gradient(135deg, rgba(30, 30, 42, 0.6), rgba(30, 30, 42, 0.5));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-separator);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}
.search-filters-sidebar::before,
.filter-sort-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at -20% -20%, rgba(137, 185, 255, 0.1), transparent 50%);
    pointer-events: none;
}

.search-filters-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    padding: 1.5rem;
}
.sidebar-title {
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    padding: 1.25rem 1.5rem;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--c-separator);
    background: rgba(0,0,0,0.1);
}
.filter-group {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--c-separator);
    padding-bottom: 1.5rem;
}
.filter-group:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.filter-group-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.filter-group-title i.fas {
    transition: transform var(--transition-fast);
    font-size: 0.8em;
    color: var(--c-text-tertiary);
}
.filter-group.collapsed .filter-group-title i.fas {
    transform: rotate(-90deg);
}
.filter-group-content {
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.4s ease, padding-top 0.4s ease;
    padding-top: 1rem;
}
.filter-group.collapsed .filter-group-content {
    max-height: 0;
    padding-top: 0;
}
.filter-options-list { list-style: none; max-height: 250px; overflow-y: auto; padding-right: 10px; }
.filter-options-list::-webkit-scrollbar { width: 6px; }
.filter-options-list::-webkit-scrollbar-track { background: transparent; }
.filter-options-list::-webkit-scrollbar-thumb { background: var(--c-separator-opaque); border-radius: 3px; }
.filter-options-list li { margin-bottom: 0.7rem; }
.filter-options-list label { display: flex; align-items: center; cursor: pointer; font-size: 0.95rem; }
.filter-options-list input[type="checkbox"],
.filter-options-list input[type="radio"] { margin-right: 0.85rem; width: 18px; height: 18px; accent-color: var(--c-accent-blue); }
.filter-price-range { display: flex; align-items: center; gap: .5rem; }
.filter-price-range input[type="number"] { padding: 10px; width: 100%; }
.filter-apply-button-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-separator);
    display: grid;
    gap: 0.75rem;
}
.btn-apply-filters { width: 100%; }
.btn-reset-filters { width: 100%; }
.filter-toggle-mobile {
    display: none;
}
.filter-sort-controls {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1.25rem;
}
.filter-sort-controls select {
    background-color: var(--c-bg-tertiary);
    border-color: var(--c-separator-opaque);
}
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 1rem;
    border: 1px dashed var(--c-separator);
    border-radius: var(--radius-lg);
    background: rgba(30, 30, 42, 0.4);
}
/* --- Pagination Controls --- */
.pagination-controls {
    margin-top: 3.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The main frosted glass bar */
.pagination-controls ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex; /* Changed to inline-flex to wrap content */
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 30, 42, 0.45), rgba(30, 30, 42, 0.35));
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--c-separator);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Ensures child borders don't poke out */
}

/* Base style for ALL items inside the bar */
.pagination-controls li a,
.pagination-controls li span {
    display: block;
    padding: 0.75rem 1.25rem;
    border-radius: 0px;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    transition: all var(--transition-fast);
    border-right: 1px solid var(--c-separator);
    color: var(--c-text-secondary);
}

/* Remove border from the very last item */
.pagination-controls li:last-child a,
.pagination-controls li:last-child span {
    border-right: none;
}

/* Style for clickable links */
.pagination-controls li a:hover {
    background-color: rgba(88, 166, 255, 0.15);
    color: var(--c-text-primary);
}

/* Style for the currently active page */
.pagination-controls li.active span {
    font-weight: 700;
    color: var(--c-text-primary);
    background-color: rgba(88, 166, 255, 0.2);
    text-shadow: 0 0 8px rgba(88, 166, 255, 0.5);
    cursor: default;
}

/* Ellipsis (...) styling */
.pagination-controls .page-item-ellipsis span {
    border-right-color: transparent; /* No separator after ellipsis */
}


/* --- MOBILE RESPONSIVE STYLES for Pagination --- */
@media (max-width: 768px) {
    /* Hide the numbered pages and the ellipsis */
    .pagination-controls .page-item-number,
    .pagination-controls .page-item-ellipsis {
        display: none;
    }

    /* IMPORTANT: But re-display the currently active page number */
    .pagination-controls li.active.page-item-number {
        display: block;
    }

    /* Make the Prev/Next text shorter on mobile */
    .pagination-controls .page-item-prev a {
        padding-left: 1rem;
        padding-right: 1rem;
    }
     .pagination-controls .page-item-next a {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}



.details-header {
    text-align: center;
    padding: 2.5rem 0;
    margin-bottom: clamp(2.5rem, 1rem + 4vw, 4rem);
}
.details-title {
    font-size: clamp(2.5rem, 1.5rem + 5vw, 4rem);
    line-height: 1.15;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.details-seller-info {
    font-size: clamp(1rem, 1rem + 0.5vw, 1.25rem);
    color: var(--c-text-secondary);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}
.details-header .average-rating-summary.short-summary {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    margin-bottom: 0;
}
.details-main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: clamp(3rem, 1rem + 5vw, 5rem);
}
@media (min-width: 992px) {
    .details-main-content {
        grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
        align-items: flex-start;
    }
}
.details-info-column {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.main-image img { border-radius: var(--radius-lg); margin-bottom: 1.25rem; aspect-ratio: 16/10; object-fit: cover; width: 100%; border: 1px solid var(--c-separator); }
.thumbnail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 1rem; }
.thumbnail-gallery img { border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; transition: all var(--transition-fast); opacity: 0.7; }
.thumbnail-gallery img:hover, .thumbnail-gallery img.active-thumb { border-color: var(--c-accent-blue); opacity: 1; }

/* NEW FROSTED GLASS STYLE for info column panels */
.script-price-cta,
.script-meta-details {
    background: linear-gradient(135deg, rgba(30, 30, 42, 0.5), rgba(30, 30, 42, 0.4));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(142, 142, 147, 0.25);
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}
/* Shine effect for glass panels */
.script-price-cta::before,
.script-meta-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at -20% -20%, rgba(137, 185, 255, 0.2), transparent 40%);
    pointer-events: none;
}
.script-price-cta .price-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-text-secondary);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 0.25rem;
}
/* MAGNIFICENT Price Styling */
.script-price {
    font-size: 2.8rem;
    font-weight: 700;
}
.script-price.free {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--c-accent-green);
    text-shadow: 0 0 20px rgba(52, 199, 89, 0.5);
}
.script-price-cta .cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.script-price-cta .cta-buttons .btn {
    width: 100%;
}

/* New Metadata Layout */
.script-meta-details {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.metadata-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1rem;
}
.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.metadata-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--c-text-secondary);
}
.metadata-label i {
    color: var(--c-accent-blue);
    width: 16px;
    text-align: center;
}
.metadata-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--c-text-primary);
}
.metadata-tag-area {
    border-top: 1px solid var(--c-separator);
    padding-top: 1.25rem;
}
.tag-list {
    margin-top: 0.5rem;;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.tag-list .tag {
    color: var(--c-text-secondary);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--c-separator-opaque);
    transition: all var(--transition-fast);
}
.tag-list .tag:hover {
    background-color: var(--c-accent-blue);
    color: #fff;
    border-color: var(--c-accent-blue);
    transform: translateY(-2px);
}

.script-description-container {
    padding: clamp(3rem, 2rem + 5vw, 5rem) 0;
    background: var(--c-bg-secondary);
    border-top: 1px solid var(--c-separator);
    border-bottom: 1px solid var(--c-separator);
}
.description-content-wrapper { max-width: 800px; margin: auto; color: var(--c-text-secondary); line-height: 1.7; }
.description-content-wrapper > *:first-child { margin-top: 0; }
.description-content-wrapper img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 1.5rem auto; }

.script-not-found { text-align: center; padding: 4rem 1rem; }


/* --- 10. Reviews Section --- */
.reviews-section {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid var(--c-separator);
}
.reviews-section > h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* NEW FROSTED GLASS STYLE for review panels */
.average-rating-summary,
.review-item,
.review-form-container {
    background: linear-gradient(135deg, rgba(30, 30, 42, 0.5), rgba(30, 30, 42, 0.4));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-separator);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}
.average-rating-summary::before,
.review-item::before,
.review-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at -20% -20%, rgba(137, 185, 255, 0.15), transparent 40%);
    pointer-events: none;
}

.average-rating-summary {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem;
}
.average-rating-summary:not(.short-summary) .stars {
    font-size: 2rem;
}
/* Short summary is in the header, not frosted */
.average-rating-summary.short-summary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .75rem;
    background-color: var(--c-bg-tertiary);
    padding: .5rem 1rem;
    border-radius: var(--radius-sm);
    text-align: left;
    margin-bottom: 1.5rem;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.average-rating-summary.short-summary::before {
    display:none;
}
.stars {
    background: linear-gradient(45deg, #ffda47, #ffc107);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 8px rgba(255, 193, 7, 0.25);
}
.review-rating .far.fa-star {
    color: var(--c-separator-opaque) !important;
    background: none !important;
    text-shadow: none !important;
}

.review-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1.5rem;
}
.review-item {
    padding: 2rem;
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    gap: .5rem 1rem;
}
.review-author {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--c-text-primary);
}
.review-date {
    font-size: 0.9rem;
    color: var(--c-text-tertiary);
}
.review-rating {
    margin-bottom: 1rem;
}
.review-text {
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--c-text-secondary);
    border-top: 1px solid var(--c-separator);
    padding-top: 1rem;
}
.review-form-container {
    padding: clamp(2rem, 1rem + 4vw, 3.5rem);
    margin-top: 4rem;
}
.review-form-container h3 {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-bottom: 2.5rem;
}
.review-message {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 500;
    margin-bottom: 2rem;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    background: rgba(18, 18, 26, 0.5); /* Match inner panel style */
}
.review-message.success {
    background-color: rgba(52, 199, 89, 0.2);
    color: #adffc9;
    border-color: rgba(52, 199, 89, 0.4);
}
.review-message.error {
    background-color: rgba(255, 59, 48, 0.2);
    color: #ffb3ae;
    border-color: rgba(255, 59, 48, 0.4);
}
.review-form-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (min-width: 768px) {
    .review-form-layout {
        grid-template-columns: 2fr 1fr;
    }
}
.review-form-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.review-form-right {
    background-color: rgba(18, 18, 26, 0.4);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--c-separator);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.review-form .form-group { margin-bottom: 0; }
.review-form .form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--c-text-secondary);
}
.review-form .form-group .required { color: var(--c-accent-red); margin-left: 4px; }
.review-form-right .star-rating-input { display: flex; flex-direction: row-reverse; justify-content: center; margin-top: .5rem; }
.review-form-right .star-rating-input label { font-size: 2.5rem; color: var(--c-separator-opaque); cursor: pointer; transition: all var(--transition-fast); padding: 0 .25em; }
.review-form-right .star-rating-input label:hover,
.review-form-right .star-rating-input label:hover~label,
.review-form-right .star-rating-input input[type=radio]:checked~label { color: var(--c-accent-yellow); transform: scale(1.1); }
.review-form-right .star-rating-input input[type=radio] { display: none; }
.btn-submit-review { width: 100%; padding: 16px; font-size: 1.1rem; }
.review-form-left .form-group input[type="text"],
.review-form-left .form-group textarea { width: 100%; }

/* --- 14. Article Page Styles --- */
.article-section .article-header {
    margin-bottom: 4rem;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.article-section .article-header h1 {
    font-size: clamp(2.5rem, 1.5rem + 4vw, 3.8rem);
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.article-script-showcase .grid-layout {
    justify-content: center;
}

/* --- 13. Static Content Pages --- */
.static-content-panel {
    background: linear-gradient(135deg, rgba(30, 30, 42, 0.5), rgba(30, 30, 42, 0.4));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-separator);
    padding: clamp(1.5rem, 1rem + 3vw, 3rem);
    margin: 2rem auto;
    max-width: 900px; /* Constrain width for readability */
}

.static-content-panel h1 {
    font-size: clamp(2rem, 1.5rem + 2.5vw, 2.8rem);
    color: var(--c-accent-blue);
    border-bottom: 1px solid var(--c-separator);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.static-content-panel h2 {
    font-size: clamp(1.4rem, 1.2rem + 1vw, 1.6rem);
    color: var(--c-text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.static-content-panel p, 
.static-content-panel li {
    color: var(--c-text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.static-content-panel ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.static-content-panel a {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--c-accent-blue-hover);
}

/* --- 15. FINAL & COMPLETE CFX DESCRIPTION STYLING (SEAMLESS IMAGES) --- */

/* The main container for the entire description block */
.cfx-description-content {
    color: var(--c-text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Remove top margin from the very first element */
.cfx-description-content > *:first-child {
    margin-top: 0;
}

/* General Typography */
.cfx-description-content h1,
.cfx-description-content h2,
.cfx-description-content h3,
.cfx-description-content h4,
.cfx-description-content h5,
.cfx-description-content h6 {
    color: var(--c-text-primary);
    margin: 2.5rem 0 1rem 0;
    font-weight: 600;
    line-height: 1.3;
}
.cfx-description-content h1 { font-size: 1.8em; }
.cfx-description-content h2 { font-size: 1.5em; padding-bottom: 0.5rem; border-bottom: 1px solid var(--c-separator); }
.cfx-description-content h3 { font-size: 1.25em; }
.cfx-description-content p { margin-bottom: 1.25rem; }
.cfx-description-content a { text-decoration: underline; }
.cfx-description-content strong { color: var(--c-text-primary); }
.cfx-description-content hr { border: none; height: 1px; background-color: var(--c-separator); margin: 3rem 0; }
.cfx-description-content ul,
.cfx-description-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.cfx-description-content li { margin-bottom: 0.5rem; }

/* --- REVISED IMAGE & ICON STYLING FOR SEAMLESS EFFECT --- */

/* This is the container for most images. It now only controls the TOP margin. */
.cfx-description-content .lightbox-wrapper {
    margin-top: 2.5rem;
    margin-bottom: 0; /* Let the next element handle its own top margin */
    text-align: center;
}

/*
    THE SEAMLESS FIX:
    This targets any lightbox-wrapper that directly follows another one
    and removes its top margin, pulling it flush with the image above.
*/
.cfx-description-content .lightbox-wrapper + .lightbox-wrapper {
    margin-top: 2px; /* A tiny 2px gap can look better than 0, adjust if needed */
}

/* We still reset the margin on the image itself to prevent any interference. */
.cfx-description-content .lightbox-wrapper img:not(.emoji) {
    margin: 0;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    background-color: var(--c-bg-tertiary);
    display: inline-block;
}

/* Fallback for any standalone image NOT in a lightbox. */
.cfx-description-content img:not(.lightbox-wrapper img):not(.emoji) {
     display: block;
     max-width: 100%;
     height: auto;
     border-radius: var(--radius-md);
     background-color: var(--c-bg-tertiary);
}

/* Styling for inline emoji icons remains the same. */
.cfx-description-content img.emoji {
    display: inline-block;
    width: 1.3em;
    height: 1.3em;
    margin: 0 0.2em;
    vertical-align: -0.25em;
}

/* --- END OF IMAGE & ICON REVISION --- */


/* Responsive Video Embed Wrapper */
.cfx-description-content .video-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    margin: 2.5rem auto; /* Centers the video block */
    border-radius: var(--radius-lg);
    background-color: #000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* The actual Iframe */
.cfx-description-content .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive Table Wrapper */
.cfx-description-content .table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--c-separator);
    border-radius: var(--radius-md);
}
.cfx-description-content table {
    width: 100%;
    border-collapse: collapse;
}
.cfx-description-content th,
.cfx-description-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--c-separator);
}
.cfx-description-content tr:last-child td {
    border-bottom: none;
}

/* --- 12. Responsive Adjustments --- */
.filter-sidebar-close {
    display: none; /* Hidden on desktop by default */
}

.footer-section .scrollable-links {
    max-height: 180px; /* You can adjust this value */
    overflow-y: auto;
    padding-right: 10px; /* Provides space for the scrollbar */
}

/* Custom scrollbar to match site style */
.footer-section .scrollable-links::-webkit-scrollbar {
    width: 6px;
}
.footer-section .scrollable-links::-webkit-scrollbar-track {
    background: transparent;
}
.footer-section .scrollable-links::-webkit-scrollbar-thumb {
    background: var(--c-separator-opaque);
    border-radius: 3px;
}

@media (max-width: 992px) {
    .main-navigation,
    .header-search {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    
    /* --- Search Page Mobile Layout --- */
    .search-results-content-area {
        grid-template-columns: 1fr; /* Stack sidebar and results */
    }
    .filter-toggle-mobile {
        display: block; /* Show the 'Show Filters' button */
        margin-bottom: 1.5rem;
    }
    .search-filters-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 320px;
        max-width: 85%;
        height: 100%;
        z-index: 1005;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 5px 0 20px rgba(0,0,0,0.2);
        padding: 1.5rem;
        padding-top: 4rem; /* Make space for close button */
        background-color: var(--c-bg-secondary); /* Ensure it has a background */
    }
    body.filters-active .search-filters-sidebar {
        transform: translateX(0);
    }
    .filter-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        background: var(--c-bg-tertiary);
        border: none;
        color: var(--c-text-primary);
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        line-height: 1;
    }
    /* Add an overlay to the background when filters are active */
    body.filters-active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 1004;
        backdrop-filter: blur(4px);
    }
    .showcase-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .grid-layout.three-columns,
    .grid-layout.four-columns { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: 1fr; }

}

@media (max-width: 500px) {
    .hero-search-form input[type="search"] {
        font-size: 1rem; /* Make input text smaller */
        padding-right: 1rem; /* Reduce padding to save space */
    }

    /* Hide the button text on mobile */
    .hero-search-form .btn-search-hero .btn-text {
        display: none;
    }
    
    /* Show the icon on mobile and style it */
    .hero-search-form .btn-search-hero i {
        display: inline;
        margin: 0;
    }

    /* Make the button smaller to just fit the icon */
    .hero-search-form .btn-search-hero {
        padding: 14px;
        min-width: 0;
    }
}

@media (max-width: 400px) {
    /* Reduce the padding inside the right-hand side box to save space */
    .review-form-right {
        padding: 1.25rem 1rem;
    }

    /* Make the star icons smaller so they don't overflow the container */
    .review-form-right .star-rating-input label {
        font-size: 2rem; /* Reduced from 2.5rem */
        padding: 0 0.2em; /* Slightly reduced horizontal padding */
    }

    /* Optional: Adjust heading size for better fit */
    .review-form-container h3 {
        font-size: 1.6rem;
    }
}