/* style.css */
.cctv-gallery {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.cctv-columns-1 {
    grid-template-columns: repeat(1, 1fr);
}

.cctv-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cctv-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cctv-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .cctv-columns-3, .cctv-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cctv-columns-2, .cctv-columns-3, .cctv-columns-4 {
        grid-template-columns: repeat(1, 1fr);
    }
}

.cctv-item {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.cctv-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cctv-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: #eee;
    overflow: hidden;
}

.cctv-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cctv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cctv-item:hover .cctv-overlay {
    opacity: 1;
}

.cctv-overlay::after {
    content: '\25B6'; /* Play icon */
    font-size: 60px;
    color: white;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.cctv-item h3 {
    font-size: 1.2em;
    margin: 15px 10px;
    color: #333;
}

/* Fullscreen Modal Styles */
.cctv-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 100000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.cctv-modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    background-color: #000; /* Dark background for modal content */
    border-radius: 8px;
    text-align: center;
}

.cctv-modal-iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 20px;
}

.cctv-modal-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cctv-close-button {
    color: #f0f0f0;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.cctv-close-button:hover,
.cctv-close-button:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

#cctv-modal-title {
    color: #fff;
    font-size: 1.5em;
    margin: 0;
}