/* ==========================================================================
   ALJANIA YOUTUBE VIDEO WIDGET CSS
   ========================================================================== */

.aljania-youtube-widget-container {
    width: 100%;
    box-sizing: border-box;
}

.aljania-youtube-inner {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    vertical-align: middle;
}

.aljania-youtube-player-frame {
    position: relative;
    width: 100%;
    background-color: #050505;
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.aljania-youtube-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    background-color: #000000;
}

/* Aspect Ratio Presets */
.aljania-youtube-wrapper.aspect-16-9 {
    padding-top: 56.25%; /* 16:9 HD */
}

.aljania-youtube-wrapper.aspect-4-3 {
    padding-top: 75%; /* 4:3 */
}

.aljania-youtube-wrapper.aspect-1-1 {
    padding-top: 100%; /* 1:1 Square */
}

.aljania-youtube-wrapper.aspect-9-16 {
    padding-top: 177.77%; /* 9:16 Vertical / Shorts / TikTok */
}

.aljania-youtube-wrapper.aspect-21-9 {
    padding-top: 42.85%; /* 21:9 Ultrawide Cinema */
}

.aljania-youtube-wrapper.aspect-custom {
    padding-top: 0;
}

/* Iframes */
.aljania-youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Poster Overlay */
.aljania-youtube-overlay-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    overflow: hidden;
    background: #000000;
}

.aljania-youtube-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.aljania-youtube-overlay-wrap:hover .aljania-youtube-poster {
    transform: scale(1.04);
    filter: brightness(0.92);
}

/* Play Button */
.aljania-youtube-play-btn {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #1b5e20;
    color: #ffffff;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    padding: 0;
}

.aljania-youtube-play-btn i {
    font-size: 24px;
    margin-left: 4px; /* Optical center for triangle play icon */
    color: #ffffff;
    transition: transform 0.2s ease;
}

.aljania-youtube-overlay-wrap:hover .aljania-youtube-play-btn {
    transform: scale(1.12);
    box-shadow: 0 14px 30px rgba(27, 94, 32, 0.45);
}

.aljania-youtube-overlay-wrap:hover .aljania-youtube-play-btn i {
    transform: scale(1.08);
}

/* Radar Pulse / Wave Animation */
.aljania-youtube-play-btn.with-pulse::before,
.aljania-youtube-play-btn.with-pulse::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid #1b5e20;
    opacity: 0;
    pointer-events: none;
}

.aljania-youtube-play-btn.with-pulse::before {
    animation: aljaniaYtPulse 2.2s infinite ease-out;
}

.aljania-youtube-play-btn.with-pulse::after {
    animation: aljaniaYtPulse 2.2s infinite ease-out 0.8s;
}

@keyframes aljaniaYtPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.35);
        opacity: 0.35;
    }
    100% {
        transform: scale(1.75);
        opacity: 0;
    }
}

/* Captions / Legend */
.aljania-youtube-caption {
    width: 100%;
    box-sizing: border-box;
}

.aljania-caption-below {
    margin-top: 14px;
}

.aljania-caption-above {
    margin-bottom: 14px;
}

.aljania-youtube-caption-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 6px 0;
}

.aljania-youtube-caption-desc {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.65;
    margin: 0;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .aljania-youtube-play-btn {
        width: 58px;
        height: 58px;
    }
    .aljania-youtube-play-btn i {
        font-size: 20px;
    }
    .aljania-youtube-caption-title {
        font-size: 1.1rem;
    }
    .aljania-youtube-caption-desc {
        font-size: 0.88rem;
    }
}
