/* Legacy virtual_slide_box replacement styles */
.kns-slidebox-card {
    position: relative;
    margin: 1rem;
    border: 1px solid #b9b8b8;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    display: inline-block;
    vertical-align: top;
}

.kns-slidebox-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.kns-slidebox-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    color: #fff;
    padding: 0;
    transition: height 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kns-slidebox-card:hover .kns-slidebox-overlay {
    height: 100%;
}

.kns-slidebox-title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #fff !important;
    background-color: rgb(0, 36, 104) !important;
    text-align: center !important;
    padding: 0 !important;
    line-height: 40px !important;
    min-height: 40px !important;
    height: 40px !important;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kns-slidebox-overlay .kns-slidebox-content {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
}

.kns-slidebox-title h3 {
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    background-color: transparent !important;
    font-weight: bold !important;
    line-height: 1;
}

.kns-slidebox-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 0;
    width: 100%;
    flex-shrink: 0;
}

.kns-slidebox-content {
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
    margin-bottom: 0.5rem;
    text-align: left;
}

.kns-slidebox-link {
    color: #fff;
    text-decoration: underline;
    display: inline-block;
    margin-top: 0.5rem;
}

.kns-slidebox-link:hover {
    opacity: 0.8;
}

/* New VSBB replacement styles */
.kns-vsbb-card {
    position: relative;
    margin: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    display: inline-block;
    vertical-align: top;
}

.kns-vsbb-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.kns-vsbb-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0;
    transition: height 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kns-vsbb-card:hover .kns-vsbb-overlay {
    height: 100%;
}

.kns-vsbb-heading {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #fff !important;
    background-color: rgb(0, 36, 104) !important;
    text-align: center !important;
    padding: 0 !important;
    line-height: 40px !important;
    min-height: 40px !important;
    height: 40px !important;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kns-vsbb-overlay .kns-vsbb-content {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.kns-vsbb-heading h2,
.kns-vsbb-heading h3 {
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    background-color: transparent !important;
    font-size: 16px !important;
    font-weight: bold !important;
    line-height: 1;
}

/* Override theme h3 color for slidebox titles - more specific selectors */
.kns-slidebox-card h3.kns-slidebox-title,
.kns-vsbb-card h2.kns-vsbb-heading,
.kns-vsbb-card h3.kns-vsbb-heading,
.entry-content .kns-slidebox-card h3.kns-slidebox-title,
.entry-content .kns-vsbb-card h2.kns-vsbb-heading,
.entry-content .kns-vsbb-card h3.kns-vsbb-heading {
    color: #fff !important;
    background-color: rgb(0, 36, 104) !important;
}

/* Override theme entry-content h3 color specifically for our slideboxes */
.entry-content .kns-slidebox-title,
.entry-content .kns-vsbb-heading {
    color: #fff !important;
}

.kns-vsbb-content {
    font-size: 1rem;
    line-height: 1.5;
    color: #fff;
    margin-bottom: 1rem;
}

.kns-vsbb-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.kns-vsbb-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .kns-slidebox-card,
    .kns-vsbb-card {
        width: 100% !important;
        max-width: 100%;
        margin: 1rem 0;
    }
}

