#formats-list {
    background-color: #1f1f1f;
    padding-top: 0px;
    padding-bottom: 0px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#formats-list .image-text-pair-left p {
    color: #1f1f1f;
}

#formats-list .image-text-pair-right p {
    color: #fff;
}

#formats-list .text-container {
    margin-top: auto;
    margin-bottom: auto;
}

#formats-list .image-container {
    overflow: hidden;
}

#formats-list .image-container iframe {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 50vw;
}

#formats-list .image-text-pair-left {
    background-color: white;
    background-image: url("../assets/images/crosshairs/grey-crosshairs-full-lighter.png");
    background-size: cover;
    background-position: right;
}

#formats-list .image-text-pair-right {
    background-color: #1f1f1f;
    background-image: url("../assets/images/crosshairs/grey-crosshairs-full.png");
    background-size: cover;
    background-position: right;
}


#formats-list h4 {
    color: #d00909;
}

#formats-list .category-selectors {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

#formats-list .category-btn {
    padding: 10px 20px;
    border: 1px solid #cccccc;
    background-color: #1f1f1f;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    text-align: center;
}

#formats-list .category-btn:hover {
    background-color: #d00909;
    color: #ffffff;
    border-color: #d00909;
}

#formats-list .category-btn.active {
    background-color: #d00909;
    color: #ffffff;
    border-color: #d00909;
}

br {
    display: none;
}

.image-attribution {
    top: 5px;
    bottom: auto;
}

.image-text-pair-left .image-attribution {
    right: auto;
    left: 5px;
}

@media (max-width: 1600px) {

    #formats-list .text-container {
        width: 40%;
        margin: auto;
    }

    #formats-list p {
        width: 100%;
        font-size: 1rem;
}

@media (max-width: 1300px) {

    #formats-list .text-container {
        width: 40%;
        margin: auto;
    }

    #formats-list p {
        width: 100%;
        font-size: 0.8rem;
}

@media (max-width: 1024px) {

    #formats-list h4 {
        width: 100%;
        font-size: 1.3rem;
    }

    #formats-list p {
        width: 100%;
        font-size: 0.7rem;
    }

    #formats-list h2 {
        max-width: 80%;
    }

    #formats-list .image-text-pair-left,
    #formats-list .image-text-pair-right {
        background-image: none;
    }
}


@media (max-width: 992px) {

    #formats-list h2 {
        max-width: 80%;
    }
}

/* Tablet styles */
@media (max-width: 768px) {
    #formats-list {
        padding-top: 0px;
        padding-bottom: 0px;
    }

    #formats-list .category-selectors {
        gap: 8px;
        margin-bottom: 30px;
    }

    #formats-list .image-container {
        height: auto !important;
        width: 100vw;
    }

    #formats-list .text-container {
        padding-bottom: 40px;
        width: 80%;
        margin: 50px auto;
    }

    #formats-list iframe {
        width: 100vw !important;
    }

    #formats-list .category-btn {
        background-image: url("../assets/images/crosshairs/grey-crosshairs-full-faded.png");
        font-size: 13px;
        min-width: 80px;
    }

    #formats-list button {
        margin: 0px;
    }

    #formats-list h2 {
        max-width: 90%;
        font-size: 2rem;
    }

    #formats-list h4 {
        margin-left: auto;
        margin-right: auto;
        font-weight: 600;
    }

    #formats-list p {
        width: 80%;
        margin-left: 10%;
        text-align: justify;
        font-size: 0.9rem;
    }
}


/* Mobile styles */
@media (max-width: 480px) {
    #formats-list {
        padding: 0px;
    }

    #formats-list .category-selectors {
        gap: 8px;
        margin-bottom: 25px;
        max-width: 90%;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }

    #formats-list .category-btn {
        font-size: 12px;
        min-width: unset;
        width: 100%;
    }

    #formats-list button {
        margin: 0px;
    }

    #formats-list p {
        font-size: 1rem;
        margin: 0px;
        width: 100%;
    }
}

/* Landscape mobile devices - optimize for limited vertical space */
@media screen and (orientation: landscape) and (max-height: 400px) and (max-width: 900px){


    #formats-list h4 {
        width: 100%;
        font-size: 1.3rem;
    }

    #formats-list p {
        width: 100%;
        font-size: 1rem;
    }
}

/* Landscape mobile devices - optimize for limited vertical space */
@media screen and (orientation: landscape) and (max-height: 600px) {

    #formats-list {
        padding-top: 0px;
        padding-bottom: 0px;
    }

    #formats-list .category-selectors {
        margin-bottom: 0px;
    }

    #formats-list h4 {
        width: 100%;
        font-size: 1.3rem;
    }

    #formats-list p {
        width: 100%;
        font-size: 0.7rem;
    }

    #formats-list .image-text-pair-left .text-container,
    #formats-list .image-text-pair-right .text-container {
        margin: auto;
        width: 37%;
    }
}
