/* Container Styles */
.novateplica-video-cards-section {
    padding: 60px 15px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.novateplica-video-cards-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
    color: #333;
    position: relative;
    display: inline-block;
}

.novateplica-video-cards-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color, #17a34a);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Grid Layout */
.novateplica-video-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Card Styles */
.novateplica-video-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.novateplica-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.novateplica-video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #f0f0f0;
    cursor: pointer;
    overflow: hidden;
}

.novateplica-video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.novateplica-video-card:hover .novateplica-video-thumbnail img {
    transform: scale(1.05);
}

.novateplica-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: #4ade80; /* Light green, similar to image */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 2;
    transition: background 0.3s ease, transform 0.2s ease;
}

.novateplica-video-play-btn svg {
    margin-left: 4px; /* Center the play triangle optically */
}

.novateplica-video-card:hover .novateplica-video-play-btn {
    background: #16a34a;
    transform: translate(-50%, -50%) scale(1.1);
}

.novateplica-video-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.novateplica-video-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #222;
    line-height: 1.3;
}

.novateplica-video-card-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.novateplica-video-read-more {
    color: var(--primary-color, #17a34a);
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    display: inline-flex;
    align-items: center;
    margin-top: auto;
}

.novateplica-video-read-more:hover {
    text-decoration: underline;
}

/* Action Button at bottom */
.novateplica-video-cards-action {
    margin-top: 40px;
}

.novateplica-video-more-btn {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    background: transparent;
    color: #555;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.novateplica-video-more-btn svg {
    margin-left: 10px;
    color: var(--primary-color, #17a34a);
}

.novateplica-video-more-btn:hover {
    border-color: var(--primary-color, #17a34a);
    color: #333;
    background: #f9fafb;
}

/* Modal Styles */
.novateplica-video-card-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.novateplica-video-card-modal.active {
    opacity: 1;
    visibility: visible;
}

.novateplica-video-card-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.novateplica-video-card-modal-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.novateplica-video-card-modal.active .novateplica-video-card-modal-container {
    transform: translateY(0);
}

.novateplica-video-card-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.novateplica-video-card-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.novateplica-video-card-modal-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.novateplica-video-card-modal-close:hover {
    background: #f0f0f0;
    color: #000;
}

.novateplica-video-card-modal-body {
    padding: 25px;
    overflow-y: auto;
}

.novateplica-video-card-modal-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.novateplica-video-card-modal-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.novateplica-video-card-modal-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

@media (max-width: 768px) {
    .novateplica-video-cards-title {
        font-size: 24px;
    }
    
    .novateplica-video-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode Optimizations */
[data-theme="dark"] .novateplica-video-cards-title {
    color: #f9fafb;
}

[data-theme="dark"] .novateplica-video-card {
    background: #1f2937;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

[data-theme="dark"] .novateplica-video-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

[data-theme="dark"] .novateplica-video-thumbnail {
    background: #374151;
}

[data-theme="dark"] .novateplica-video-card-title {
    color: #f9fafb;
}

[data-theme="dark"] .novateplica-video-card-desc {
    color: #9ca3af;
}

[data-theme="dark"] .novateplica-video-more-btn {
    color: #d1d5db;
    border-color: #4b5563;
}

[data-theme="dark"] .novateplica-video-more-btn:hover {
    color: #fff;
    background: #374151;
    border-color: var(--primary-color, #17a34a);
}

[data-theme="dark"] .novateplica-video-card-modal-container {
    background: #1f2937;
}

[data-theme="dark"] .novateplica-video-card-modal-header {
    border-bottom-color: #374151;
}

[data-theme="dark"] .novateplica-video-card-modal-title {
    color: #f9fafb;
}

[data-theme="dark"] .novateplica-video-card-modal-close {
    color: #9ca3af;
}

[data-theme="dark"] .novateplica-video-card-modal-close:hover {
    background: #374151;
    color: #fff;
}

[data-theme="dark"] .novateplica-video-card-modal-desc {
    color: #d1d5db;
}
