/* =============================================
   RANKING.CSS - Diseño minimalista y conversión
   ============================================= */

/* =============================================
   RANKING BLOCK
   ============================================= */

.legalzone-ranking-block {
    border-radius: 12px;
    overflow: hidden;
}

.ranking-title {
    font-size: 1.5rem;
    margin: 0 0 1.5rem;
    color: var(--lz-navy);
    font-weight: 700;
    text-align: center;
}

/* =============================================
   RANKING LIST
   ============================================= */

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Desktop - Grid Layout */
@media (min-width: 769px) {
    .ranking-item {
        display: grid;
        grid-template-columns: 45px 70px 1fr auto;
        gap: 1rem;
        align-items: center;
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid #f0f0f0;
        transition: all 0.3s ease;
        position: relative;
    }
}

/* Mobile - Flex Layout */
@media (max-width: 768px) {
    .ranking-item {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
        border-bottom: 1px solid #f0f0f0;
        transition: all 0.3s ease;
        position: relative;
    }
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background: linear-gradient(135deg, rgba(15, 42, 74, 0.02) 0%, rgba(201, 162, 75, 0.02) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.ranking-item:first-child:hover {
    background: linear-gradient(135deg, rgba(201, 162, 75, 0.08) 0%, rgba(15, 42, 74, 0.02) 100%);
}

/* =============================================
   RANKING POSITION
   ============================================= */

.ranking-position {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--lz-navy);
    text-align: center;
    line-height: 1;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f8f9fa;
    flex-shrink: 0;
}

.ranking-datos {
    display: flex;
    gap: 1rem;
}

.ranking-item:nth-child(1) .ranking-position {
    background: linear-gradient(135deg, var(--lz-gold) 0%, #b8913d 100%);
    color: #fff;
}

.ranking-item:nth-child(2) .ranking-position {
    background: linear-gradient(135deg, #c0c0c0 0%, #999999 100%);
    color: #fff;
}

.ranking-item:nth-child(3) .ranking-position {
    background: linear-gradient(135deg, #cd7f32 0%, #a86628 100%);
    color: #fff;
}

/* Mobile position - smaller */
@media (max-width: 768px) {
    .ranking-position {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* =============================================
   RANKING LOGO
   ============================================= */

.ranking-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    position: relative;
}

.ranking-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 0.4rem;
    transition: transform 0.3s ease;
}

.ranking-item:hover .ranking-logo img {
    transform: scale(1.05);
}

.placeholder-logo {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lz-navy);
    color: #fff;
    border-radius: 8px;
    font-size: 0.65rem;
    text-align: center;
    line-height: 1.1;
    padding: 0.4rem;
    font-weight: 600;
}

.ranking-meta {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.legalzone-stars {
    display: inline-flex;
    gap: 2px;
    font-size: 14px;
    line-height: 1;
}

.legalzone-stars .star {
    color: #ffc107;
}

.legalzone-stars .star.empty {
    color: #ddd;
}

.legalzone-stars .star.half {
    background: linear-gradient(90deg, #ffc107 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile logo - smaller */
@media (max-width: 768px) {
    .ranking-logo img {
        width: 50px;
        height: 50px;
    }

    .placeholder-logo {
        width: 50px;
        height: 50px;
        font-size: 0.6rem;
    }
}

/* =============================================
   RANKING CONTENT
   ============================================= */

.ranking-content {
    min-width: 0;
}

.ranking-item-title {
    font-size: 0.95rem;
    margin: 0 0 0.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.ranking-item-title a {
    color: var(--lz-navy);
    text-decoration: none;
    transition: color 0.2s;
}

.ranking-item-title a:hover {
    color: var(--lz-gold);
}

/* Bono destacado */
.ranking-bono {
    font-size: 0.85rem;
    color: var(--lz-ink);
    line-height: 1.4;
    margin-bottom: 0;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(201, 162, 75, 0.1) 0%, rgba(15, 42, 74, 0.05) 100%);
    border-radius: 6px;
    border-left: 3px solid var(--lz-gold);
}

.ranking-bono strong {
    color: var(--lz-navy);
    font-weight: 700;
}

/* Mobile content */
@media (max-width: 768px) {
    .ranking-item-title {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .ranking-bono {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .ranking-content {
        min-width: 100%;
    }
}

/* =============================================
   RANKING ACTIONS
   ============================================= */

.ranking-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ranking-actions .wp-block-button__link {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

.btn-visitar {
    background: linear-gradient(135deg, var(--lz-navy) 0%, var(--verdesecundario-legalzone) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(15, 42, 74, 0.2);
}

.btn-visitar:hover {
    background: linear-gradient(135deg, var(--verdesecundario-legalzone) 0%, var(--lz-navy) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 42, 74, 0.3);
}

.btn-reseña {
    background: transparent;
    color: var(--lz-navy);
    border: 2px solid var(--lz-navy);
}

.btn-reseña:hover {
    background: var(--lz-navy);
    color: #fff;
    border-color: var(--lz-navy);
}

/* Mobile actions - stacked and full width */
@media (max-width: 768px) {
    .ranking-actions {
        flex-direction: column;
        width: 100%;
    }

    .ranking-actions .wp-block-button__link {
        width: 100%;
        text-align: center;
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
    }
}

/* =============================================
   RANKING SIDEBAR LAYOUT
   ============================================= */

.ranking-sidebar .ranking-title {
    font-size: 1.1rem;
    padding: 1rem 1.25rem 0.75rem;
    text-align: left;
}

/* Desktop sidebar */
@media (min-width: 769px) {
    .ranking-sidebar .ranking-item {
        grid-template-columns: 35px 55px 1fr;
        gap: 0.75rem;
        padding: 0.75rem 1.25rem;
    }

    .ranking-sidebar .ranking-position {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .ranking-sidebar .ranking-logo img {
        width: 45px;
        height: 45px;
    }

    .ranking-sidebar .placeholder-logo {
        width: 45px;
        height: 45px;
        font-size: 0.55rem;
    }

    .ranking-sidebar .ranking-actions {
        flex-direction: column;
    }

    .ranking-sidebar .ranking-actions .wp-block-button__link {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        width: 100%;
    }
}

/* Mobile sidebar - flexbox vertical layout */
@media (max-width: 768px) {
    .ranking-sidebar .ranking-item {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.875rem 1rem;
    }

    .ranking-sidebar .ranking-position {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        align-self: flex-start;
    }

    .ranking-sidebar .ranking-logo {
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
        width: 100%;
    }

    .ranking-sidebar .ranking-logo img {
        width: 50px;
        height: 50px;
    }

    .ranking-sidebar .placeholder-logo {
        width: 50px;
        height: 50px;
        font-size: 0.6rem;
    }

    .ranking-sidebar .ranking-meta {
        order: 2;
    }

    .ranking-sidebar .ranking-content {
        width: 100%;
        order: 3;
    }

    .ranking-sidebar .ranking-item-title {
        font-size: 0.9rem;
        margin-bottom: 0.35rem;
    }

    .ranking-sidebar .ranking-bono {
        font-size: 0.8rem;
        padding: 0.35rem 0.55rem;
    }

    .ranking-sidebar .ranking-actions {
        flex-direction: column;
        width: 100%;
        order: 4;
    }

    .ranking-sidebar .ranking-actions .wp-block-button__link {
        font-size: 0.8rem;
        padding: 0.65rem 1rem;
        width: 100%;
    }
}

/* =============================================
   RANKING SINGLE PAGE LAYOUT
   ============================================= */

.ranking-single-page .ranking-title {
    font-size: 1.75rem;
}

/* Desktop single page */
@media (min-width: 769px) {
    .ranking-single-page .ranking-item {
        grid-template-columns: 55px 90px 1fr auto;
        gap: 1.5rem;
        padding: 1.75rem 2rem;
    }

    .ranking-single-page .ranking-position {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .ranking-single-page .ranking-logo img {
        width: 75px;
        height: 75px;
    }

    .ranking-single-page .placeholder-logo {
        width: 75px;
        height: 75px;
        font-size: 0.7rem;
    }

    .ranking-single-page .ranking-bono {
        font-size: 0.95rem;
    }

    .ranking-single-page .ranking-actions .wp-block-button__link {
        padding: 0.85rem 1.75rem;
        font-size: 0.9rem;
    }
}

/* Mobile single page */
@media (max-width: 768px) {
    .ranking-single-page .ranking-title {
        font-size: 1.4rem;
    }

    .ranking-single-page .ranking-item {
        padding: 1rem 1.25rem;
    }

    .ranking-datos {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .ranking-single-page .ranking-bono {
        font-size: 0.85rem;
    }
}

/* =============================================
   ADDITIONAL RESPONSIVE BREAKPOINTS
   ============================================= */

@media (max-width: 576px) {
    .ranking-title {
        font-size: 1.25rem;
        padding: 1.25rem 1.5rem 0;
    }

    .ranking-item {
        padding: 0.875rem 1rem;
        gap: 0.6rem;
    }

    .ranking-position {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .ranking-logo img {
        width: 48px;
        height: 48px;
    }

    .placeholder-logo {
        width: 48px;
        height: 48px;
        font-size: 0.55rem;
    }

    .ranking-item-title {
        font-size: 0.85rem;
    }

    .ranking-bono {
        font-size: 0.75rem;
        padding: 0.35rem 0.55rem;
    }

    .ranking-actions .wp-block-button__link {
        padding: 0.65rem 0.9rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 400px) {
    .ranking-item {
        padding: 0.75rem 0.875rem;
    }

    .ranking-position {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .ranking-logo img {
        width: 45px;
        height: 45px;
    }

    .ranking-actions .wp-block-button__link {
        font-size: 0.7rem;
        padding: 0.6rem 0.85rem;
    }
}