/* templates/css/style.css */
.pixabay-gallery-container {
    max-width: 100%;
    margin: 0 auto;
    
}

.pixabay-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 6 columns on desktop */
    gap: 20px;
    margin-bottom: 30px;
    border-radius:15px;
}

.pixabay-grid img, .pixabay-favorites-grid img {
    width: 100%;
    height: 100%; /* Ensure image stretches fully */
    object-fit: cover; /* Maintain aspect ratio and cover entire space */
    cursor: pointer;
    border-radius:15px;
    aspect-ratio: 16 / 9; /* Maintain 16:9 aspect ratio */
    transition: transform 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .pixabay-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns on smaller screens */
    }
}

@media (max-width: 768px) {
    .pixabay-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (max-width: 480px) {
    .pixabay-grid {
        grid-template-columns: repeat(1, 1fr); /* 1 column on mobile */
    }
}


.pixabay-grid img:hover {
    transform: scale(1.05);
}

.pixabay-loading-spinner {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #16423C;
    border-top: 5px solid grey;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pixabay-load-more {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #16423C;
    color: white;
    border: none;
    border-radius: 100px;
    cursor: pointer;
}

.pixabay-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: 20px auto;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

.add-to-favorites {
    display: block;
    margin: 20px auto 0;
    padding: 10px 20px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.pixabay-search {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.pixabay-search input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 100px;
    background : #E4F0EB;
}

.pixabay-search button {
    padding: 10px 20px;
    background: #16423C !important;
    color: white;
    border: none;
    border-radius: 100px;
    cursor: pointer;
}

.pixabay-categories,
.pixabay-types,
.pixabay-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-btn,
.type-btn,
.color-btn {
    padding: 8px 16px;
    background-color: #f1f1f1;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.category-btn:hover,
.type-btn:hover,
.color-btn:hover {
    background-color: #16423C;
    color: white;
}

.active {
    background-color: #16423C;
    color: white;
}

@media (max-width: 768px) {
    .pixabay-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .pixabay-grid img {
        height: 150px;
    }
    
    .pixabay-categories,
    .pixabay-types,
    .pixabay-colors {
        justify-content: center;
    }
}

/* Add these styles to your existing style.css */

.pixabay-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.modal-image-container {
    position: relative;
}

.modal-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.modal-details {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.modal-details h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
}

.detail-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    display: inline-block;
    width: 100px;
    color: #666;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.download-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.download-button:hover {
    background-color: #219a52;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

@media (max-width: 768px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20px auto;
        padding: 15px;
    }
    
    .modal-details {
        padding: 15px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .download-button,
    .add-to-favorites {
        width: 100%;
        text-align: center;
    }
}
/* Add these styles to your existing style.css */

.pixabay-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.image-wrapper:hover {
    transform: translateY(-5px);
}

.pixabay-favorites-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.pixabay-favorites-grid img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .pixabay-favorites-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .pixabay-favorites-grid img {
        height: 150px;
    }
}

.favorite-image-wrapper {
    position: relative;
    display: inline-block;
    margin: 5px;
}

.favorite-image-wrapper img {
    display: block;
    max-width: 100%;
    height: auto;
}

.delete-favorite {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.favorite-image-wrapper:hover .delete-favorite {
    opacity: 1;
}

/* Add this to your existing style.css file */

/* Slider Styles */
.pixabay-slider-container {
    max-width: 100%;
    margin: 0 auto 30px;
    position: relative;
}
.pixabay-slider {
    visibility: hidden; /* Hide until initialized */
}
.pixabay-slider.slick-initialized {
    visibility: visible; /* Show after initialized */
}
.slider-item {
    padding: 10px;
}
.slider-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    aspect-ratio: 2/3; /* 2:3 aspect ratio for slider cards */
}
.slider-image-wrapper:hover {
    transform: translateY(-5px);
}
.slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    aspect-ratio: 2/3;
    transition: transform 0.3s ease;
}
.slider-image:hover {
    transform: scale(1.05);
}
.slider-image-info {
    padding: 10px 5px;
}
.slider-image-tags {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.slider-image-user {
    font-size: 12px;
    color: #777;
}
/* Enhanced Slick overrides for visibility */
.slick-prev, .slick-next {
    z-index: 10;
    width: 30px;
    height: 30px;
    background: #16423C; /* Semi-transparent background using your color */
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.slick-prev {
    left: -15px;
}
.slick-next {
    right: -15px;
}
.slick-prev:before, .slick-next:before {
    color: #16423C; /* White arrow color for contrast */
    opacity: 1;
}
.slick-prev:hover, .slick-next:hover {
    background: rgba(22, 66, 60, 1); /* Solid background on hover */
}
.slick-dots {
    bottom: -25px;
}
.slick-dots li {
    margin: 0 4px;
}
.slick-dots li button {
    width: 12px;
    height: 12px;
}
.slick-dots li button:before {
    font-size: 10px;
    color: rgba(22, 66, 60, 0.5); /* Semi-transparent dots */
    opacity: 1;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.slick-dots li.slick-active button:before {
    color: #16423C; /* Your specified color for active dot */
    opacity: 1;
}
@media (max-width: 768px) {
    .slick-prev {
        left: 5px;
    }
    
    .slick-next {
        right: 5px;
    }
    
    /* Make mobile navigation more visible */
    .slick-prev, .slick-next {
        width: 35px;
        height: 35px;
    }
}