:root {
    --hero-height: clamp(400px, 65vh, 700px);
    --hero-mobile-height: clamp(350px, 55vh, 500px);
    --hero-content-padding: clamp(1.5rem, 4vw, 2.5rem);
    --hero-overlay-opacity: 0.75;
    --hero-transition-duration: 0.8s;
    --hero-auto-play-duration: 4000ms;

    --hero-title-size: clamp(1.4rem, 7vw, 3.8rem);
    --hero-badge-size: clamp(0.6rem, 2.5vw, 0.85rem);
    --hero-info-size: clamp(0.7rem, 2.8vw, 0.95rem);
    --hero-description-size: clamp(0.75rem, 3vw, 1.05rem);
    --hero-btn-size: clamp(0.7rem, 2.8vw, 0.95rem);

    --hero-btn-mobile-size: clamp(40px, 12vw, 48px);
    --hero-btn-desktop-min-width: clamp(110px, 28vw, 140px);
    --hero-icon-size: clamp(16px, 5vw, 20px);
    --hero-icon-mobile-size: clamp(18px, 6vw, 22px);

    --hero-fadeup-distance: 30px;
    --hero-skeleton-speed: 1.5s;
}

[data-theme="dark"] {
    --hero-overlay-bg: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.3) 40%,
            rgba(0, 0, 0, 0.8) 85%,
            rgba(0, 0, 0, 0.95) 100%);
    --hero-text-primary: #ffffff;
    --hero-text-secondary: rgba(255, 255, 255, 0.85);
    --hero-text-muted: rgba(255, 255, 255, 0.65);
    --hero-badge-bg: rgba(0, 0, 0, 0.6);
    --hero-btn-primary-bg: #ffffff;
    --hero-btn-primary-color: #000000;
    --hero-btn-secondary-bg: rgba(255, 255, 255, 0.15);
    --hero-btn-secondary-color: #ffffff;
    --hero-btn-tertiary-bg: rgba(255, 255, 255, 0.08);
    --hero-btn-tertiary-color: rgba(255, 255, 255, 0.8);

    --hero-skeleton-bg: rgba(255, 255, 255, 0.08);
    --hero-skeleton-shine: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] {
    --hero-overlay-bg: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.2) 40%,
            rgba(0, 0, 0, 0.7) 85%,
            rgba(0, 0, 0, 0.9) 100%);
    --hero-text-primary: #ffffff;
    --hero-text-secondary: rgba(255, 255, 255, 0.9);
    --hero-text-muted: rgba(255, 255, 255, 0.75);
    --hero-badge-bg: rgba(255, 255, 255, 0.2);
    --hero-btn-primary-bg: #ffffff;
    --hero-btn-primary-color: #000000;
    --hero-btn-secondary-bg: rgba(255, 255, 255, 0.2);
    --hero-btn-secondary-color: #ffffff;
    --hero-btn-tertiary-bg: rgba(255, 255, 255, 0.1);
    --hero-btn-tertiary-color: rgba(255, 255, 255, 0.9);

    --hero-skeleton-bg: rgba(0, 0, 0, 0.06);
    --hero-skeleton-shine: rgba(0, 0, 0, 0.08);
}

.hero-section {
    position: relative;
    width: 100%;
    height: var(--hero-height);
    overflow: hidden;
    background: var(--footer-bg);
    margin-bottom: clamp(2rem, 5vw, 3rem);
    border-radius: 0 0 clamp(16px, 4vw, 24px) clamp(16px, 4vw, 24px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    outline: none;
    contain: layout style paint;
    isolation: isolate;
}

@media (max-width: 768px) {
    .hero-section {
        height: var(--hero-mobile-height);
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
        border-radius: 0 0 clamp(12px, 3vw, 16px) clamp(12px, 3vw, 16px);
    }
}

.hero-section,
.hero-section *,
.hero-btn,
.hero-content {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.hero-section:focus,
.hero-section:focus-visible,
.hero-btn:focus,
.hero-btn:focus-visible,
.hero-btn:active {
    outline: none;
    border: none;
    box-shadow: none;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--hero-transition-duration) cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.8) contrast(1.1);
}

.hero-image.loaded {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hero-overlay-bg);
    z-index: 2;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--hero-content-padding);
    z-index: 3;
    max-width: 1400px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "badge"
        "title"
        "info"
        "description"
        "actions";
    gap: clamp(6px, 2vw, 16px);
    align-content: end;

    opacity: 0;
    transform: translateY(var(--hero-fadeup-distance));
    transition: all var(--hero-transition-duration) cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-content.loaded {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 769px) {
    .hero-content {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "badge ."
            "title ."
            "info ."
            "description actions";
        gap: clamp(12px, 2.5vw, 20px) clamp(20px, 4vw, 32px);
    }
}

@media (min-width: 1200px) {
    .hero-content {
        grid-template-columns: 2fr 1fr;
    }
}

.hero-badge {
    grid-area: badge;
    display: inline-flex;
    align-items: center;
    gap: clamp(3px, 1vw, 6px);
    background: var(--hero-badge-bg);
    color: white;
    padding: clamp(4px, 1.5vw, 8px) clamp(8px, 3vw, 16px);
    border-radius: clamp(4px, 1.5vw, 8px);
    font-size: var(--hero-badge-size);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    justify-self: start;
    width: fit-content;
    animation: hero-badgePulse 2s ease-in-out infinite;
}

.hero-title {
    grid-area: title;
    font-size: var(--hero-title-size);
    font-weight: 800;
    color: var(--hero-text-primary);
    line-height: 1.1;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.02em;
    margin: 0;
    max-width: clamp(280px, 85vw, 800px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.hero-info {
    grid-area: info;
    display: flex;
    align-items: center;
    gap: clamp(6px, 2vw, 16px);
    flex-wrap: wrap;
}

.hero-info>span {
    color: var(--hero-text-secondary);
    font-size: var(--hero-info-size);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: clamp(2px, 0.8vw, 5px);
    background: rgba(0, 0, 0, 0.4);
    padding: clamp(3px, 1vw, 6px) clamp(6px, 2vw, 12px);
    border-radius: clamp(3px, 1vw, 6px);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
}

.hero-rating svg {
    width: clamp(10px, 3vw, 14px);
    height: clamp(10px, 3vw, 14px);
    fill: #FFD700;
    stroke: none;
}

.hero-description {
    grid-area: description;
    color: var(--hero-text-muted);
    font-size: var(--hero-description-size);
    line-height: 1.5;
    max-width: clamp(300px, 90vw, 700px);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .hero-description {
        -webkit-line-clamp: 2;
        line-height: 1.4;
        max-width: 95vw;
    }
}

.hero-actions {
    grid-area: actions;
    display: flex;
    gap: clamp(6px, 2vw, 12px);
    flex-wrap: wrap;
    align-self: end;
    justify-self: start;
}

.hero-btn {
    border-radius: clamp(6px, 1.5vw, 10px);
    font-size: var(--hero-btn-size);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 1.5vw, 8px);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    padding: clamp(10px, 2.5vw, 14px) clamp(16px, 4vw, 24px);
    min-width: var(--hero-btn-desktop-min-width);
}

@media (max-width: 768px) {
    .hero-btn {
        width: var(--hero-btn-mobile-size);
        height: var(--hero-btn-mobile-size);
        min-width: var(--hero-btn-mobile-size);
        padding: 0;
        border-radius: 50%;
        gap: 0;
    }

    .hero-btn .btn-text {
        display: none;
    }

    .hero-btn svg {
        width: var(--hero-icon-mobile-size) !important;
        height: var(--hero-icon-mobile-size) !important;
    }
}

@media (min-width: 769px) {
    .hero-btn .btn-text {
        display: inline;
    }

    .hero-btn svg {
        width: var(--hero-icon-size) !important;
        height: var(--hero-icon-size) !important;
    }
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.hero-btn:hover::before {
    left: 100%;
}

.hero-btn-primary {
    background: var(--hero-btn-primary-bg);
    color: var(--hero-btn-primary-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.hero-btn-secondary {
    background: var(--hero-btn-secondary-bg);
    color: var(--hero-btn-secondary-color);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.hero-btn-secondary.active {
    background: var(--cinebrain-primary);
}

.hero-btn-tertiary {
    background: var(--hero-btn-tertiary-bg);
    color: var(--hero-btn-tertiary-color);
}

.hero-btn-tertiary:hover {
    background: var(--hero-btn-secondary-bg);
    color: var(--hero-btn-secondary-color);
}

@media (max-width: 768px) {
    .hero-btn:hover {
        transform: none;
    }

    .hero-btn:active {
        transform: scale(0.95);
    }
}

.hero-loading {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--hero-content-padding);
    z-index: 3;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "badge"
        "title"
        "info"
        "description"
        "actions";
    gap: clamp(6px, 2vw, 16px);
    align-content: end;
    opacity: 1;
    transition: opacity 0.5s ease;
    contain: layout style;
}

.hero-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 769px) {
    .hero-loading {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "badge ."
            "title ."
            "info ."
            "description actions";
        gap: clamp(12px, 2.5vw, 20px) clamp(20px, 4vw, 32px);
    }
}

@media (min-width: 1200px) {
    .hero-loading {
        grid-template-columns: 2fr 1fr;
    }
}

.hero-section .skeleton {
    background: linear-gradient(90deg,
            var(--hero-skeleton-bg) 0%,
            var(--hero-skeleton-shine) 50%,
            var(--hero-skeleton-bg) 100%);
    background-size: 200% 100%;
    animation: hero-skeleton-wave var(--hero-skeleton-speed) infinite;
    position: relative;
    overflow: hidden;
    border-radius: clamp(4px, 1vw, 8px);
}

.hero-section .skeleton-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--hero-skeleton-shine) 50%,
            transparent 100%);
    animation: hero-skeleton-shine var(--hero-skeleton-speed) infinite;
}

.hero-loading .skeleton-badge {
    grid-area: badge;
    width: clamp(80px, 20vw, 120px);
    height: clamp(24px, 6vw, 32px);
    justify-self: start;
}

.hero-loading .skeleton-title {
    grid-area: title;
    width: clamp(200px, 60vw, 600px);
    height: clamp(40px, 10vw, 80px);
    margin-bottom: clamp(8px, 2vw, 12px);
}

.hero-loading .skeleton-info {
    grid-area: info;
    display: flex;
    gap: clamp(8px, 2vw, 12px);
    flex-wrap: wrap;
}

.hero-loading .skeleton-info-item {
    width: clamp(60px, 15vw, 100px);
    height: clamp(24px, 6vw, 32px);
}

.hero-loading .skeleton-description {
    grid-area: description;
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 1vw, 6px);
}

.hero-loading .skeleton-description-line {
    height: clamp(16px, 4vw, 20px);
}

.hero-loading .skeleton-description-line:nth-child(1) {
    width: clamp(280px, 80vw, 500px);
}

.hero-loading .skeleton-description-line:nth-child(2) {
    width: clamp(250px, 70vw, 450px);
}

.hero-loading .skeleton-description-line:nth-child(3) {
    width: clamp(200px, 50vw, 350px);
}

.hero-loading .skeleton-actions {
    grid-area: actions;
    display: flex;
    gap: clamp(6px, 2vw, 12px);
    flex-wrap: wrap;
    align-self: end;
    justify-self: start;
}

.hero-loading .skeleton-btn {
    height: var(--hero-btn-mobile-size);
    border-radius: clamp(6px, 1.5vw, 10px);
}

@media (max-width: 768px) {
    .hero-loading .skeleton-btn {
        width: var(--hero-btn-mobile-size);
        border-radius: 50%;
    }

    .hero-loading .skeleton-actions {
        justify-self: center;
        justify-content: center;
    }

    .hero-loading {
        text-align: center;
        grid-template-areas:
            "badge"
            "title"
            "info"
            "description"
            "actions";
    }

    .hero-loading .skeleton-badge,
    .hero-loading .skeleton-title,
    .hero-loading .skeleton-info,
    .hero-loading .skeleton-description {
        justify-self: center;
    }

    .hero-loading .skeleton-info {
        justify-content: center;
    }
}

@media (min-width: 769px) {
    .hero-loading .skeleton-btn {
        width: var(--hero-btn-desktop-min-width);
    }
}

.hero-controls-hint {
    position: absolute;
    top: clamp(16px, 4vw, 24px);
    right: clamp(16px, 4vw, 24px);
    background: var(--hero-badge-bg);
    color: var(--hero-text-secondary);
    padding: clamp(4px, 1vw, 6px) clamp(8px, 2vw, 12px);
    border-radius: clamp(4px, 1vw, 6px);
    font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 4;
    pointer-events: none;
}

.hero-controls-hint.show {
    opacity: 1;
}

@media (max-width: 768px) {
    .hero-controls-hint {
        display: none;
    }
}

.hero-section * {
    box-sizing: border-box;
}

.content-container-cinebrain .skeleton,
.content-row .skeleton,
.carousel-wrapper .skeleton {
    animation: content-skeleton-loading 1.5s infinite !important;
    background: linear-gradient(90deg,
            var(--skeleton-bg) 0%,
            var(--skeleton-shine) 50%,
            var(--skeleton-bg) 100%) !important;
}

@keyframes hero-badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

@keyframes hero-skeleton-wave {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes hero-skeleton-shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes hero-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {

    .hero-image,
    .hero-content,
    .hero-btn,
    .hero-section .skeleton,
    .hero-section .skeleton-shimmer {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {

    .hero-loading,
    .hero-controls-hint {
        display: none !important;
    }

    .hero-section {
        height: auto !important;
        min-height: 200px;
    }
}