* {
    margin: 0;
    padding: 0;
    box-sizing: content-box;
}

body {
    height: 100vh;
    overflow: hidden;
}

.page-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0.5, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    height: 60px;
}

.logo-left,
.logo-right {
    display: flex;
    align-items: center;
}

.logo-left img,
.logo-right img {
    width: auto;
}

.logo-left img {
    max-height: 45px;
}

.logo-right img {
    max-height: 65px;
}

main {
    position: absolute;
    top: 20px;
    width: 100%;
    height: calc(100vh - 60px);
    margin-top: 60px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Cool Card Styles */
.item {
    width: 200px;
    height: 300px;
    list-style-type: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    background-position: center;
    background-size: cover;
    border-radius: 20px;
    box-shadow: 0 20px 30px rgba(255, 255, 255, 0.3) inset;
    transition: transform 0.1s, left 0.75s, top 0.75s, width 0.75s, height 0.75s;
}

.item:nth-child(1),
.item:nth-child(2) {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Video item styling */
.item.video-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.item.video-item .content {
    position: relative;
    z-index: 2;
}

.item:nth-child(1).video-item video,
.item:nth-child(2).video-item video {
    object-fit: cover;
}

.content {
    width: min(30vw, 400px);
    position: absolute;
    top: 50%;
    left: 3rem;
    transform: translateY(-50%);
    font: 400 0.85rem helvetica, sans-serif;
    color: white;
    opacity: 0;
    display: none;
    background: rgba(0, 0, 0, 0.7);
    padding: 1.5rem;
    border-radius: 8px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.content .title {
    font-family: 'arial-black';
    text-transform: uppercase;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.5rem;
}

.content .description {
    line-height: 1.7;
    margin: 1rem 0 1.5rem;
    font-size: 0.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.content button {
    width: fit-content;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid white;
    border-radius: 0.25rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.content button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.item:nth-child(1) {
    opacity: 0;
    pointer-events: none;
}

/* Thumbnails sidebar - dynamic height layout */
.item:nth-child(n+3) {
    left: auto;
    right: 1rem;
    width: 180px;
    height: 100px;
    transform: none;
    z-index: 3;
    opacity: 1;
    pointer-events: auto;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    filter: brightness(0.95) saturate(0.95);
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.item:nth-child(n+3):hover {
    transform: translateY(-2px);
    filter: brightness(1) saturate(1);
}

/* Dynamic positioning based on available height */
/* Each thumbnail is 100px tall with 10px gap = 110px per item */
/* Calculate available space: calc(100vh - 60px header - 2rem top - 2rem bottom) */
.item:nth-child(3) {
    top: calc(1rem + 0 * 110px);
}

.item:nth-child(4) {
    top: calc(1rem + 1 * 110px);
}

.item:nth-child(5) {
    top: calc(1rem + 2 * 110px);
}

.item:nth-child(6) {
    top: calc(1rem + 3 * 110px);
}

.item:nth-child(7) {
    top: calc(1rem + 4 * 110px);
}

.item:nth-child(8) {
    top: calc(1rem + 5 * 110px);
}

.item:nth-child(9) {
    top: calc(1rem + 6 * 110px);
}

.item:nth-child(10) {
    top: calc(1rem + 7 * 110px);
}

.item:nth-child(11) {
    top: calc(1rem + 8 * 110px);
}

.item:nth-child(12) {
    top: calc(1rem + 9 * 110px);
}

.item:nth-child(13) {
    top: calc(1rem + 10 * 110px);
}

.item:nth-child(14) {
    top: calc(1rem + 11 * 110px);
}

.item:nth-child(15) {
    top: calc(1rem + 12 * 110px);
}

.item:nth-child(16) {
    top: calc(1rem + 13 * 110px);
}

.item:nth-child(17) {
    top: calc(1rem + 14 * 110px);
}

.item:nth-child(18) {
    top: calc(1rem + 15 * 110px);
}

.item:nth-child(19) {
    top: calc(1rem + 16 * 110px);
}

.item:nth-child(20) {
    top: calc(1rem + 17 * 110px);
}

.item:nth-of-type(2) .content {
    display: block;
    animation: show 0.75s ease-in-out 0.3s forwards;
}

@keyframes show {
    0% {
        filter: blur(5px);
        transform: translateY(calc(-50% + 75px));
    }

    100% {
        opacity: 1;
        filter: blur(0);
    }
}

/* Navigation Styles */
.nav {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 100;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: 2rem;
    -webkit-user-select: none;
    user-select: none;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.nav .btn {
    background-color: rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 0, 0, 0.6);
    margin: 0 0.25rem;
    padding: 0.75rem;
    border-radius: 50rem;
    cursor: pointer;
}

.nav .btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Modal Styles */
.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 35px;
    cursor: pointer;
    color: white;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background-color: rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.article-conatiner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.image-container img,
.video-container video {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.story-container {
    color: #333;
}

.story-container .title {
    color: #333;
    font-size: 2rem;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.story-container p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Responsive Styles */
@media (width > 650px) and (width < 900px) {
    .content .title {
        font-size: 1rem;
    }

    .content .description {
        font-size: 0.7rem;
    }

    .content button {
        font-size: 0.7rem;
    }

    .item {
        width: 160px;
        height: 270px;
    }

    .item:nth-child(n+3) {
        right: 0.5rem;
        width: 140px;
        height: 78px;
    }

    /* Adjust spacing for medium screens */
    .item:nth-child(3) {
        top: calc(1rem + 0 * 88px);
    }

    .item:nth-child(4) {
        top: calc(1rem + 1 * 88px);
    }

    .item:nth-child(5) {
        top: calc(1rem + 2 * 88px);
    }

    .item:nth-child(6) {
        top: calc(1rem + 3 * 88px);
    }

    .item:nth-child(7) {
        top: calc(1rem + 4 * 88px);
    }

    .item:nth-child(8) {
        top: calc(1rem + 5 * 88px);
    }

    .item:nth-child(9) {
        top: calc(1rem + 6 * 88px);
    }

    .item:nth-child(10) {
        top: calc(1rem + 7 * 88px);
    }

    .item:nth-child(11) {
        top: calc(1rem + 8 * 88px);
    }

    .item:nth-child(12) {
        top: calc(1rem + 9 * 88px);
    }

    .item:nth-child(13) {
        top: calc(1rem + 10 * 88px);
    }

    .item:nth-child(14) {
        top: calc(1rem + 11 * 88px);
    }

    .item:nth-child(15) {
        top: calc(1rem + 12 * 88px);
    }

    .item:nth-child(16) {
        top: calc(1rem + 13 * 88px);
    }

    .item:nth-child(17) {
        top: calc(1rem + 14 * 88px);
    }

    .item:nth-child(18) {
        top: calc(1rem + 15 * 88px);
    }

    .item:nth-child(19) {
        top: calc(1rem + 16 * 88px);
    }

    .item:nth-child(20) {
        top: calc(1rem + 17 * 88px);
    }
}

@media (width < 650px) {
    .content .title {
        font-size: 0.9rem;
    }

    .content .description {
        font-size: 0.65rem;
    }

    .content button {
        font-size: 0.7rem;
    }

    .item {
        width: 130px;
        height: 220px;
    }

    .item:nth-child(n+3) {
        display: none;
    }

    .article-conatiner {
        grid-template-columns: 1fr;
    }
}