/**
 * ABOUT.CSS
 * Estilos para la sección "About the Game" con sistema de pestañas
 * Incluye: Contenedor principal, sistema de navegación por pestañas,
 * animaciones para imágen flotante y adaptaciones responsive
 */

/* Contenedor principal de la sección */
.about {
    background-color: var(--color-dark-blue);
    position: relative;
    color: var(--color-white);
    padding: 60px 40px 40px;
    z-index: 4;
    overflow: visible;
}

/* Fondo con textura */
.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../ui/about/bg_bricks.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* Animaciones para imágen flotante */
@keyframes float {
    0% { transform: translateY(0) rotate(0deg) scale(1.2); }
    50% { transform: translateY(-15px) rotate(1deg) scale(1.2); }
    100% { transform: translateY(0) rotate(0deg) scale(1.2); }
}



/* Contenedor principal */
.about__container {
    display: flex;
    gap: 60px;
    max-width: 1300px;
    margin: 0 auto;
    align-items: center;
    height: 100%;
}

/* Columnas */
.about__left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about__right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

/* Controles y título */
.about__controls {
    margin-bottom: 30px;
}

.about__title-area {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.about__title {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 1 auto;
}

.about__title-img {
    max-width: 85%;
    height: auto;
}

/* Botones de flecha */
.about__arrow {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 120px;
    height: auto;
    margin: 0 -10px;
}

.about__arrow-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

/* Estados de las flechas */
.about__arrow-img--left {
    opacity: 1;
    transform: scaleX(-1);
}

.about__arrow-img--left-hover {
    opacity: 0;
    transform: scaleX(-1);
}

.about__arrow-img--left-inactive {
    opacity: 0;
    transform: scaleX(-1);
}

.about__arrow-img--right {
    opacity: 1;
}

.about__arrow-img--right-hover {
    opacity: 0;
}

.about__arrow-img--right-inactive {
    opacity: 0;
}

/* Efectos hover */
.about__arrow--left:hover .about__arrow-img--left {
    opacity: 0;
}

.about__arrow--left:hover .about__arrow-img--left-hover {
    opacity: 1;
}

.about__arrow--right:hover .about__arrow-img--right {
    opacity: 0;
}

.about__arrow--right:hover .about__arrow-img--right-hover {
    opacity: 1;
}

/* Estados inactivos */
.about__arrow--left.inactive .about__arrow-img--left,
.about__arrow--left.inactive .about__arrow-img--left-hover {
    opacity: 0;
}

.about__arrow--left.inactive .about__arrow-img--left-inactive {
    opacity: 1;
}

.about__arrow--right.inactive .about__arrow-img--right,
.about__arrow--right.inactive .about__arrow-img--right-hover {
    opacity: 0;
}

.about__arrow--right.inactive .about__arrow-img--right-inactive {
    opacity: 1;
}

/* Pestañas */
.about__tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.about__tab-button {
    font-family: 'MorningBreeze', 'Poppins', sans-serif;
    background: none;
    border: none;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--color-tab-inactive);
    padding: 5px 15px;
    cursor: pointer;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.about__tab-button--active {
    color: var(--color-primary);
}

.about__tab-button:not(.about__tab-button--active):hover {
    color: var(--color-tab-hover);
}

.about__tab-divider {
    width: 1px;
    height: 20px;
    background-color: var(--color-divider);
}

/* Contenido de pestañas */
.about__content {
    margin-top: 30px;
}

.about__tab-content {
    display: none;
    color: var(--color-white);
    text-shadow: 1px 1px 3px var(--color-shadow);
    font-size: 1.2rem;
    font-family: 'Tahoma', sans-serif;
    line-height: 1.5;
    text-align: center;
    max-width: 90%;
    margin: 0 auto;
}

.about__tab-content--active {
    display: block;
}

.about__tab-content--features {
    text-align: left;
}

.about__tab-content p {
    margin-bottom: 15px;
}

.about__tab-content p:first-child {
    margin-bottom: 25px;
}

/* Imágen */
.about__game-image {
    width: 100%;
    max-width: 850px;
    display: none;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
    overflow: visible;
}

.about__game-image--active {
    display: flex;
}

.about__illustration {
    width: 100%;
    height: auto;
    animation: float 4s ease-in-out infinite;
    transform-origin: center;
    position: relative;
    z-index: 3;
    display: block;
    margin: 0 auto;
}



/* Media Queries */
@media (min-width: 1921px) {
    .about__container {
        gap: 200px;
        max-width: 2200px;
    }

    .about__title-img {
        max-width: 90%;
    }

    .about__arrow {
        width: 120px;
    }

    .about__title-area {
        gap: 60px;
        margin-bottom: 25px;
    }

    .about__tab-content {
        font-size: 1.6rem;
        line-height: 1.6;
    }

    .about__tab-button {
        font-size: 2rem;
        padding: 18px 35px;
    }

    .about__tabs {
        gap: 30px;
        transform: scale(1.2);
    }

    .about__game-image {
        width: 100%;
        max-width: 100%;
        transform: scale(1.05);
        object-fit: contain;
        margin-top: 20px;
    }

    .about__illustration {
        width: 90%;
        max-width: 90%;
        animation: float 6s ease-in-out infinite;
        object-fit: contain;
    }

    .about__right {
        min-height: 720px;
    }
}

@media (min-width: 1441px) and (max-width: 1920px) {
    .about__container {
        gap: 80px;
        justify-content: space-between;
        max-width: 1800px;
        width: 95%;
    }

    .about__title-img {
        max-width: 90%;
        transform: scale(0.9);
    }

    .about__arrow {
        width: 130px;
        margin: 0 -15px;
    }

    .about__title-area {
        gap: 20px;
        margin-bottom: 20px;
    }

    .about__tab-content {
        font-size: 1.3rem;
        line-height: 1.6;
        position: relative;
        top: -20px;
    }

    .about__tab-button {
        font-size: 1.5rem;
        padding: 12px 25px;
    }

    .about__tabs {
        gap: 20px;
        transform: scale(1.1);
    }

    .about__tab-divider {
        height: 22px;
    }

    .about__game-image {
        width: 90%;
        max-width: 90%;
    }

    .about__illustration {
        width: 85%;
        max-width: 85%;
        animation: float 6s ease-in-out infinite;
    }

    .about__left, .about__right {
        min-height: 720px;
        width: 50%;
        max-width: 50%;
    }

    .about__right {
        align-items: flex-start;
        margin-top: 50px;
    }

    .about__game-image--active {
        align-items: flex-start;
        padding-top: 50px;
    }
}

@media (max-width: 1440px) and (min-width: 1025px) {
    .about__container {
        gap: 120px;
    }

    .about__left {
        flex: 1.1;
        padding-right: 20px;
    }

    .about__right {
        flex: 0.9;
    }

    .about__tab-content {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .about__tab-content {
        max-width: 100%;
        font-size: 1.2rem;
        position: relative;
        top: -20px;
        width: 100%;
        line-height: 1.5;
    }

    .about__left {
        width: 100%;
        padding-right: 20px;
        flex: 1.5;
        max-width: 65%;
    }

    .about__content {
        margin-top: 15px;
    }

    .about__title-area {
        margin-bottom: 10px;
    }

    .about__arrow {
        width: 120px;
        top: -30px;
    }

    .about__container {
        gap: 60px;
    }

    .about {
        padding-top: 40px;
    }

    .about__right {
        flex: 0.5;
        min-height: 400px;
        margin-right: 50px;
        max-width: 35%;
    }

    .about__game-image {
        max-width: 400px;
        margin: 0 50px;
    }

    .about__illustration {
        max-width: 350px;
        width: 350px;
    }
}

/* Tablets y móviles */
@media (max-width: 768px) {
    .about__container {
        flex-direction: column;
    }

    .about__left {
        width: 100%;
        max-width: 100%;
    }

    .about__right {
        display: none;
    }

    .about__game-image {
        max-width: 350px;
        display: none;
    }

    .about {
        padding: 40px 20px;
    }

    .about__title-area {
        gap: 5px;
        margin-bottom: 10px;
    }

    .about__title-img {
        max-width: 70%;
    }
}

@media (max-width: 768px) and (min-width: 426px) {
    .about__arrow {
        width: 110px;
        margin: 0 -10px;
    }

    .about__title-area {
        gap: 10px;
        align-items: center;
    }

    .about__tabs {
        transform: scale(1);
        margin-bottom: 15px;
    }

    .about__tab-button {
        font-size: 1.2rem;
        padding: 5px 15px;
    }

    .about__tab-content {
        font-size: 1.15rem;
        line-height: 1.5;
        max-width: 80%;
        position: relative;
        top: -20px;
    }

    .about__content {
        margin-top: 10px;
    }

    .about__title-img {
        max-width: 55%;
    }
}

/* Móviles */
@media (max-width: 425px) {
    .about__tab-content {
        font-size: 1.1rem;
        line-height: 1.3;
        text-shadow: 0 3px 5px var(--color-shadow-dark), 0 1px 2px var(--color-shadow);
        position: relative;
        top: -20px;
        width: 85%;
        max-width: 800px;
        text-align: center;
    }

    .about__arrow {
        width: 100px;
        display: flex;
        align-items: center;
        margin: 0 -8px;
    }

    .about__title-area {
        gap: 5px;
        margin-bottom: 15px;
        align-items: center;
    }
}

@media (max-width: 320px) {
    .about__tab-content {
        font-size: 1rem;
        line-height: 1.2;
        top: -30px;
        width: 95%;
    }

    .about__arrow {
        width: 90px;
        display: flex;
        align-items: center;
        margin: 0 -5px;
    }

    .about__title-img {
        max-width: 100%;
        width: 220px;
    }

    .about__title-area {
        gap: 2px;
        margin-bottom: 15px;
        align-items: center;
    }
}

/* Reglas específicas para iPhone */
@media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3),
       only screen and (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-device-width: 414px) and (max-device-width: 896px) and (-webkit-min-device-pixel-ratio: 2) {
    .about__arrow {
        position: relative;
        width: 100px;
        display: flex;
        align-items: center;
        margin: 0 -8px;
    }

    .about__title-area {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 5px;
        margin-bottom: 15px;
    }

    .about__title {
        margin-top: 0;
        display: flex;
        align-items: center;
    }

    .about__title-img {
        max-width: 65%;
        margin: 0;
    }
}
