/* Elementor Widget Styles */
.igc-elementor-widget {
    margin: 20px 0;
}

.igc-trigger-button {
    display: block;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.igc-trigger-button:hover {
    transform: scale(1.05);
}

.igc-trigger-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Popup Styles */
.igc-gallery-popup,
.igc-comments-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.igc-gallery-popup.active,
.igc-comments-popup.active {
    display: block;
}

.igc-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.igc-popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: 5% auto;
    background-color: #d70823;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.igc-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.igc-popup-header h3 {
    margin: 0;
    font-size: 20px;
}

.igc-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.igc-popup-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Gallery Styles */
.igc-gallery {
    display: grid;
    grid-gap: 15px;
}

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

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

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

.igc-gallery.grid-6 {
    grid-template-columns: repeat(6, 1fr);
}

.igc-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
}

.igc-gallery-item .igc-image {
    position: relative;
    padding-bottom: 100%;
}

.igc-gallery-item .igc-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.igc-gallery-item:hover .igc-image img {
    transform: scale(1.05);
}

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

.igc-gallery-item:hover .igc-image-overlay {
    opacity: 1;
}

.igc-image-overlay button {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.igc-image-overlay button:hover {
    background-color: #fff;
}

.igc-image-overlay button .dashicons {
    font-size: 20px;
}

/* Pagination */
.igc-pagination,
.igc-comments-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.igc-pagination .igc-page-btn,
.igc-comments-pagination .igc-page-btn {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px 12px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 3px;
}

.igc-pagination .igc-page-btn:hover,
.igc-comments-pagination .igc-page-btn:hover {
    background-color: #e9e9e9;
}

.igc-pagination .igc-page-btn.active,
.igc-comments-pagination .igc-page-btn.active {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.igc-pagination .igc-page-btn:disabled,
.igc-comments-pagination .igc-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Comments */
.igc-comments-list {
    margin-bottom: 20px;
}

.igc-comment {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.igc-comment:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.igc-comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.igc-comment-author {
    font-weight: bold;
}

.igc-comment-date {
    color: #e1dcdc;
    font-size: 0.9em;
}

.igc-comment-content {
    margin-top: 5px;
}

.igc-comment-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.igc-comment-form h4 {
    margin-top: 0;
    margin-bottom: 15px;
}

.igc-comment-form .form-group {
    margin-bottom: 15px;
}

.igc-comment-form input,
.igc-comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.igc-comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.igc-comment-form .button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 3px;
    cursor: pointer;
}

.igc-comment-form .button:hover {
    background-color: #005a87;
}

.igc-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 3px;
}

.igc-message.success {
    background-color: #f0f8f0;
    color: #3a813a;
}

.igc-message.error {
    background-color: #f8f0f0;
    color: #a13a3a;
}

/* Fullscreen Image */
.igc-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
}

.igc-fullscreen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.igc-fullscreen-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.igc-fullscreen-content img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.igc-fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading */
.igc-loading {
    text-align: center;
    padding: 20px;
    color: #fff;
}

/* Error */
.igc-error {
    text-align: center;
    padding: 20px;
    color: #a13a3a;
    background-color: #f8f0f0;
    border-radius: 3px;
}

/* No Content */
.igc-no-images,
.igc-no-comments {
    text-align: center;
    padding: 20px;
    color: #e4dede;
}

/* Responsive */
@media (max-width: 768px) {
    .igc-gallery.grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .igc-gallery.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .igc-gallery.grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .igc-gallery.grid-2 {
        grid-template-columns: 1fr;
    }
    
    .igc-gallery.grid-3 {
        grid-template-columns: 1fr;
    }
    
    .igc-gallery.grid-4 {
        grid-template-columns: 1fr;
    }
    
    .igc-gallery.grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}