/* Instagram Reels Widget Styles */

.irw-container {
    width: 100%;
    padding: 40px 0;
}

.irw-header {
    text-align: center;
    margin-bottom: 50px;
}

.irw-title {
    font-size: 42px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.irw-subtitle {
    font-size: 16px;
    color: #666666;
    margin: 0;
    font-weight: 400;
}

.irw-carousel-wrapper {
    position: relative;
    padding: 0 50px;
}

/* Swiper Styles */
.irw-swiper {
    overflow: hidden;
}

.irw-reel-card {
    position: relative;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.irw-reel-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.irw-reel-image {
    position: relative;
    width: 100%;
    padding-bottom: 177.78%; /* 16:9 aspect ratio */
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.irw-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.irw-play-button svg {
    width: 24px;
    height: 24px;
}

.irw-reel-card:hover .irw-play-button {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.1);
}

.irw-reel-stats {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.irw-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.irw-stat svg {
    width: 16px;
    height: 16px;
}

/* Navigation Buttons */
.irw-button-prev,
.irw-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background-color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #333;
}

.irw-button-prev:hover,
.irw-button-next:hover {
    background-color: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.irw-button-prev {
    left: 0;
}

.irw-button-next {
    right: 0;
}

/* Pagination */
.irw-pagination {
    text-align: center;
    margin-top: 30px;
}

.irw-pagination .swiper-pagination-bullet {
    background-color: #ddd;
    opacity: 1;
    width: 10px;
    height: 10px;
    margin: 0 6px;
    transition: all 0.3s ease;
}

.irw-pagination .swiper-pagination-bullet-active {
    background-color: #333;
    width: 30px;
    border-radius: 5px;
}

/* Error Message */
.irw-error {
    text-align: center;
    padding: 30px;
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1440px) {
    .irw-carousel-wrapper {
        padding: 0 40px;
    }
}

@media (max-width: 1024px) {
    .irw-title {
        font-size: 36px;
    }
    
    .irw-subtitle {
        font-size: 15px;
    }
    
    .irw-carousel-wrapper {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .irw-container {
        padding: 30px 0;
    }
    
    .irw-header {
        margin-bottom: 35px;
    }
    
    .irw-title {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .irw-subtitle {
        font-size: 14px;
    }
    
    .irw-carousel-wrapper {
        padding: 0 20px;
    }
    
    .irw-button-prev,
    .irw-button-next {
        width: 40px;
        height: 40px;
    }
    
    .irw-play-button {
        width: 50px;
        height: 50px;
    }
    
    .irw-play-button svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 576px) {
    .irw-container {
        padding: 20px 0;
    }
    
    .irw-header {
        margin-bottom: 25px;
    }
    
    .irw-title {
        font-size: 22px;
    }
    
    .irw-subtitle {
        font-size: 13px;
    }
    
    .irw-carousel-wrapper {
        padding: 0 15px;
    }
    
    .irw-button-prev,
    .irw-button-next {
        width: 36px;
        height: 36px;
        display: none; /* Hide on mobile for better mobile experience */
    }
    
    .irw-reel-card {
        border-radius: 16px;
    }
    
    .irw-reel-stats {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .irw-stat {
        font-size: 11px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .irw-title {
        font-size: 18px;
    }
    
    .irw-subtitle {
        font-size: 12px;
    }
    
    .irw-carousel-wrapper {
        padding: 0 10px;
    }
}

/* Lazy Loading Animation */
.irw-reel-image {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Focus States for Accessibility */
.irw-button-prev:focus,
.irw-button-next:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.swiper-pagination-bullet:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}
