:root {
    --main-color: #d4af37;
    --main-hover: #e8c964;
    --main-contrast: #14110a;
    --body-bg: #181616;
    --box-bg: #221f1f;
    --text-color: #ffffff;

    --nav-height: 60px;
    --space-top: 30px;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Cairo", sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    padding-top: var(--nav-height);
}

a {
    text-decoration: none;
    color: unset;
}

img {
    max-width: 100%;
}

.main-color {
    color: var(--main-color);
}

.container {
    max-width: 1920px;
    padding: 0 40px;
    margin: auto;
}

.overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99;
    background-color: #000000;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-color);
    height: var(--nav-height);
}

.nav a {
    color: var(--text-color);
}

.logo {
    font-size: 2rem;
    font-weight: 900;
}

.nav-menu {
    list-style-type: none;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.nav-menu li ~ li {
    margin-inline-start: 30px;
}

.nav-menu a {
    text-transform: uppercase;
    font-weight: 700;
}

.nav-menu a:hover {
    color: var(--main-color);
}

.nav-menu a.btn:hover,
a.logo:hover,
a.movie-item:hover {
    color: unset;
}

.btn {
    color: var(--main-contrast);
    padding: 0.25rem 1.5rem;
    text-transform: uppercase;
    font-size: 1.25rem;
    font-weight: 700;
    display: inline-flex;
    position: relative;
    align-items: center;
}

.btn-hover::before {
    z-index: 1;
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--main-color);
    transition: 0.3s ease-in-out;
}

.btn-hover:hover::before {
    background-color: var(--main-hover);
}

.btn i,
.btn span {
    z-index: 1;
}

.btn i {
    margin-inline-end: 1rem;
}

.hamburger-menu {
    --size: 30px;
    height: var(--size);
    width: var(--size);
    cursor: pointer;
    z-index: 101;
    position: relative;
    display: none;
    align-items: center;
}

.hamburger {
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    width: var(--size);
    height: 3px;
    border-radius: 0.5rem;
    background-color: var(--text-color);
    transition: 0.4s;
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -10px;
}

.hamburger::after {
    bottom: -10px;
}

.hamburger-menu.active .hamburger {
    background-color: transparent;
}

.hamburger-menu.active .hamburger::before {
    transform-origin: top left;
    transform: rotate(45deg);
    left: 6px;
}

.hamburger-menu.active .hamburger::after {
    transform-origin: bottom left;
    transform: rotate(-45deg);
    left: 6px;
}

.hero-slide-item {
    padding-top: 40%;
    position: relative;
    overflow: hidden;
}

.hero-slide-item img {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-slide-item-content {
    direction: ltr;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--text-color);
    display: flex;
}

.item-content-wraper {
    padding-inline-start: 5rem;
    width: 40%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.item-content-wraper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
}

.item-content-title {
    font-size: 5rem;
    line-height: 5rem;
    font-weight: 900;
}

.movie-infos {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-top: calc(var(--space-top) / 2);
}

.movie-info {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.movie-info span {
    margin-inline-start: 5px;
}

.movie-info i {
    color: var(--main-color);
}

.movie-info ~ .movie-info {
    margin-inline-start: 5px;
}

.item-content-description {
    font-size: 1.15rem;
    margin-top: var(--space-top);
    line-height: 1.5rem;
}

.item-action {
    margin-top: var(--space-top);
}

.carousel-nav-center {
    position: relative;
}

.carousel-nav-center .owl-nav button i {
    font-size: 3rem;
}

.carousel-nav-center .owl-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-nav-center .owl-nav .owl-prev {
    position: absolute;
    left: 5px;
}

.carousel-nav-center .owl-nav .owl-next {
    position: absolute;
    right: 5px;
}

.owl-nav button {
    border: none;
    outline: none;
}

.owl-nav button i {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
}

.owl-nav button:hover i {
    color: var(--main-color);
}

.top-down {
    transform: translateY(-50px);
    visibility: hidden;
    opacity: 0;
    transition: 0.5s ease-in-out;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-6 {
    transition-delay: 0.6s;
}

.delay-8 {
    transition-delay: 0.8s;
}

.owl-item.active .top-down {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
}

.movie-item {
    display: block;
    position: relative;
    overflow: hidden;
    padding-top: 140%;
    cursor: pointer;
}

.movie-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.3s linear;
}

.movie-item:hover img {
    transform: scale(1.2);
}

.movie-item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px;
    background-color: rgba(0, 0, 0, 0.8);
}

.movie-item-content::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
}

.movie-item-title {
    color: var(--text-color);
    font-size: 1.5rem;
    position: relative;
    font-weight: 700;
}

.section {
    padding-top: 80px;
}

.section-header {
    margin-bottom: 30px;
    padding-inline-start: 20px;
    text-transform: uppercase;
    font-size: 1.5rem;
    font-weight: 700;
    border-inline-start: 4px solid var(--main-color);
    display: flex;
    align-items: center;
}

.pricing-header {
    margin-bottom: 30px;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
}

.pricing-box {
    padding: 50px;
    margin: 15px 0;
    background-color: var(--box-bg);
    border-top: 5px solid transparent;
    transition: transform 0.3s ease-in-out;
}

.pricing-box:hover {
    transform: translateY(-20px);
}

.pricing-box.hightlight {
    border-top: 5px solid var(--main-color);
}

.pricing-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.5rem;
}

.pricing-price {
    font-weight: 700;
}

.pricing-price span {
    font-size: 1rem;
}

.pricing-box-content {
    text-align: center;
    margin-top: 60px;
    font-size: 1.25rem;
}

.pricing-box-action {
    text-align: center;
    margin-top: 60px;
}

footer.section {
    margin-top: 80px;
    padding-bottom: 80px;
    position: relative;
    background-color: var(--box-bg);
}

footer a:hover {
    color: var(--main-color);
}

footer a.logo {
    margin-top: -2.5rem;
    display: block;
}

footer a.logo:hover {
    color: unset;
}

.social-list {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.social-item {
    --size: 30px;
    height: var(--size);
    width: var(--size);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background-color: var(--text-color);
    color: var(--main-color);
}

.social-item:hover {
    background-color: var(--main-color);
    color: var(--main-contrast);
}

.social-item ~ .social-item {
    margin-inline-start: 20px;
}

footer .content {
    margin-top: 20px;
}

.footer-menu {
    list-style-type: none;
}

.footer-menu a {
    display: inline-block;
    transition: transform 0.2s ease-in-out;
}

.footer-menu a:hover {
    transform: translateX(5px);
}

.copyright {
    padding: 10px;
    border-top: 1px solid var(--body-bg);
    background-color: var(--box-bg);
    text-align: center;
}

/* VIDEO MODAL (cinema mode) */

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    background-color: #000000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease-in-out, visibility 0.4s;
}

.video-modal.open {
    visibility: visible;
    opacity: 1;
}

.video-modal video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000000;
}

.video-modal-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    transition: opacity 0.4s;
}

.video-modal.idle .video-modal-bar {
    opacity: 0;
}

.video-modal.idle {
    cursor: none;
}

.video-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.video-modal-close {
    width: 44px;
    height: 44px;
    border: none;
    outline: none;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.6);
}

.video-modal-close i {
    font-size: 2rem;
}

.video-modal-close:hover {
    color: var(--main-color);
}

.video-limit {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.88);
}

.video-limit.show {
    display: flex;
}

.video-limit-icon {
    font-size: 4rem;
}

.video-limit-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-top: 10px;
}

.video-limit-text {
    font-size: 1.25rem;
    margin: 15px 0 35px;
}

/* APP DOWNLOAD BADGE */

.app-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px 8px 14px;
    margin-top: 10px;
    background-color: #000000;
    border: 2px solid #a6a6a6;
    border-radius: 10px;
    color: var(--text-color);
    transition: border-color 0.2s, background-color 0.2s;
}

.app-badge i {
    font-size: 2.2rem;
}

.app-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}

.app-badge-text small {
    font-size: 0.75rem;
}

.app-badge-text strong {
    font-size: 1.4rem;
    font-weight: 700;
}

footer a.app-badge:hover {
    color: var(--text-color);
    border-color: var(--main-color);
}

/* LANGUAGE SWITCH + RTL (Arabic) */

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-switch i {
    font-size: 1.5rem;
    color: var(--main-color);
}

.lang-switch select {
    background-color: #000000;
    color: var(--text-color);
    border: 1px solid #555555;
    border-radius: 6px;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.lang-switch select:hover,
.lang-switch select:focus {
    border-color: var(--main-color);
}

.lang-switch select option {
    background-color: #000000;
}

/* the carousels slide with their own left-to-right logic */
.owl-carousel {
    direction: ltr;
}

html[dir="rtl"] .item-content-wraper,
html[dir="rtl"] .movie-item-content {
    direction: rtl;
}

html[dir="rtl"] .footer-menu a:hover {
    transform: translateX(-5px);
}

html[dir="rtl"] .app-badge-text {
    text-align: right;
}

.footer-col-center {
    display: flex;
    justify-content: center;
}

.footer-col-right {
    display: flex;
    justify-content: flex-end;
}

/* GENRE DROPDOWN */

.nav-menu li.has-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--nav-height);
}

.has-dropdown > a::after {
    content: "\25BE";
    margin-inline-start: 6px;
    font-size: 0.8em;
}

.dropdown {
    list-style-type: none;
    position: absolute;
    top: 100%;
    inset-inline-start: -20px;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 4px 28px;
    padding: 18px 24px;
    background-color: #000000;
    border-top: 3px solid var(--main-color);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.25s ease-in-out;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.nav-menu .dropdown li ~ li,
.nav-menu .dropdown li {
    margin: 0;
}

.nav-menu .dropdown a {
    display: block;
    padding: 6px 0;
    text-transform: none;
    font-weight: 600;
    white-space: nowrap;
}

/* GENRE RESULTS */

.genre-results[hidden] {
    display: none;
}

.genre-results {
    scroll-margin-top: var(--nav-height);
}

.genre-results .section-header {
    gap: 10px;
}

.genre-results-count {
    color: var(--main-color);
}

.genre-results-close {
    margin-inline-start: auto;
    width: 36px;
    height: 36px;
    border: none;
    outline: none;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--text-color);
    background-color: var(--box-bg);
}

.genre-results-close i {
    font-size: 1.75rem;
}

.genre-results-close:hover {
    color: var(--main-color);
}

.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 15px;
}

.genre-empty {
    font-size: 1.25rem;
    grid-column: 1 / -1;
}

/* DETAIL HERO */

.detail-hero[hidden] {
    display: none;
}

.detail-hero {
    position: relative;
    height: 40vw;
    min-height: 420px;
    max-height: 640px;
    overflow: hidden;
    background-color: #000000;
}

.detail-bg {
    position: absolute;
    inset: -40px;
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.55);
}

.detail-bg.is-banner {
    inset: 0;
    filter: none;
}

.detail-poster {
    position: absolute;
    top: 50%;
    inset-inline-end: 8%;
    transform: translateY(-50%);
    height: 82%;
    aspect-ratio: 5 / 7;
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.detail-hero .hero-slide-item-content {
    z-index: 1;
}

.detail-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: calc(var(--space-top) / 2);
}

.detail-genre {
    padding: 2px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--main-color);
    border-radius: 20px;
}

.detail-close {
    position: absolute;
    top: 15px;
    inset-inline-end: 15px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: none;
    outline: none;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.6);
}

.detail-close i {
    font-size: 1.75rem;
}

.detail-close:hover {
    color: var(--main-color);
}

.movie-item {
    cursor: pointer;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    z-index: 300;
    padding: 12px 24px;
    transform: translate(-50%, 20px);
    background-color: #000000;
    border: 1px solid var(--main-color);
    border-radius: 8px;
    font-weight: 700;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

#movies,
#series,
#cartoons {
    scroll-margin-top: calc(var(--nav-height) - 40px);
}

/* RESPONSIVE */

@media only screen and (max-width: 1280px) {
    html {
        font-size: 14px;
    }

    .hero-slide-item {
        padding-top: 50%;
    }

    .item-content-wraper {
        width: 50%;
    }
}

@media only screen and (max-width: 850px) {
    html {
        font-size: 12px;
    }

    .container {
        padding: 0 15px;
    }

    .hero-slide-item {
        height: max-content;
        padding-top: unset;
    }

    .item-content-wraper {
        width: 100%;
        height: 100%;
        padding-bottom: 20px;
        padding-right: 5rem;
        background-color: rgba(0, 0, 0, 0.2);
    }

    .hero-slide-item-content {
        position: relative;
    }

    .hero-slide-item img {
        height: 100%;
    }

    .item-content-title {
        font-size: 3rem;
    }

    .hamburger-menu {
        display: grid;
    }

    .nav-menu {
        /* display: none; */
        position: absolute;
        top: 100%;
        left: -100%;
        background-color: #000000;
        flex-direction: column;
        width: 80%;
        height: 100vh;
        padding: 20px;
        transition: 0.3s ease-in-out;
    }

    .nav-menu li {
        margin: 10px 30px;
    }

    .nav-menu.active {
        left: 0;
    }
}

@media only screen and (max-width: 850px) {
    .footer-col-center,
    .footer-col-right {
        justify-content: flex-start;
    }
}

@media only screen and (max-width: 850px) {
    .nav-menu li.has-dropdown {
        height: auto;
        flex-direction: column;
        align-items: flex-start;
    }

    .dropdown {
        position: static;
        display: none;
        grid-template-columns: repeat(2, max-content);
        box-shadow: none;
        padding: 10px 0 0;
        border-top: none;
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .has-dropdown.open .dropdown {
        display: grid;
    }
}

@media only screen and (max-width: 850px) {
    .detail-hero {
        height: auto;
        min-height: 480px;
    }

    .detail-poster {
        display: none;
    }

    .detail-hero .hero-slide-item-content {
        min-height: 480px;
    }
}
