/* YouTube Video Slider Styles */
.youtube-video-slider-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Arial', sans-serif;
}

.youtube-slider-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 3px solid #ff0000;
    padding-bottom: 10px;
    display: inline-block;
}

.youtube-video-slider {
    position: relative;
    overflow: hidden;
}

.swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.swiper-slide {
    height: auto;
    display: flex;
}

.video-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.video-number {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff0000;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    z-index: 2;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-item:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.8);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-item:hover .play-overlay {
    opacity: 1;
}

.video-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.video-date {
    font-size: 12px;
    color: #666;
}

.video-category {
    background: #ff0000;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.video-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    text-decoration: none;
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: #ff0000;
    background: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: -22px;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #ff0000;
    color: white;
}

.swiper-button-disabled {
    opacity: 0.3;
}

/* Swiper Pagination */
.swiper-pagination {
    position: static;
    margin-top: 20px;
    text-align: center;
}

.swiper-pagination-bullet {
    background: #ccc;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #ff0000;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .youtube-video-slider-container {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .youtube-slider-title {
        font-size: 20px;
    }
    
    .video-thumbnail {
        height: 160px;
    }
    
    .video-title {
        font-size: 14px;
    }
    
    .video-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
        top: 10px;
        left: 10px;
    }
    
    .play-overlay {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 35px;
        height: 35px;
        margin-top: -17px;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .video-content {
        padding: 12px;
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .video-category {
        align-self: flex-end;
    }
}

/* Loading Animation */
.youtube-slider-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    font-size: 16px;
    color: #666;
}

.youtube-slider-loading:before {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.elementor-alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.elementor-alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.elementor-alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}


/* --- Split layout wrapper --- */
.yt-news-split {
  display: grid;
  grid-template-columns: 1.6fr 1fr; /* left bigger */
  gap: 20px;
  align-items: start;
}
.yt-col { width: 100%; }

/* --- Hero card --- */
.yt-hero-card {
    display: block;
    /* background: #fff; */
    /* border-radius: 16px; */
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
}
.yt-hero-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.yt-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.yt-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #e10600; /* red label */
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
}
.yt-play {
    position: absolute;
    /* bottom: 12px; */
    /* right: 12px; */
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.9);
    display: grid;
    place-items: center;
}
.yt-play i { color: #fff; font-size: 18px; }

.yt-hero-content {
  padding: 16px 10px;
}
.yt-hero-title {
    margin: 0;
    font-size: clamp(18px, 2.2vw, 20px);
    line-height: 1.3;
    font-weight: 700;
    color: #fff;
}

/* --- Sidebar --- */
.yt-side-heading {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
  color: #1e3a8a; /* deep blue */
}
.yt-side-list {
  display: grid;
  gap: 14px;
}
.yt-side-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    /* background: #fff; */
    border-radius: 12px;
    /* padding: 8px; */
    box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
    transition: transform .15s ease, box-shadow .15s ease;
    color: white !important;
    font-size: 20px !important;
}
.yt-side-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
}

.yt-side-index {
  background: #ef233c;
  color: #fff;
  font-weight: 800;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 14px;
}

/* Kill any earlier fixed width/height rule */
.yt-side-thumb {
  flex: 0 0 auto;
  width: 120px;              /* adjust to your design */
  aspect-ratio: 16 / 9;      /* keeps proper video aspect */
  height: auto;              /* let aspect-ratio compute height */
  border-radius: 10px;
  overflow: hidden;
}
.yt-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.yt-side-meta {
  display: grid;
  gap: 6px;
}
.yt-side-badge {
  display: inline-block;
  background: #e10600;
  color: #fff;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
}
.yt-side-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .yt-news-split { grid-template-columns: 1fr; }
  .yt-side-heading { margin-top: 8px; }
}

/* hero transition helpers */
.yt-anim-fade-out { opacity: 0; transition: opacity .2s ease; }
.yt-anim-fade-in  { opacity: 1; transition: opacity .3s ease; }
.yt-anim-slide-up { transform: translateY(-6px); opacity:.5; transition: all .2s ease; }
.yt-anim-slide-down { transform: translateY(0); opacity:1; transition: all .3s ease; }
/* --- Right list switches to flex so we can order items --- */
.yt-side-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Only show the N items we mark as visible */
.yt-side-item { 
  display: none; 
  opacity: .9; 
  transition: opacity .2s ease, transform .2s ease; 
}
.yt-side-item.is-visible { 
  display: flex; 
}
.yt-side-item.is-active { 
  opacity: .55;            /* current hero in list */
  pointer-events: none;
}

/* Hero animation: right -> left swap */
.yt-hero-media, .yt-hero-title { will-change: transform, opacity; }
.yt-hero-out-left   { transform: translateX(-24px); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
.yt-hero-pre-in     { transform: translateX(24px);  opacity: 0; }  /* set immediately before animating in */
.yt-hero-in-right   { transform: translateX(0);     opacity: 1; transition: transform .30s ease, opacity .30s ease; }

/* Optional subtle up-shift during change */
.yt-side-item.is-visible { transform: translateY(0); transition: transform .18s ease; }
.yt-news-split.shifting .yt-side-item.is-visible { transform: translateY(-6px); }
