/* Webreta YouTube Gallery - Frontend */

/* Gallery Grid */
.wryg-gallery {
    display: grid;
    gap: 24px;
}

.wryg-gallery.wryg-cols-1 { grid-template-columns: 1fr; }
.wryg-gallery.wryg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wryg-gallery.wryg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wryg-gallery.wryg-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .wryg-gallery.wryg-cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .wryg-gallery.wryg-cols-3,
    .wryg-gallery.wryg-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .wryg-gallery { 
        grid-template-columns: 1fr !important; 
        gap: 0 !important;
    }
    
    .wryg-gallery .wryg-item {
        padding-bottom: 24px;
        margin-bottom: 24px;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .wryg-gallery .wryg-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

/* Item */
.wryg-item,
.wryg-single,
.wryg-latest {
    position: relative;
}

/* Thumbnail */
.wryg-thumb {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    display: block;
}

.wryg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.wryg-thumb:hover img {
    transform: scale(1.05);
}

/* Shorts aynı boyut */
.wryg-shorts .wryg-thumb {
    aspect-ratio: 16/9;
}

/* Play Button */
.wryg-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.wryg-play svg {
    width: 68px;
    height: 48px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.wryg-play-lg svg {
    width: 88px;
    height: 62px;
}

.wryg-play-bg {
    fill: #ff0000;
    fill-opacity: 0.9;
    transition: fill-opacity 0.2s;
}

.wryg-play-icon {
    fill: #fff;
}

.wryg-thumb:hover .wryg-play {
    transform: translate(-50%, -50%) scale(1.1);
}

.wryg-thumb:hover .wryg-play-bg {
    fill-opacity: 1;
}

/* Badges */
.wryg-shorts-badge,
.wryg-new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff0000;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
    pointer-events: none;
}

.wryg-new-badge {
    background: #22c55e;
}

/* Title & Desc */
.wryg-title {
    margin: 12px 0 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #0f0f0f !important;
}

.wryg-title-lg {
    font-size: 18px !important;
}

.wryg-desc {
    margin: 6px 0 0 !important;
    font-size: 13px !important;
    color: #666 !important;
    line-height: 1.5 !important;
}

.wryg-no-videos,
.wryg-error {
    text-align: center;
    padding: 40px;
    color: #666;
}


/* ==========================================================
   MODAL - Full Reset & Flatsome Override
   ========================================================== */

#wryg-modal,
#wryg-modal *,
#wryg-modal *::before,
#wryg-modal *::after {
    all: unset !important;
    box-sizing: border-box !important;
}

#wryg-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483647 !important;
}

#wryg-modal.wryg-visible {
    display: block !important;
}

/* Backdrop */
#wryg-modal .wryg-modal-backdrop {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.85) !important;
    cursor: pointer !important;
    z-index: 1 !important;
}

/* Wrapper */
#wryg-modal .wryg-modal-wrap {
    display: block !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 900px !important;
    z-index: 2 !important;
}

/* Close Button - Full Reset */
#wryg-modal .wryg-modal-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: -50px !important;
    right: 0 !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    border-radius: 50% !important;
    color: #fff !important;
    font-size: 32px !important;
    font-family: Arial, sans-serif !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

#wryg-modal .wryg-modal-close:hover,
#wryg-modal .wryg-modal-close:focus {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: rotate(90deg) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Video Container */
#wryg-modal .wryg-modal-video {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    padding-bottom: 56.25% !important;
    height: 0 !important;
    background: #000 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5) !important;
}

/* iframe */
#wryg-modal .wryg-modal-video iframe,
#wryg-modal #wryg-modal-iframe {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
}

/* Body lock */
body.wryg-modal-open {
    overflow: hidden !important;
}

/* Responsive */
@media (max-width: 768px) {
    #wryg-modal .wryg-modal-wrap {
        width: 95% !important;
    }
    
    #wryg-modal .wryg-modal-close {
        top: -46px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 28px !important;
    }
    
    #wryg-modal .wryg-modal-video {
        border-radius: 8px !important;
    }
}