﻿* {
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: #1fa8bd;
}

.ranking {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background-image: url('../img/ranking.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.logo-coomeva {
    position: absolute;
    top: 4.2%;
    left: 50%;
    width: 53%;
    max-width: 520px;
    height: auto;
    transform: translateX(-50%);
    z-index: 2;
}

.ranking-contenido {
    position: absolute;
    top: 29.5%;
    left: 50%;
    width: 82%;
    max-width: 850px;
    transform: translateX(-50%);
    z-index: 2;
}

.ranking-titulo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 0 7%;
    color: #ffffff;
    font-size: clamp(32px, 5vw, 58px);
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.ranking-trofeo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82em;
    line-height: 1;
}

.ranking-encabezados {
    display: grid;
    grid-template-columns: 13% minmax(0, 1fr) 19% 19%;
    column-gap: 2%;
    width: 100%;
    margin-bottom: 2.5%;
    color: #006477;
    font-size: clamp(15px, 2.5vw, 28px);
    font-weight: 400;
}

.ranking-puesto-titulo {
    text-align: center;
}

.ranking-nombre-titulo {
    text-align: left;
}

.ranking-buenas-titulo {
    text-align: center;
}

.ranking-tiempo-titulo {
    text-align: center;
}

.ranking-lista {
    display: flex;
    flex-direction: column;
    gap: 1.6%;
    width: 100%;
}

.ranking-fila {
    display: grid;
    grid-template-columns: 13% minmax(0, 1fr) 19% 19%;
    column-gap: 2%;
    width: 100%;
    min-height: clamp(35px, 5.1vw, 58px);
    margin: 3% auto 0 auto;
}

.ranking-puesto {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 100%;
    border-radius: 999px;
    background: #27b2c2;
    color: #ffffff;
    font-size: clamp(14px, 2.1vw, 24px);
    font-weight: 700;
}

.ranking-nombre {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 100%;
    padding: 0 5%;
    overflow: hidden;
    border-radius: 999px;
    background: #27b2c2;
    color: #ffffff;
    font-size: clamp(14px, 2.1vw, 24px);
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-buenas {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-radius: 999px;
    background: #ffffff;
    color: #006477;
    font-size: clamp(13px, 2vw, 22px);
    font-weight: 700;
}

.ranking-tiempo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-radius: 999px;
    background: #ffffff;
    color: #006477;
    font-size: clamp(13px, 2vw, 22px);
    font-weight: 700;
}

.boton-inicio {
    position: absolute;
    left: 50%;
    bottom: 8.5%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 29%;
    min-width: 170px;
    max-width: 340px;
    height: clamp(42px, 6.5vw, 70px);
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: #00a4a9;
    color: #ffffff;
    font-family: inherit;
    font-size: clamp(18px, 2.8vw, 30px);
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transform: translateX(-50%);
    transition: transform 0.15s ease, opacity 0.15s ease;
    z-index: 3;
}

.boton-inicio span {
    font-size: 1.1em;
    line-height: 1;
}

.boton-inicio:hover {
    opacity: 0.92;
}

.boton-inicio:active {
    transform: translateX(-50%) scale(0.97);
}

.logo-aliado {
    position: absolute;
    right: 7%;
    bottom: 2.5%;
    width: 32%;
    max-width: 330px;
    height: auto;
    z-index: 2;
}

@media (orientation: portrait) {

    .ranking {
        min-height: 100vh;
        aspect-ratio: 9 / 16;
    }

    .logo-coomeva {
        top: 4.2%;
        width: 52%;
    }

    .ranking-contenido {
        top: 30%;
        width: 82%;
    }

    .ranking-titulo {
        margin-bottom: 7%;
        font-size: clamp(30px, 7vw, 58px);
    }

    .ranking-encabezados {
        font-size: clamp(13px, 3.5vw, 27px);
    }

    .ranking-fila {
        min-height: clamp(32px, 7vw, 58px);
    }

    .ranking-puesto {
        font-size: clamp(12px, 3vw, 23px);
    }

    .ranking-nombre {
        font-size: clamp(12px, 3vw, 23px);
    }

    .ranking-buenas {
        font-size: clamp(12px, 3vw, 22px);
    }

    .ranking-tiempo {
        font-size: clamp(12px, 3vw, 22px);
    }

    .boton-inicio {
        bottom: 8.5%;
        width: 29%;
        min-width: 130px;
        height: clamp(38px, 7vw, 60px);
        font-size: clamp(16px, 4vw, 28px);
    }

    .logo-aliado {
        right: 6%;
        bottom: 2.5%;
        width: 32%;
    }

}

@media (max-width: 500px) {

    .logo-coomeva {
        width: 58%;
    }

    .ranking-contenido {
        width: 88%;
        top: 32%;
    }

    .ranking-titulo {
        gap: 7px;
        margin-bottom: 7%;
        font-size: 30px;
    }

    .ranking-encabezados {
        grid-template-columns: 13% minmax(0, 1fr) 19% 19%;
        column-gap: 2%;
        margin-bottom: 2.5%;
    }

    .ranking-lista {
        gap: 1.7%;
    }

    .ranking-fila {
        grid-template-columns: 13% minmax(0, 1fr) 19% 19%;
        column-gap: 2%;
        min-height: 26px;
    }

    .ranking-puesto {
        font-size: 10px;
    }

    .ranking-nombre {
        padding: 0 5%;
        font-size: 10px;
    }

    .ranking-buenas {
        font-size: 10px;
    }

    .ranking-tiempo {
        font-size: 10px;
    }

    .boton-inicio {
        bottom: -12%;
        width: 29%;
        min-width: 108px;
        height: 35px;
        gap: 5px;
        padding: 0 12px;
        font-size: 16px;
    }

    .logo-aliado {
        right: 5%;
        bottom: 2.5%;
        width: 33%;
    }

}