/*---------------------------   main ---------------------------*/
main{
    display: flex;
    flex-direction: column;
    gap: 1vh;
    
}
body{
    background-color: rgb(var(--bg-color));
}

/*----------------------    welcom    ----------------------*/
header{
    height: 0 !important;
    width: 0 !important;
}
.welcom_container {
    display: flex;
    height: 80vh;
    max-height: 800px;
    min-height: 400px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.welcom {
    flex: 1;
    display: flex;
    position: relative;
}

.welcom_el {
    left: 0;
    top: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: all 0.6s ease;
}
.welcom_el::after{
    content: '';
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    position: absolute;
    background:linear-gradient(-90deg, rgba(var(--bg-color),0) 80%, rgb(var(--bg-color),1) ),
        linear-gradient(180deg, rgba(var(--bg-color),0), rgba(var(--bg-color),1) 100%) !important;
    pointer-events: none;
}
.welcom_el_img{
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    object-fit: cover !important;
    object-position: center !important;
    background-repeat: no-repeat !important;
    z-index: -5 !important;
}
.welcom_el_box {
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 1em;
    justify-content: center;
    margin-top: 15%;
    margin-left: 60%;
    align-items: center;
    padding: 2em;
    box-sizing: border-box;
    width: 35%;
    min-width: 300px;
}
.welcom_el_box *{
    z-index: 5 !important;
}
.welcom_el_box .btitle {
    font-size: clamp(1.5rem, 3vw, 3rem);
    font-weight: bold;
    color: rgb(var(--secondary-color));
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; 
    line-clamp: 2;
    overflow: hidden;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    margin: 0;
    text-align: center;
}

.welcom_el_box a {
    padding: 0.5em 1em;
    background-color: rgba(var(--primary-color),0.8);
    border: 1px solid rgb(var(--secondary-color));
    width: fit-content;
    font-weight: bold;
    font-size: clamp(0.9rem, 1.5vw, 1.5rem);    
    transition: all 0.3s ease;
    display: flex;
    gap: 0.5em;
    white-space: nowrap;
    align-items: center;
    border-radius: 0.2em;
    color: inherit;
    text-decoration: none;
}

.welcom_el_box a svg {
    width: 1em;
    height: 1em;
    transition: all 0.3s ease;
    fill: currentColor;
}

.welcom_el_box a:hover {
    background-color: rgb(var(--secondary-color));
    color: rgb(var(--primary-color));
    transform: translateY(-2px);
}

.slid_welcom {
    position: absolute;
    bottom: 3vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8em;
    z-index: 2;
}

.nav_welcom {
    border-radius: 100%;
    width: 12px;
    height: 12px;
    border: none;
    background-color: rgba(128, 128, 128, 0.432);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.nav_welcom:hover {
    background-color: rgba(128, 128, 128, 0.932);
}

.active_welcom_btn {
    background-color: rgb(var(--secondary-color)) !important;
    transform: scale(1.2);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .welcom_el_box {
        margin-left: 50%;
        width: 45%;
    }
}

@media (max-width: 992px) {
    .welcom_container {
        height: 70vh;
    }
    .welcom_el_box {
        margin-left: 40%;
        width: 55%;
        padding: 1.5em;
    }
}

@media (max-width: 768px) {
    .welcom_container {
        height: 60vh;
        min-height: 350px;
    }
    .welcom_el {
        background-size: cover !important;
        background-position: center !important;
    }
    .welcom_el_box {
        margin-left: 5%;
        width: 90%;
        margin-top: 30%;
        background-color: rgba(var(--bg-color), 0.1);
        border-radius: 0.5em;
        align-items: center;
        text-align: center;
    }
    .slid_welcom {
        bottom: 2vh;
    }
}

@media (max-width: 576px) {
    .welcom_container {
        height: 50vh;
        min-height: 300px;
    }
    .welcom_el_box {
        margin-top: 40%;
        padding: 1em;
        gap: 0.8em;
    }
    .welcom_el_box .btitle {
        font-size: 1.5rem;
    }
    .welcom_el_box a {
        font-size: 1rem;
        padding: 0.4em 0.8em;
    }
    .nav_welcom {
        width: 10px;
        height: 10px;
    }
}

/* For very small screens */
@media (max-width: 400px) {
    .welcom_container {
        height: 45vh;
    }
    .welcom_el_box {
        margin-top: 50%;
    }
}
/*----------------------    section    ----------------------*/
   .content-block {
      padding: 3rem 0;
      position: relative;
      max-width: 90%;
      min-width: 90%;
      margin: 0 auto;
    }

    .block-header {
      display: flex;
      flex-direction: row-reverse;
      justify-content: space-between;
      align-items: center;
      padding: 0 5%;
      margin-bottom: 1.5rem;
    }

    .block-title {
      font-size: 1.8rem;
      font-weight: 700;
      position: relative;
      color: rgb(var(--secondary-color));
    }

    .block-title::after {
      content: '';
      position: absolute;
      bottom: -8px;
      left: 0;
      width: 60px;
      height: 3px;
      background: rgb(var(--secondary-color));
      border-radius: 3px;
    }

    .slider-controls {
      display: flex;
      gap: 0.8rem;
    }

    .slider-controls button {
      width: 2.8rem;
      height: 2.8rem;
      border-radius: 50%;
      background: rgba(var(--secondary-color), 0.1);
      border: 1px solid rgba(var(--secondary-color), 0.3);
      color: rgb(var(--secondary-color));
      font-size: 1.2rem;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .slider-controls button:hover {
      background: rgb(var(--secondary-color));
      color: white;
      transform: scale(1.1);
    }

    .recommended-slider {
      padding: 0rem 0%  1rem 0% !important;
      overflow: hidden;
      max-width: 90%;
      margin: 0 auto;
    }

    

    

    /* ===== RESPONSIVE ADJUSTMENTS ===== */
    @media (max-width: 1024px) {
      .recommended-slider {
        padding: 1rem 5%;
      }
    }

    @media (max-width: 768px) {
      .block-header {
        align-items: flex-start;
        gap: 1rem;
      }
      
      .content-block{
        max-width: 100%;
      }
    }

    @media (max-width: 480px) {
      .content-block {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
      }
      
      .comments-placeholder {
        padding: 1.5rem;
      }
      
      .block-title {
        font-size: 1.5rem;
      }
    }
    .slider-controls button[disabled] {
        opacity: 0.3;
        cursor: not-allowed;
        transform: none !important;
    }
    
    .slider-controls button[disabled]:hover {
        background: rgba(var(--secondary-color), 0.1) !important;
        color: rgb(var(--secondary-color)) !important;
    }
        @media (max-width: 270px) {
      .block-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
      }
    }


/* Episode Cards */
.watched_ep_cadre{
    position: relative;
    width: fit-content !important;
    height: fit-content !important;
}
.watched_ep {
    display: flex;
    width: 280px;
    min-width: 280px;
    height: 160px;
    border-radius: 0.5em;
    border: 1px solid rgb(var(--primary-color));
    background-color: rgba(var(--primary-color), 0.5);
    overflow: hidden;
    position: relative;
    
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.watched_ep_img{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-position: center !important;
    background-repeat: no-repeat !important;
    object-fit: cover !important;
}
.watched_ep_cadre:hover .watched_ep {
    box-shadow: 0 5px 15px rgba(var(--secondary-color), 0.3);
}

.watched_ep .episode_info {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(0deg, rgba(var(--bg-color), 0.8) 30%, transparent 100%);
    flex: 1;
    box-sizing: border-box;
    padding: 1em;
    gap: 0.5em;
}

.watched_ep .title {
    font-size: 1.1rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; 
    line-clamp: 2;
    overflow: hidden;
    margin: 0;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.watched_ep .episode {
    background-color: rgb(95, 165, 95) !important;
    color: white;
    padding: 0.3em 0.8em;
    border-radius: 1em;
    font-size: 0.9rem;
    width: fit-content;
}

.watched_ep .ep_onhover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(var(--bg-color), 0.6);
    opacity: 0;
    transition: all 0.3s ease;
}

.watched_ep .ep_onhover svg {
    width: 3em;
    height: 3em;
    fill: rgba(var(--secondary-color), 1);
}

.watched_ep_cadre:hover .watched_ep .ep_onhover {
    opacity: 1;
}
.watched_ep_cadre .next_episode{
    position: absolute;
    display: flex;
    gap: 0.5em;
    top: 2%;
    right: 2%;
    padding: 0.2em 0.5em;
    opacity: 0;
    pointer-events: none;
    background-color: rgba(var(--primary-color), 1);
    z-index: 4;
    border-radius: 0.5em;
    transform: translateX(50%);
    transition: all 0.3s ease;
}

.watched_ep_cadre .next_episode svg{
    width: 1.2rem;
    height: 1.2rem;
    transition: all 0.3s ease;
}

.watched_ep_cadre .next_episode:hover{
    background-color: rgb(95, 165, 95);
}
.watched_ep_cadre:hover .next_episode{
    opacity: 1 !important;
    pointer-events: all !important;
    transform: translateX(0%);

}


/* Responsive Adjustments */
@media (max-width: 1200px) {
    .section {
        width: 90vw;
    }
}

@media (max-width: 992px) {
    .watched_ep {
        width: 240px;
        min-width: 240px;
        height: 135px;
    }
    
    .content_list {
        gap: 0.8em;
        padding: 0.8em;
    }
}

@media (max-width: 768px) {
    .section_header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }
    
    .watched_ep {
        width: 200px;
        min-width: 200px;
        height: 120px;
    }
    
    .section_content::after,
    .section_content::before {
        width: 30px;
    }
    .slide_l{
        left: -2.5em;

    }
    .slide_r{
        right: -2.5em;
    }
}

@media (max-width: 576px) {
    .section {
        width: 100vw;
        padding: 1em 0.5em;
    }
    
    .content_list {
        padding: 0.5em;
    }
    
    .watched_ep {
        width: 180px;
        min-width: 180px;
        height: 100px;
    }
    
    .watched_ep .episode_info {
        padding: 0.8em;
    }
    
    .watched_ep .title {
        font-size: 0.9rem;
    }
    
    .advs h2 {
        min-width: 100%;
    }
    .content_list {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .slider_btn{
        display: none;
    }

}

/* Hide gradient overlays on mobile */
@media (max-width: 480px) {
    .section_content::after,
    .section_content::before {
        display: none;
    }
}


.pagination button{
    padding: 0.5em;
    background-color: rgba(var(--primary-color),0.5);
    border: 1px solid rgb(var(--primary-color));
    border-radius: 0.3em;
    transition: all 0.3s ease;
    align-content: center;
    text-align: center;
    cursor: pointer;
}
.pagination button:hover{
    background-color: rgba(var(--secondary-color),1);
}
.pagination button svg{
    width: 1em;
    height: 1em;
}
.episodes_container{
    justify-content: space-around !important;
    row-gap: 1em;

}