/* =============================================
   IMPORTS & GLOBAL VARIABLES
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

:root {
    --il-primary-teal:   #008577;
    --il-primary-orange: #FF6801;
    --il-accent-yellow:  #FFAE00;
    --il-dark-teal:      #006157;
    --il-light-neutral:  #FFF6EB;
    --il-text-dark:      #333;
    --il-text-light:     #fff;
}


/* =============================================
   [insider_library] SHORTCODE STYLES
   (Main Library Page)
   ============================================= */

.il-library-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.il-library-hero {
    padding: 150px 5% 48px;
    background: var(--il-light-neutral);
    text-align: center;
}

.il-library-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.il-library-hero p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--il-text-dark);
}

.il-filter-container {
    padding: 32px 5% 0;
}

.il-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    background: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.il-filter-label {
    font-weight: 700;
    font-size: 1.1rem;
}

.il-filter-bar select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

#il-filter-search {
    flex: 1 1 200px;
    height: 44px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    resize: none;
    -webkit-appearance: none;
    appearance: none;
}

.il-category-section {
    width: 100%;
    padding: 48px 5%;
    box-sizing: border-box;
}

.il-industry-title {
    font-size: 2rem;
    border-bottom: 2px solid var(--il-primary-teal);
    padding-bottom: 16px;
    margin-bottom: 32px;
    color: var(--il-text-dark);
}

.il-category-section.alt-bg {
    background-color: #fff6eb;
}

.il-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.il-library-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform .3s, box-shadow .3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.il-library-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.il-video-card {
    position: relative;
    cursor: pointer;
}

.il-video-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.il-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,.8), transparent);
    color: var(--il-text-light);
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 0 0 8px 8px;
}

.il-gated-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,97,87,.85);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px 8px 0 0;
    text-align: center;
    padding: 24px;
}

.il-gated-overlay h4 {
    margin-top: 12px;
    font-size: 1.2rem;
}

.il-video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

.il-leader-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.il-leader-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

.il-leader-info .il-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    margin: 0;
    padding-left: 3%;
}

@media (max-width: 1024px) {
    .il-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .il-filter-bar { flex-direction: column; align-items: stretch; }
    #il-filter-search { flex: 1 1 auto; }
}

@media (max-width: 600px) {
    .il-grid-3 { grid-template-columns: 1fr; }
}


/* =============================================
   [insider_library_home] SHORTCODE STYLES
   (Homepage Grid)
   ============================================= */

#insider-library {
    --teal:   #008577;
    --orange: #FF6801;
    --yellow: #FFAE00;
    --dark:   #006157;
    --light:  #FFF6EB;
    --text:   #333;
    --white:  #fff;
}

#insider-library,
#insider-library * {
    box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

#insider-library.container {
    max-width: 1200px;
    padding: 48px 24px;
}

#insider-library h2 {
    font-family: Poppins, Inter, sans-serif;
    font-weight: 700;
    font-size: 2.25rem;
    text-align: center;
    margin: 0 0 8px;
    color: var(--text);
}

#insider-library .section-intro {
    text-align: center;
    color: #555;
    max-width: 700px;
    margin: 0 auto 40px;
}

#insider-library .insider-library-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

#insider-library .large-card {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,.10);
    background: #e9ecef;
    transition: transform .25s ease, box-shadow .25s ease;
}

#insider-library .large-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,.12);
}

#insider-library .large-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .4s ease;
}

#insider-library .large-card:hover img {
    transform: scale(1.03);
}

#insider-library .large-card-content {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 28px;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 20%, rgba(0,0,0,0.40) 55%, transparent 85%);
    color: var(--white);
}

#insider-library .large-card-content h3 {
    color: white;
    font-weight: 700;
    margin: 0 0 8px;
    font-size: 1.8rem;
    font-family: Poppins, Inter, sans-serif;
}

#insider-library .large-card-content p {
    margin: 0 0 8px;
}

#insider-library .view-now-link {
    font-weight: 700;
    color: var(--yellow);
    text-decoration: none;
}

#insider-library .small-card-grid {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

#insider-library .small-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

#insider-library .small-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,.12);
}

#insider-library .small-card-image-container {
    position: relative;
}

#insider-library .small-card-image-container img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    border-radius: 16px 16px 0 0;
}

#insider-library .gated-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,97,87,0.85);
    color: var(--white);
}

#insider-library .gated-overlay h4,
#insider-library .gated-overlay span {
    color: white;
}

#insider-library .small-card-content {
    padding: 18px 20px 16px;
    text-align: center;
}

#insider-library .small-card-content h4 {
    font-family: Poppins, Inter, sans-serif;
    font-size: 1.05rem;
    margin: 0 0 6px;
    color: var(--text);
}

#insider-library .small-card-content p {
    margin: 0 0 14px;
    font-size: .95rem;
    color: #666;
}

#insider-library .btn {
    padding: 10px 18px;
    border-radius: 50px;
    font-size: .95rem;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 992px) {
    #insider-library .insider-library-grid,
    #insider-library .small-card-grid {
        grid-template-columns: 1fr;
        grid-column: auto;
        grid-row: auto;
    }
}


/* =============================================
   SHARED COMPONENTS (Buttons, Load More, etc.)
   ============================================= */

.btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background .2s, transform .2s;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--il-primary-orange);
    color: #fff;
}

.btn-primary:hover {
    background: var(--il-accent-yellow);
    color: var(--il-text-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--il-primary-teal);
    border-color: var(--il-primary-teal);
}

.btn-secondary:hover {
    background: var(--il-primary-teal);
    color: #fff;
    transform: translateY(-2px);
}

.load-more-container {
    text-align: center;
    margin-top: 32px;
    width: 100%;
}

.hidden-item {
    display: none !important;
}

.load-more-btn.finished,
.load-more-btn:disabled {
    background-color: #cccccc;
    border-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.8;
}


/* =============================================
   MODAL STYLES
   ============================================= */

/* --- Main Video Modal ("Mockup" Style) --- */

.ilx-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ilx-modal-overlay.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
}

.ilx-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 1100px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    position: relative;
    padding: 24px;
}

.ilx-modal-close {
    position: absolute;
    right: 14px;
    top: 8px;
    background: transparent;
    border: 0;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #777;
}

.ilx-modal-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 24px;
}

.ilx-video-title {
    font-family: Poppins, Inter, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 0 12px;
    color: #333;
}

.ilx-video-frame {
    background: #222;
    border-radius: 12px;
    overflow: hidden;
}

.ilx-video-frame iframe {
    width: 100%;
    height: 52vh;
    border: 0;
    display: block;
}

.ilx-video-desc {
    color: #444;
    margin: 14px 0 4px;
}

.ilx-divider {
    height: 1px;
    background: #eee;
    margin: 16px 0;
}

.ilx-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.ilx-thumb {
    background: transparent;
    border: 0;
    font-size: 1.3rem;
    cursor: pointer;
}

.ilx-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.ilx-leader {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ilx-leader-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.ilx-leader-name {
    font-weight: 700;
    color: #333;
}

.ilx-book {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 12px;
    background: #FF6801;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(255,104,1,.25);
}

.ilx-book:hover {
    background: #FFAE00;
    color: #333;
}

.ilx-modal-aside {
    padding-top: 10px;
}

.ilx-aside-title {
    font-weight: 700;
    color: #555;
    margin-bottom: 10px;
}

.ilx-related-item {
    display: flex;
    gap: 10px;
    align-items: center;
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
}

.ilx-related-item:hover {
    background: #f6f6f6;
}

.ilx-related-item.is-playing {
    background: #fff3e2;
}

.ilx-related-thumb {
    width: 64px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.ilx-related-title {
    font-size: .9rem;
    font-weight: 700;
    color: #333;
    line-height: 1.25;
}

@media (max-width: 992px) {
    .ilx-modal-layout { grid-template-columns: 1fr; }
    .ilx-video-frame iframe { height: 40vh; }
}


/* --- Booking Modal --- */

.il-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    display: none; /* This modal is likely controlled by a different script */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.il-modal {
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    padding: 24px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.il-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    margin: 0 0 12px;
}

.il-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--il-text-dark);
}

.il-modal-close:hover {
    color: var(--il-primary-teal);
}

.il-step-pay,
.il-step-cal {
    margin-top: 16px;
}

.il-gated-overlay h4 {
    color: white;
}


/* =============================================
   [insider_library_row] STYLES
   ============================================= */

.il-row-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    margin-bottom: 48px;
    box-sizing: border-box;
}

.il-row-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.il-row-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.il-row-media {
    position: relative;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    background: #e9ecef;
}

.il-row-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.il-placeholder-img {
    width: 100%;
    height: 100%;
    background-color: #ddd;
}

.il-row-gated {
    position: absolute;
    inset: 0;
    background: rgba(0, 97, 87, 0.85); /* Matches your plugin teal */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.il-row-gated span {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.il-row-gated small {
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.il-row-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.il-row-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .il-row-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .il-row-container {
        grid-template-columns: 1fr;
    }
}