/*
|--------------------------------------------------------------------------
| Componente reutilizable - Pestañas
|--------------------------------------------------------------------------
*/

.page-tabs-section {
    padding-bottom: 3rem;
}

.page-tabs {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;

    max-width: 1000px;

    margin-left: auto;
    margin-right: auto;

    gap: 0.5rem;

    border-bottom: 2px solid rgba(138, 21, 137, 0.15);
}

.page-tabs .nav-link {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;

    padding: 0.85rem 1.5rem;

    color: #595959;
    background-color: transparent;

    border: none;
    border-radius: 0;

    font-size: 1rem;
    font-weight: 600;
    text-align: center;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.page-tabs .nav-link::after {
    content: "";

    position: absolute;
    bottom: -2px;
    left: 0;

    width: 100%;
    height: 3px;

    background-color: transparent;

    border-radius: 3px 3px 0 0;

    transition: background-color 0.2s ease;
}

.page-tabs .nav-link.active {
    color: var(--primary);
    background-color: #faf5fa;
}

.page-tabs .nav-link.active::after {
    background-color: var(--primary);
}

@media (hover: hover) {
    .page-tabs .nav-link:not(.active):hover {
        color: var(--primary);
        background-color: rgba(138, 21, 137, 0.05);
    }
}

.page-tabs .nav-link:focus-visible {
    outline: 3px solid rgba(138, 21, 137, 0.35);
    outline-offset: -3px;
}

.page-tabs-content {
    max-width: 1100px;

    margin-left: auto;
    margin-right: auto;

    padding-top: 2rem;
}

@media (max-width: 991.98px) {
    .page-tabs .nav-link {
        min-height: 48px;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .page-tabs-content {
        padding-top: 1.75rem;
    }
}

@media (max-width: 767.98px) {
    .page-tabs {
        flex-direction: column;
        gap: 0.25rem;
        border-bottom: none;
    }

    .page-tabs .nav-link {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        padding: 0.85rem 1rem;
        border: 1px solid rgba(138, 21, 137, 0.12);
        border-radius: 8px;
    }

    .page-tabs .nav-link.active {
        border-color: rgba(138, 21, 137, 0.3);
    }

    .page-tabs .nav-link::after {
        bottom: 0;
        border-radius: 0 0 8px 8px;
    }

    .page-tabs-content {
        padding-top: 1.5rem;
    }
}

@media (max-width: 390px) {
    .page-tabs .nav-link {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-tabs .nav-link,
    .page-tabs .nav-link::after {
        transition: none;
    }
}

/*
|--------------------------------------------------------------------------
| Variante rellena / ancha
|--------------------------------------------------------------------------
|
| Útil para apartados de consulta con tablas, como Consejos.
|
*/

.page-tabs--filled {
    justify-content: flex-start;
    max-width: none;
    gap: 0.35rem;
    border-bottom: 2px solid rgba(138, 21, 137, 0.18);
}

.page-tabs--filled .nav-link {
    min-height: 52px;
    padding: 0.85rem 1.5rem;
    color: #15233c;
    background-color: #f7f5f8;
    border-radius: 9px 9px 0 0;
    font-size: 0.95rem;
}

.page-tabs--filled .nav-link::after {
    display: none;
}

.page-tabs--filled .nav-link.active {
    color: #ffffff;
    background-color: var(--primary);
}

@media (hover: hover) {
    .page-tabs--filled .nav-link:not(.active):hover {
        color: var(--primary);
        background-color: rgba(138, 21, 137, 0.07);
    }
}

.page-tabs-content--wide {
    max-width: none;
    padding-top: 1rem;
}

@media (max-width: 767.98px) {
    .page-tabs--filled .nav-link {
        border-radius: 8px;
    }
}
