/* ==========================================================================
   GIF Program Post Display - Plugin Stylesheet v2.2.4
   Initial Load Fallback Hero Display & 1000px Hero Window
   ========================================================================== */

/* Clickable Program Titles */
.program-title-clickable { 
    cursor: pointer; 
    transition: color 0.2s ease, transform 0.2s ease; 
}
.program-title-clickable:hover { 
    color: #ff96a9; 
    transform: translateX(4px); 
    text-decoration: underline; 
}

/* Ensure Program Table Tabs are always elevated, unblocked, and 100% clickable */
.e-tabs-base,
.e-tabs-menu-base,
.e-tab-base,
.tab-menu {
    position: relative !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.e-tab-base *,
.tab-menu * {
    pointer-events: auto !important;
}

/* Target Container .prg-post-display: Responsive height & #2b2e35 Background */
.prg-post-display { 
    width: 100%; 
    height: auto;
    position: relative;
    margin-bottom: 0; 
    padding: 0;
    clear: both;
    z-index: 1;
    background: transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.prg-post-display.has-active-post,
.prg-post-display.has-loading,
.prg-post-display.has-default-hero,
.prg-post-display:has(.active-post),
.prg-post-display:has(.loading),
.prg-post-display:has(.default-hero) {
    height: 1000px;
    margin-bottom: 25px;
    background: #2b2e35;
}

.program-hero-card { 
    position: relative; 
    background: #2b2e35; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
    color: #000000; 
    width: 100%;
    height: 1000px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* Default Hero State on Page Load */
.program-hero-card.default-hero { 
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2b2e35;
    height: 1000px;
    width: 100%;
}

.program-hero-card.default-hero .program-hero-img-wrapper {
    width: 100%;
    height: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.program-hero-card.default-hero .program-hero-img {
    max-height: 1000px;
    max-width: 100%;
    object-fit: contain;
}

/* Loading state: Background #2b2e35 with accent text #e5e083 */
.program-hero-card.loading { 
    background: #2b2e35;
    height: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px; 
    text-align: center; 
    color: #e5e083; 
    font-family: var(--GIFTEXT);
    text-transform: uppercase;
    box-sizing: border-box;
}

.program-hero-card.loading p {
    color: #e5e083;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.program-hero-spinner { 
    display: inline-block; 
    width: 44px; 
    height: 44px; 
    border: 4px solid rgba(229, 224, 131, 0.2); 
    border-radius: 50%; 
    border-top-color: #e5e083; 
    animation: programHeroSpin 0.8s linear infinite; 
    margin-bottom: 16px; 
}

@keyframes programHeroSpin { 
    to { transform: rotate(360deg); } 
}

/* Main Grid Layout: 800px Left Image Column, 1fr Right Content Column, 1000px Height */
.program-hero-grid { 
    display: flex; 
    flex-direction: row;
    width: 100%;
    height: 1000px;
    padding: 0;
    margin: 0;
    background: transparent;
    box-sizing: border-box;
}

/* Left Column: 800px width, 1000px height, fit uncropped image without frames */
.program-hero-img-wrapper { 
    width: 800px;
    min-width: 800px;
    height: 1000px;
    background: transparent; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.program-hero-img { 
    width: 100%; 
    height: 1000px; 
    object-fit: contain; 
    display: block; 
}

/* Right Column: Inverted Theme (White Background, Black Text), 1000px height */
.program-hero-info { 
    flex: 1; 
    height: 1000px;
    padding: 40px; 
    display: flex; 
    flex-direction: column; 
    background: #ffffff; 
    color: #000000;
    box-sizing: border-box;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Slim Lilac Vertical Scrollbar (#ff96a9) */
.program-hero-info::-webkit-scrollbar {
    width: 6px;
}
.program-hero-info::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}
.program-hero-info::-webkit-scrollbar-thumb {
    background: #ff96a9;
    border-radius: 4px;
}
.program-hero-info::-webkit-scrollbar-thumb:hover {
    background: #e07d90;
}

/* Top Bar: Nav Arrows + Counter + Close Button in a Single Row */
.program-hero-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

.program-hero-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.program-hero-nav-btn {
    background: #f0f0f0;
    border: none;
    color: #000000;
    font-size: 1.2rem;
    font-weight: bold;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.program-hero-nav-btn:hover {
    background: #ff96a9;
    color: #ffffff;
    transform: scale(1.05);
}

.program-hero-nav-counter {
    font-family: var(--GIFTEXT);
    font-size: 0.95rem;
    font-weight: bold;
    color: #666666;
    letter-spacing: 0.5px;
}

.program-hero-close {
    position: static;
    background: #f0f0f0;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    color: #333333;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.program-hero-close:hover {
    background: #ff96a9;
    color: #ffffff;
    transform: scale(1.1);
}

/* Single-row Meta Badges Container */
.program-hero-meta-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Force Elementor meta headings inside container into relative inline-flex row */
.program-hero-meta-container h2.gif26-txt,
.program-hero-meta-container .prg-time,
.program-hero-meta-container .prg-type,
.program-hero-meta-container .prg-location {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    transform: none !important;
    white-space: nowrap !important;
}

/* Typography Rules */
.program-hero-title { 
    font-family: var(--GIFTEXT); 
    font-size: 2.2rem; 
    font-weight: 700; 
    line-height: 1.2; 
    margin-top: 0; 
    margin-bottom: 20px; 
    color: #000000; 
    text-transform: uppercase;
    overflow-wrap: break-word;
}

.program-hero-text { 
    font-family: var(--GIFTEXT); 
    font-size: 1.05rem; 
    line-height: 1.6; 
    color: #222222; 
    flex: 1;
    overflow-wrap: break-word;
}

.program-hero-text p {
    margin-bottom: 16px;
    color: #222222;
    overflow-wrap: break-word;
}

.program-hero-text a {
    color: #ff96a9;
    text-decoration: underline;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.program-hero-text img,
.program-hero-text figure,
.program-hero-text iframe,
.program-hero-text video,
.program-hero-text .wp-block-embed__wrapper iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    display: block;
    margin: 15px 0;
}

.program-hero-text iframe.wp-embedded-content,
.program-hero-text .wp-block-embed__wrapper iframe {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    clip: auto !important;
    clip-path: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 360px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12) !important;
    display: block !important;
    margin: 20px 0 !important;
}

.program-hero-text blockquote.wp-embedded-content {
    display: none !important;
}

.product-embed-card {
    margin: 15px 0;
    width: 100%;
}

.product-embed-card a {
    display: block;
    text-decoration: none !important;
}

.product-embed-img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.product-embed-card a:hover .product-embed-img {
    transform: scale(1.015);
    opacity: 0.95;
}

.program-hero-text a img,
.program-hero-text .wp-block-woocommerce-single-product img,
.program-hero-text .wp-block-image img,
.program-hero-text .wp-block-cover img {
    border-radius: 8px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.program-hero-text a:hover img {
    opacity: 0.92;
    transform: scale(1.01);
}

/* Product GFX Banner Styles */
.product-gfx-container {
    margin: 20px 0 10px 0;
    width: 100%;
    display: block;
    clear: both;
}

.product-gfx-link {
    display: inline-block;
    max-width: 100%;
    text-decoration: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.product-gfx-link:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

.product-gfx-img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    display: block;
}

.product-link-container {
    margin: 15px 0;
}

.product-txt-link {
    display: inline-block;
    padding: 8px 16px;
    background: #ff96a9;
    color: #ffffff !important;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.product-txt-link:hover {
    background: #e07d90;
}

/* Product Link & Image Link Styles */
.program-hero-img-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
}

.program-hero-img-link:hover .program-hero-img {
    opacity: 0.94;
    transform: scale(1.01);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.program-hero-title-link {
    color: #000000 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.program-hero-title-link:hover {
    color: #ff96a9 !important;
    text-decoration: underline !important;
}

.program-hero-action-container {
    margin-top: 20px;
    padding-top: 12px;
}

.program-hero-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff96a9;
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--GIFTEXT);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(255, 150, 169, 0.4);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.program-hero-buy-btn:hover {
    background: #e07d90;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 150, 169, 0.6);
}

/* Mobile & Tablet Responsive Layout */
@media (max-width: 1024px) {
    .prg-post-display.has-active-post,
    .prg-post-display.has-loading,
    .prg-post-display.has-default-hero,
    .prg-post-display:has(.active-post),
    .prg-post-display:has(.loading),
    .prg-post-display:has(.default-hero) {
        height: auto;
        max-height: none;
    }

    .program-hero-card {
        height: auto;
        min-height: auto;
    }

    .program-hero-card.default-hero {
        height: auto;
    }

    .program-hero-card.default-hero .program-hero-img-wrapper {
        height: auto;
    }

    .program-hero-card.default-hero .program-hero-img {
        max-height: 400px;
    }

    .program-hero-grid { 
        flex-direction: column; 
        height: auto;
    }
    
    .program-hero-img-wrapper { 
        width: 100%; 
        min-width: 100%; 
        height: auto; 
        max-height: 400px; 
    }

    .program-hero-img {
        width: 100%;
        height: auto;
        max-height: 400px;
        object-fit: contain;
    }

    .program-hero-info { 
        width: 100%; 
        height: auto;
        max-height: none;
        padding: 20px; 
        overflow-y: visible;
        overflow-x: hidden;
    }
}
