/*
Theme Name: Premium Prompt Hub
Theme URI: https://collabilyy.com
Author: Antigravity AI
Description: A premium, dark-mode WordPress theme designed for displaying and selling AI prompts in a clean 3-column centered grid. Supports vertical layouts on desktop and horizontal list rows on mobile.
Version: 1.8.4
Text Domain: premium-prompt-hub
*/

/* ==========================================================================
   GLOBAL RESET & STYLING VARIABLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #0d1117;
    --card-bg: #181c27;
    --text-color: #ffffff;
    --text-muted: #8b949e;
    --primary-gradient: linear-gradient(135deg, #7C5CFF, #29B6FF);
    --success-color: #10b981;
    --border-color: rgba(255, 255, 255, 0.05);
    --transition-speed: 0.35s;
    --max-width: 1560px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
}

/* ==========================================================================
   STICKY FLOATING 3D HEADER
   - Fully transparent background block
   - Float down with top margin
   - Rounded pill shape with white 3D outline and glassmorphic blur
   - SMART SHOW-ON-SCROLL-UP, HIDE-ON-SCROLL-DOWN logic
   ========================================================================== */
.site-header {
    background-color: transparent !important;
    border-bottom: none !important;
    padding: 0 !important;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease !important;
}

/* 
   WORDPRESS ADMIN BAR FIX:
   - When logged in, WordPress admin bar is fixed at the top (32px high).
   - We push the sticky header down so it is never covered by the admin bar.
*/
.admin-bar .site-header {
    top: 32px !important;
}

@media screen and (max-width: 600px) {
    .admin-bar .site-header {
        top: 46px !important; /* Mobile admin bar height */
    }
}

.site-header.header-hidden {
    transform: translateY(-120%) !important;
    opacity: 0;
    pointer-events: none;
}

.header-container {
    max-width: 1200px !important;
    margin: 15px auto 0 auto !important; /* Floating down from top */
    padding: 12px 30px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(24, 28, 39, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 100px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.site-logo a {
    font-size: 24px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

.main-navigation ul li a {
    font-weight: 700;
    font-size: 15px;
    color: #ffffff !important;
    padding: 8px 22px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05) !important; 
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a,
.main-navigation ul li.current_page_item a {
    color: #ffffff !important;
    background: rgba(41, 182, 255, 0.1) !important;
    border-color: #29B6FF !important;
    box-shadow: 0 0 15px rgba(41, 182, 255, 0.35), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* ==========================================================================
   GRID LAYOUT & CARDS (DESKTOP)
   ========================================================================== */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 15px 20px 60px 20px !important;
}

.prompt-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    justify-content: center;
    gap: 24px !important;
    margin-bottom: 40px;
    margin-top: 15px !important;
}

.prompt-card {
    position: relative;
    border-radius: 24px;
    padding: 16px !important; 
    transition: all var(--transition-speed) cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--card-bg);
    cursor: pointer;
    
    /* Clean gradient border style */
    border: 1.5px solid transparent;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)), 
                      linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

.prompt-card::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 28px;
    background: var(--primary-gradient);
    filter: blur(20px);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-speed);
}

.prompt-card:hover {
    transform: translateY(-8px);
    background-image: linear-gradient(var(--card-bg), var(--card-bg)), 
                      linear-gradient(135deg, #7C5CFF, #29B6FF);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.prompt-card:hover::after {
    opacity: 0.3;
}

.prompt-card:hover .unlock-btn {
    background: linear-gradient(135deg, #29B6FF, #7C5CFF);
    box-shadow: 0 6px 20px rgba(41, 182, 255, 0.4), 
                inset 0 2px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 2;
    flex-grow: 1;
}

/* Inset landscape thumbnails */
.card-thumb {
    aspect-ratio: 16/10 !important;
    width: 100%;
    overflow: hidden;
    background: #0d1117;
    position: relative;
    border-radius: 16px !important; 
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 14px !important; 
}

.card-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.prompt-card:hover .card-thumb img {
    transform: scale(1.08);
}

/* Card details alignment */
.card-content {
    padding: 0 !important; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    flex-grow: 1;
    background: transparent !important;
}

.card-title {
    font-size: 19px; 
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 14px 0 !important;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: auto; 
    text-transform: none;
    text-align: left !important;
    width: 100%;
    transition: color var(--transition-speed);
}

.prompt-card:hover .card-title {
    color: #29B6FF !important;
}

/* Tactile 3D button */
.unlock-btn {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    background: var(--primary-gradient);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(124, 92, 255, 0.3), 
                inset 0 2px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 100%;
    text-align: center;
}

.unlock-btn:hover {
    box-shadow: 0 6px 20px rgba(41, 182, 255, 0.4), 
                inset 0 2px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.unlock-btn:active {
    transform: translateY(1px) !important;
    box-shadow: 0 2px 8px rgba(124, 92, 255, 0.2), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.unlock-btn.unlocked {
    background: var(--success-color);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3), 
                inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 50px;
}

.pagination a, .pagination span {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #1d2230;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination span.current {
    background: var(--primary-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(124, 92, 255, 0.25);
}

/* ==========================================================================
   SINGLE POST LAYOUT
   ========================================================================== */
.single-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.single-post-header {
    text-align: center;
    margin-bottom: 40px;
}

.single-post-header h1 {
    font-size: 40px;
    margin-bottom: 16px;
}

.single-meta {
    color: var(--text-muted);
    font-size: 14px;
}

.single-featured-image {
    width: 100%;
    border-radius: 28px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.single-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.single-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 40px;
    font-size: 18px;
    line-height: 1.8;
}

.single-content p {
    margin-bottom: 24px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-color: #0b0e14;
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 60px;
}

/* ==========================================================================
   TABLET & MOBILE RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1023px) and (min-width: 768px) {
    .prompt-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px;
    }
}

@media (max-width: 767px) {
    .header-container {
        margin: 10px 10px 0 10px !important;
        padding: 8px 20px !important;
    }

    .main-content {
        padding: 10px 16px 40px 16px !important;
    }

    .prompt-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 0;
        margin-top: 0px !important;
    }

    /* Transform cards layout into side-by-side rows */
    .card-inner {
        flex-direction: row !important;
        align-items: center;
        padding: 10px;
    }

    .prompt-card {
        border-radius: 18px !important;
        border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
        background-image: none !important;
        background-color: var(--card-bg) !important;
        padding: 10px !important;
    }

    /* Image on the left: square shape */
    .card-thumb {
        width: 95px !important;
        height: 95px !important;
        aspect-ratio: 1/1 !important;
        flex-shrink: 0;
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        margin-bottom: 0px !important;
    }

    /* Content on the right */
    .card-content {
        padding: 0 0 0 14px !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: transparent !important;
        flex-grow: 1;
        align-items: flex-start !important;
        text-align: left !important;
    }

    .card-title {
        font-size: 15px !important;
        line-height: 1.3 !important;
        min-height: auto !important;
        margin: 0 0 8px 0 !important;
        -webkit-line-clamp: 2;
        text-align: left !important;
        width: 100%;
    }

    .unlock-btn {
        height: 36px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(124, 92, 255, 0.15) !important;
    }
}
